Causal inference - effect modifier I have a somewhat complicated DAG that looks like this:

where Y is the outcome variable. To give some context, X and Y could be two diseases with X being the precursor to disease Y. A is age, and B is treatment. Age affects both (1) how likely a person is to take the treatment, (2) how likely a person is to suffer from disease X, and (3) how likely disease X will progress to disease Y (an effect modifier). Treatment B affects both (1) how likely the person being treated will suffer from disease X and also (2) how likely disease X will progress to disease Y (an effect modifier).
The question I am interested in answering is (1) what is the effect of treatment B on the risk of getting disease X, and (2) how does treatment B affect the risk of disease X progressing into disease Y (the two red arrows).
What is the correct strategy in estimating these two effects?

I think you could equivalently just have the effect modifier arrows going straight into $Y.$ In any case, the age variable is a confounder for both of your questions, because it sets up a backdoor path from your cause to your effect. So you need to condition on age for both questions. You can do that in one of three ways:

*

*Stratify your analysis based on age.


*If you are in a linear regression setting, include age on the RHS.


*Use the backdoor formula.


*and 3. should be valid in most settings, 2. obviously only in a linear regression setting.
