Fig. 4: DAG and plots of DiD. | Nature Computational Science

Fig. 4: DAG and plots of DiD.

From: Quantifying causality in data science with quasi-experiments

Fig. 4

a, Graphical representation of DiD, where both the control and treated groups are affected by the confounder Z1, but the difference of their differences pre- and post-treatment yield unbiased estimates of the outcome Y. An appropriate control group must be chosen such that any confounders affect both groups (the crossed edge of Z2 affecting only the treated group would be a violation of this). b, Scatterplot of outcomes Y for both the treated group (orange) and the control group (blue) over time in simulated data where parallel trends holds, with a treatment X being applied (dashed) to the treated group. c, Scatterplot of outcomes Y for both the treated group (orange) and the control group (blue) over time in simulated data where the parallel trends assumption is violated.

Back to article page