Suppose we are trying to estimate a random variable $Y$ by conditioning on three random variables, $X,Z$, with the condition that $Z \in \{0,1\}$ is discrete. I am interested in the conditional expectation of $Y$ conditioned on $X$. However, suppose I only have the expectation of $Y$ on $X$ with $Z$ set to be $1$:
$$ E(Y\mid X, Z=1) $$
By law of iterated expectations, I believe I can have the following form:
\begin{align*} E\bigg( E\left( Y \mid X,Z=1 \right) \mid X\bigg) &= E[Y \mid X] \end{align*}
In the above, it is valid to take the conditional expectation of $E(Y\mid X, Z=1)$? I am hesitant about this result as I have conditioned on a random variable ($Z$) that has been fixed to a result.
Following the general definition of conditional expectations given sigma algebras we can write $E(Y|X,Z=1)$ as $E(Y|\sigma (X, I_{Z=1})$. Hence the law of iterated conditioning applies and the formula you have stated is correct.