# causal effect in linear causal model

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:

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.

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.

• 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. Jan 5 at 6:28
• Moreover, can you say something about combined effects? Jan 5 at 6:28
• 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. Jan 5 at 13:55
• As for combined effect, can you please define that term? Jan 5 at 13:55
• As combined effect I intend equations as last three in my question. Jan 5 at 14:14


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.$$

• Let me time to think better about your reply. In any case a big thank you! +1 Jan 5 at 20:00
• 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. Jan 5 at 20:03
• 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? Jan 6 at 11:01
• 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? Jan 6 at 15:36
• I don't expect nothing. This is just for become more confident with causal calculus. Jan 6 at 16:13