How to come up with an example that $E(\epsilon|z,\eta)=E(\epsilon|\eta)$ and $E(\epsilon)=0$ do not imply $E(\epsilon|z)=0$?

I'm trying to come up with an example showing that $$E(\epsilon|z,\eta)=E(\epsilon|\eta)$$ and $$E(\epsilon)=0$$ do not imply $$E(\epsilon|z)=0$$. The model is nonparametric IV model with the structural equation $$y=m(x,z_1)+\epsilon$$ and the reduced form $$x=\pi(z)+\eta$$, assuming that $$E(\epsilon|z)=0$$.

Note that for $$E(\epsilon|z,\eta)=E(\epsilon|\eta)$$ to hold, a sufficient condition is that $$(\epsilon,\eta)$$ and $$z$$ are independent.

How to construct the example?

• It seems to me a trivial example would be $z = \eta$; if $E(\epsilon|\eta) \neq 0$, you're done. But maybe that's too trivial, or for some other reason doesn't work for you. $z$ equals any 1-1 transform of $\eta$ works too, obviously. Commented Apr 4 at 2:29
• @jbowman But for $E(\epsilon|z,\eta)=E(\epsilon|\eta)$ to hold, we need $z$ and $\eta$ to be independent. If $z=\eta$, they can't be independent. Can they? Commented Apr 4 at 2:36
• The independence is a sufficient condition, not a necessary one :) Commented Apr 4 at 15:10
• got it. thank you! Commented Apr 4 at 17:03

To begin with, let's set \begin{align*} \begin{bmatrix} \epsilon \\ z \\ \eta \end{bmatrix} \sim N_3\left( \begin{bmatrix} 0 \\ \mu_1 \\ \mu_2 \end{bmatrix}, \begin{bmatrix} 1 & \alpha & \beta\\ \alpha & 1 & \gamma \\ \beta & \gamma & 1 \end{bmatrix} \right). \end{align*}
Here the marginal mean of $$\epsilon$$ is set to $$0$$ to satisfy the constraint $$E[\epsilon] = 0$$. It then follows that \begin{align*} E[\epsilon | \eta] &= \beta(\eta - \mu_2), \tag{1}\label{1}\\ E[\epsilon | z, \eta] &= \begin{bmatrix} \alpha & \beta \end{bmatrix} \begin{bmatrix} 1 & \gamma \\ \gamma & 1 \end{bmatrix}^{-1} \begin{bmatrix} z - \mu_1 \\ \eta - \mu_2 \end{bmatrix} \\ \phantom{E[\epsilon | z, \eta] } &= \frac{1}{1 - \gamma^2}\left[(\alpha - \beta\gamma)(z - \mu_1) + (\beta - \alpha\gamma)(\eta - \mu_2)\right], \tag{2}\label{2} \\ E[\epsilon | z] &= \alpha(z - \mu_1). \tag{3}\label{3} \end{align*} A necessary and sufficient condition for $$\eqref{1}$$ and $$\eqref{2}$$ to be identical is thus clearly \begin{align*} \begin{cases} \alpha - \beta\gamma = 0, \\[1em] \beta(1 - \gamma^2) = \beta - \alpha\gamma, \end{cases} \end{align*} which is just $$\alpha = \beta\gamma$$. To ensure $$\eqref{3}$$ is non-zero, $$\alpha$$ must be non-zero. Therefore, any choice of $$(\alpha, \beta, \gamma)$$ such that $$\alpha = \beta\gamma$$, $$\alpha \neq 0$$ (as well as they together make a valid covariance matrix) would serve a valid example ($$\mu_1, \mu_2$$ can be chosen arbitrarily). For instance, $$\mu_1 = \mu_2 = 0$$, $$\alpha = \frac{1}{2}$$, $$\beta = \gamma = \frac{1}{\sqrt{2}}$$ give \begin{align*} & E[\epsilon] = 0, \\ & E[\epsilon |\eta] = E[\epsilon |z, \eta] = \frac{\sqrt{2}}{2}\eta, \\ & E[\epsilon | z] = \frac{1}{2}z \neq 0. \end{align*}
Let sample space $$\Omega = \{1, 2, 3, 4\}$$, $$\mathscr{F} = 2^{\Omega}$$, $$P(\{1\}) = P(\{2\}) = P(\{3\}) = P(\{4\}) = \frac{1}{4}$$. Consider two partitions of $$\Omega$$: \begin{align*} & \mathscr{G}_1 = \{A_1, A_2\}, \text{ where } A_1 = \{1, 2\}, A_2 = \{3, 4\}, \\ & \mathscr{G}_2 = \{B_1, B_2, B_3, B_4\}, \text{ where } B_i = \{i\}, i = 1, 2, 3, 4. \end{align*} Clearly $$\mathscr{G}_2$$ is a refinement of $$\mathscr{G}_1$$. Now define \begin{align*} & \epsilon = I_{A_1} - I_{A_2}, \\ & z = I_{A_1} + 4I_{A_2}, \\ & \eta = \frac{1}{4}I_{B_1} + \frac{3}{4}I_{B_2} + I_{B_3} + 3I_{B_4}. \end{align*} It is then easy to verify that $$\sigma(z) = \mathscr{G}_1 \subset \mathscr{G}_2 = \sigma(\eta)$$ and $$\sigma(z, \eta) = \sigma(\eta) = \mathscr{G}_2$$, whence $$E[\epsilon|z] = E[\epsilon |z, \eta] = E[\epsilon |\mathscr{G}_2]$$. On the other hand, clearly we have $$E[\epsilon] = P(A_1) - P(A_2) = 0$$ and \begin{align*} E[\epsilon | z] = E[\epsilon|A_1]I_{A_1} + E[\epsilon|A_2]I_{A_2} = I_{A_1} - I_{A_2} \neq 0. \end{align*}