Math for Causal Inference
All simulators

Group-Time ATTs

Callaway–Sant'Anna cells, event-study aggregation, and the bias of static TWFE with dynamic effects.

Day 71: Heterogeneity-Robust DiD (Callaway–Sant'Anna, Sun–Abraham)
ATT(g, t) — cohort rows, period columns
g \ t123456789
30.0ref2.02.53.03.54.04.55.0
50.00.00.0ref2.02.53.03.54.0
70.00.00.00.00.0ref2.02.53.0
0240123456event time eθ(e)
overall ATT (cell average)
3.133
static TWFE
2.320
bias -0.813
event-study θ(e), robusteffect profile of the middle cohort

Three adoption cohorts (periods 3, 5, 7) and never-treated units. Each cell is a clean 2×2 DiD of a cohort against never-treated units relative to its own last pre-period: ATT(g, t). Grey cells are pre-treatment placebos. The event study averages cells with the same time since adoption; the TWFE coefficient (right) uses already-treated cohorts as controls and drifts away when effects grow or differ across cohorts.