jtextor / dagitty

Graphical analysis of structural causal models / graphical causal models.
GNU General Public License v2.0
290 stars 46 forks source link

Question: How to represent an effect modifier? #100

Open AhmedThahir opened 6 days ago

AhmedThahir commented 6 days ago

From what I am aware, the correct way to represent an effect modifier is using 'arrow-on-arrow', as below:

image Source: https://pmc.ncbi.nlm.nih.gov/articles/PMC2235194/

However, I'm not able to do this in dagitty. Could you please advise on how to do the same?

malcolmbarrett commented 6 days ago

There is no "right way" to express interaction/effect modification because it's a matter of functional form. People have tried many ways of representing when they think there is such an interaction, the example you show being just one of them. None have taken off as "the" way. Often, in a causal structure, when there is not interaction on one scale (E.g., multiplicative), there is on another (e.g., additive)

That said, if you are an R user, you could represent this in ggdag with a little data manipulation by creating a fake node at the edge and then not visualizing it or using annotate() to stamp an arrow on the plot where you want it

AhmedThahir commented 6 days ago

Understood, thanks for the detailed explanation.

How does this affect the adjustment rules that are suggested by daggity?

malcolmbarrett commented 6 days ago

It doesn't unless you assume the two variables you think interact are joint causes (instead of the genuinely functional form case where there are differences across a treatment effect by a second variable, but you don't think it is causal).

In that case, you can treat them as multiple exposures.

AhmedThahir commented 6 days ago

Thank you!

Just to confirm, the adjustment rules for an Effect Modifier and a Secondary Exposure are the same, right? I've not been able to find a difference when I was learning.