I have the following linear causal model:

$B = \epsilon_B$

$C = \epsilon_C$

$A = \beta_1 B + \epsilon_A$

$Z = \beta_2 B + \beta_3 C + \epsilon_Z$

$D = \beta_4 C + \epsilon_D$

$X = \beta_5 A + \beta_6 Z + \epsilon_X$

$W = \beta_7 X + \epsilon_W$

$Y = \beta_8 W + \beta_9 Z + \beta_{10} D + e_Y$

all structural errors are independent each others. In terms of DAG the causal model is:

enter image description here

My questions are, how amount the following quantities?

$E[Y|do(X),B]$ (b-specific effect of $X$ on $Y$

$E[Y|do(X),C]$ (c-specific effect of $X$ on $Y$

$E[Y|do(X),Z]$ (z-specific effect of $X$ on $Y$

$E[Y|do(X),do(B)]$ (combined effect of $X$ and $B$ on $Y$)

$E[Y|do(X),do(C)]$ (combined effect of $X$ and $C$ on $Y$)

$E[Y|do(X),do(Z)]$ (combined effect of $X$ and $Z$ on $Y$)

Them should be expressed with structural coefficients, if any. Moreover should be explicitated the linear regressions needed for identified those effects/parameters, then the relations among structural and regression parameters involved.


2 Answers 2


Partial Solution:

According to Rule 2 on page 70 of Causal Inference in Statistics: A Primer, by Pearl, Glymour, and Jewell:

The $z$-specific effect $P(Y=y|\operatorname{do}(X=x), Z=z)$ is identified whenever we can measure a set $S$ of variables such that $S\cup Z$ satisfies the backdoor criterion. Moreover, the $z$-specific effect is given by the following adjustment formula \begin{align*} &\quad P(Y=y|\operatorname{do}(X=x),Z=z)\\ &=\sum_s P(Y=y|X=x,S=s,Z=z)\,P(S=s|Z=z). \end{align*} This modified adjustment formula is similar to Eq. (3.5) with two exceptions. First, the adjustment set is $S\cup Z,$ not just $S,$ and, second, the summation goes only over $S,$ not including $Z.$

Once you have the probability distribution computed, you can calculate the expected value with the usual formula: $$E[Y=y|\operatorname{do}(X=x),Z=z]=\sum_y y\cdot P(Y=y|\operatorname{do}(X=x),Z=z).$$

So here is a worked-out example: your first quantity. We must first find $$P(Y=y|\operatorname{do}(X=x),B=b).$$ The adjustment set $S$ must be one of the following: \begin{align*} S&=\{Z\}\\ S&=\{Z,C\}\\ S&=\{Z,D\}\\ S&=\{Z,C,D\}. \end{align*} We do not need to worry about the backdoor path starting with $A,$ because conditioning on $B$ already blocks it. That leaves the backdoor path beginning with $Z.$ You must condition on $Z,$ else the backdoor path $X\leftarrow Z\to Y$ is open. The reason just $\{Z\}$ can work is that $B$ is already conditioned on, blocking the collider that opens up at $Z$ when conditioning on it. Hence the probability distribution you can write as $$P(Y=y|\operatorname{do}(X=x),B=b)= \sum_z P(Y=y|X=x,B=b,Z=z)\,P(Z=z|B=b).$$ The expectation you would write in a $\operatorname{do}$-free fashion as $$E[Y=y|\operatorname{do}(X=x),B=b]= \sum_y y\cdot \sum_z P(Y=y|X=x,B=b,Z=z)\,P(Z=z|B=b).$$ The other cases can be worked out similarly. The reason I am calling this a partial solution is that I do not know how to express these probabilities in terms of the edge weights $\beta_i.$ But perhaps this partial solution will help. I will say this: if $Y\in\{0,1\},$ then you can dispense with the $y$-summation in the final expression.

  • $\begingroup$ Hi Adrian, I'm aware about the part of the book you cite. Actually probably you remember my related question too: stats.stackexchange.com/questions/523729/… However I'm interested in linear models and I have doubts precisely in the transformation of the above in rules about structural and regression coefficients. However I have two points about your answer too. You listed several possibility for the set $S$, can we sure that the specific effect remain unchanged for all of them? It seems be necessary but not self evident condition. $\endgroup$
    – markowitz
    Jan 5 at 6:28
  • $\begingroup$ Moreover, can you say something about combined effects? $\endgroup$
    – markowitz
    Jan 5 at 6:28
  • $\begingroup$ Study question 4.3.1 in the same book is an example of how to get a similar kind of expectation. I found that problem exceedingly difficult. It's certainly non-trivial to get such expectations in terms of edge weights. As for different $S$ possibilities, if the model is accurate, we can be confident that any set $S\cup B$ satisfying the backdoor criterion will yield the same result. The analogy in linear regression is that additional inconsequential variables to the RHS of a regression doesn't change the coefficients significantly. $\endgroup$ Jan 5 at 13:55
  • $\begingroup$ As for combined effect, can you please define that term? $\endgroup$ Jan 5 at 13:55
  • $\begingroup$ As combined effect I intend equations as last three in my question. $\endgroup$
    – markowitz
    Jan 5 at 14:14

$\newcommand{\eps}{\varepsilon}\newcommand{\doop}{\operatorname{do}}$My other answer has some value, I think, but rather than edit it, I think it might be better to simply add another answer. Let's take the Structural Equation Model (SEM): \begin{align*} B&=\eps_B\\ C&=\eps_C\\ A&=\beta_1B+\eps_A\\ Z&=\beta_2B+\beta_3C+\eps_Z\\ D&=\beta_4C+\eps_D\\ X&=\beta_5A+\beta_6Z+\eps_Z\\ W&=\beta_7X+\eps_W\\ Y&=\beta_8W+\beta_9Z+\beta_{10}D+\eps_Y. \end{align*} We take the first computation: $E[Y|\doop(X=x),B=b].$ As mentioned in my other answer, a sufficient set that satisfies the backdoor criterion in this case is $\{Z\},$ so that we must compute $E[Y|\doop(X=x),B=b,Z=z].$ The $\doop$ operator means that we replace the structural equation for $X$ with $X=x$ and substitute in everywhere: \begin{align*} B&=\eps_B\\ C&=\eps_C\\ A&=\beta_1B+\eps_A\\ Z&=\beta_2B+\beta_3C+\eps_Z\\ D&=\beta_4C+\eps_D\\ X&=x\\ W&=\beta_7x+\eps_W\\ Y&=\beta_8W+\beta_9Z+\beta_{10}D+\eps_Y. \end{align*} With a conditional like $B=b$ or $Z=z,$ while we replace the variable, we don't delete the equation. So, to compute: \begin{align*} E[Y|\doop(X=x),B=b,Z=z] &=\beta_8E[W|\doop(X=x),B=b,Z=z]\\ &\quad+\beta_9E[Z|\doop(X=x),B=b,Z=z]\\ &\quad+\beta_{10}E[D|\doop(X=x),B=b,Z=z]+0\\ &=\beta_8\beta_7x+\beta_9z+\beta_{10}E[D|\doop(X=x),B=b,Z=z]. \end{align*} Now this last expression is what we must work on. For $Z$ to equal $z,$ (and since this is not the $\doop,$ we do not delete the equation for $Z$) we must have \begin{align*} z&=\beta_2b+\beta_3C\\ C&=\frac{z-\beta_2b}{\beta_3}, \end{align*} which forces $$E[D]=\beta_4\cdot \frac{z-\beta_2b}{\beta_3}.$$ Hence $$E[Y|\doop(X=x),B=b,Z=z]=\beta_8\beta_7x+\beta_9z+\beta_{10}\beta_4\, \frac{z-\beta_2b}{\beta_3}.$$ For the $c$-specific effect, the computations will be similar. For the $z$-specific effect, one "gotcha" is that you will need to condition on either $A,B,C,$ or $D$ to block the backdoor path $X\leftarrow A\leftarrow B\to Z\leftarrow C\to D\to Y,$ which is opened up because of conditioning on $Z.$

For a combined effect computation, the work is actually easier in some ways. Let's take $E[Y|\doop(X=x),\doop(B=b)].$ The difference between this and the conditioned version $E[Y|\doop(X=x),B=b]$ is that in the $\doop$ version, we replace $B=\eps_B$ with $B=b$ and substitute $b$ for $B$ everywhere in the SEM, thus: \begin{align*} B&=b\\ C&=\eps_C\\ A&=\beta_1b+\eps_A\\ Z&=\beta_2b+\beta_3C+\eps_Z\\ D&=\beta_4C+\eps_D\\ X&=x\\ W&=\beta_7x+\eps_W\\ Y&=\beta_8W+\beta_9Z+\beta_{10}D+\eps_Y. \end{align*} The result should be $$E[Y|\doop(X=x),\doop(B=b)]=\beta_8\beta_7x+\beta_9\beta_2b.$$

  • $\begingroup$ Let me time to think better about your reply. In any case a big thank you! +1 $\endgroup$
    – markowitz
    Jan 5 at 20:00
  • $\begingroup$ Please do! I've also asked Noah to review my solution: I'm not entirely sure about its methodology, though I think it's reasonable. $\endgroup$ Jan 5 at 20:03
  • 1
    $\begingroup$ From your last equation I understand that $E[Y|do(X,B)] \neq E[Y|do(X)] + E[Y|do(B)]$ because It seems me that $E[Y|do(B)] = (\beta_2 \beta_6 \beta_7 \beta_8 + \beta_2 \beta_9 + \beta_1 \beta_5 \beta_7 \beta_8) b$. It is correct? $\endgroup$
    – markowitz
    Jan 6 at 11:01
  • $\begingroup$ I get the same result as your $E[Y|do(B)],$ so I would agree with your conclusion. I'm not sure I would have expected $E[Y|do(X,b)]=E[Y|do(X)]+E[Y|do(B)],$ though. Why would you expect that to hold? $\endgroup$ Jan 6 at 15:36
  • 1
    $\begingroup$ I don't expect nothing. This is just for become more confident with causal calculus. $\endgroup$
    – markowitz
    Jan 6 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.