- Introduced by
- Callaway & Sant'Anna; Sun & Abraham; Roth et al. (synthesised 2021-2023)
- Year
- 2021-2023
- Type
- Causal inference / panel regression
- Family
- Quasi-experimental / causal inference
What does it do?
Robust Difference-in-Differences is a family of modern DiD estimators designed to remain valid when treatment timing is staggered across units and treatment effects vary over time or across groups.
Classical two-way fixed-effects (TWFE) DiD can be biased in such settings. Robust variants estimate group-time average treatment effects (ATTs) separately for each treatment cohort and period, then aggregate them with explicit weights.
The intuition behind the method
In the classic DiD setup, a single interaction coefficient is assumed to summarise the treatment effect for every unit at every point in time. When units adopt treatment at different dates, or when the effect changes after adoption, that coefficient is a weighted average of many heterogeneous effects, and some of those weights can be negative. Treated units from early cohorts can then act as controls for later cohorts, so the comparison is contaminated and the estimate can be biased or have the wrong sign. Robust DiD addresses this by first estimating the effect for each cohort-by-period cell using only clean comparators, namely units that are not yet treated or never treated, and then aggregating those cell estimates with weights the researcher chooses.
History
The bias of TWFE DiD under staggered adoption was a central issue in the work of Callaway and Sant'Anna (2021), who proposed cohort-time ATT estimators that use only not-yet-treated and never-treated comparison units. Roth, Sant'Anna, Bilinski and Poe (2023) synthesised this literature and placed these methods within a common framework.
When to use it
Use robust DiD when treatment is staggered, meaning units adopt the policy at different times, or when you suspect that treatment effects differ across cohorts or change over time after adoption. It is the appropriate alternative to TWFE DiD whenever the data contain multiple treatment cohorts. It requires panel data, or repeated cross-sections, with pre-treatment observations for each cohort. Do not use it when all units are treated in a single period, where the classical DiD comparison is sufficient, and do not use it when no panel or repeated structure is available.
Limitations and considerations
- Each cohort-period cell needs enough observations; thin cells give imprecise ATT estimates, and the aggregate can be dominated by noisy cells.
- The comparison group must be large enough to act as valid controls. Designs with few never-treated or not-yet-treated units lose precision quickly.
- Parallel trends is imposed for each cohort against its own comparison group, so the assumption has to be stated and defended cohort by cohort, possibly conditional on covariates.
- Implementation is more involved than TWFE and generally requires dedicated software packages rather than a standard two-way fixed-effects regression.
- When the treatment effect is genuinely homogeneous and adoption is simultaneous, robust DiD gives essentially the same answer as classical DiD and adds complexity without benefit.
- Identification also depends on no anticipation and overlap. If units change behaviour before the official adoption date, pre-period cells absorb that response and the diagnostic loses its meaning; where propensity scores approach 0 or 1, the weighting becomes unstable.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Avoids the negative-weighting problem of TWFE, which can produce sign-reversed estimates when treatment effects are heterogeneous.
- Estimates can be read as explicitly weighted averages of cohort-specific causal effects, with the weights chosen by the researcher.
- The Callaway and Sant'Anna cell estimator is doubly robust, so it remains consistent if either the outcome model or the propensity-score model is correctly specified.
- Event-study plots of the pre-period ATT(g, t) cells give a visual diagnostic of the parallel-trends assumption; flat pre-period cells are consistent with parallel trends but do not prove it.
- Flexible aggregation lets researchers answer different policy questions, such as the average effect, the dynamic profile, or group-specific effects, from the same set of cell estimates.
Applications
- Evaluating minimum-wage, tax, or labour-market reforms that took effect in different states or countries at different times.
- Assessing the staggered rollout of public-health interventions such as vaccination programmes or smoking bans.
- Measuring the effects of banking regulation, environmental policy, or education reforms adopted sequentially by jurisdictions.
- Studying firm-level outcomes, such as investment or employment, after staggered adoption of a technology or subsidy.
- Political science applications such as the staggered enfranchisement of voters or the sequential adoption of electoral rules.
How it works
How it works
Define ATT(g, t) as the average treatment effect for units first treated in period g, measured at calendar time t. Callaway and Sant'Anna show that each ATT(g, t) is identified under a parallel-trends condition, which may hold conditional on covariates, and they propose a doubly robust estimator for each cell. Identification also requires no anticipation, so that outcomes do not respond before the treatment date, and overlap, so that propensity scores are bounded away from 0 and 1 within each cohort-period comparison.
Formula
ATT(g,t) = E[Y_t(g) - Y_t(\infty) \mid G_i = g]
For each cohort g, valid comparison units at time t are those not yet treated at t, which includes never-treated units. Including already-treated units as controls, as TWFE implicitly does, is a main source of bias in staggered designs, so robust methods leave them out of each cohort's comparison.
After all ATT(g, t) cells are estimated, they are combined with non-negative weights w(g, t) that the researcher selects to match a stated policy question, such as a simple average effect, an event-time profile, or a group-specific effect. Because the weights are explicit, the summary can be read directly, unlike the implicit weighting in TWFE.
Formula
\hat{\theta} = \sum_{g} \sum_{t \ge g} w(g,t)\, \widehat{ATT}(g,t)Pre-treatment cells, ATT(g, t) for t < g, should be close to zero if parallel trends holds, so they serve as a diagnostic. Plotting them in an event-study figure is the standard way to inspect pre-trends. If pre-period estimates deviate from zero, the parallel-trends assumption is in doubt, and sensitivity analysis or a conditional parallel-trends specification should be considered.
Standard errors are commonly computed with a cluster-robust variance estimator, clustering at the level at which treatment is assigned (for example, county or firm). Cluster-robust standard errors are reliable only when the number of clusters is large; with few clusters they can be too small and overstate precision. Report the number of clusters alongside the estimate and, when clusters are few, consider a wild-cluster bootstrap. Confidence intervals should be built for the aggregated parameter that is actually reported.
Common pitfalls
- Running TWFE with staggered adoption and reading the interaction coefficient as the causal effect. This is the main error that robust DiD corrects.
- Using already-treated units as controls for later cohorts, which reintroduces the contamination that biases TWFE.
- Choosing aggregation weights after seeing the results so that the summary looks significant, rather than fixing the policy-relevant estimand in advance.
- Ignoring thin cohort-period cells whose ATT(g, t) estimates have high variance, which can distort the aggregate even when all weights are non-negative.
- Reporting only the aggregate estimate without the event-study plot of pre-period cells, so that readers cannot judge whether pre-trends are flat.
Frequently asked questions
Why is classical two-way fixed-effects DiD biased with staggered adoption?
TWFE uses all available control units for each treated cohort, including units that were already treated in earlier periods. Early-treated units therefore serve as controls for later-treated units, but they are themselves affected by treatment, so the control group is contaminated. When treatment effects vary across cohorts or over time, this produces comparisons with negative weights, which can bias the aggregate estimate or reverse its sign.
What is the Callaway–Sant'Anna estimator?
It is a doubly robust estimator of ATT(g, t), the average treatment effect for cohort g at time t, that uses only not-yet-treated or never-treated units as the comparison group. It combines an outcome regression and a propensity-score model, so it is protected against misspecification of either component. The cohort-time estimates are then aggregated using user-specified non-negative weights.
How do I choose between the never-treated and not-yet-treated comparison group?
If a substantial never-treated group exists, it is the cleanest option, because those units are never exposed to treatment. The not-yet-treated group adds observations and can improve precision, but it is valid only if the timing of adoption is unrelated to the outcome trends that would have occurred without treatment. In many panel datasets almost every unit is eventually treated, so the not-yet-treated option is often the only one available.
Can I apply robust DiD in a setting with a single treatment date?
Yes, but in that case it reduces to the classical DiD comparison. The robust machinery matters most when treatment is staggered. With one simultaneous treatment date, the extra complexity is not needed.
Which software implements robust DiD?
The did package for R implements the Callaway and Sant'Anna estimator, and Stata users can find implementations of the same approach. Other estimators in this family are implemented in separate packages, so check each package's documentation for the estimator it actually computes. Implementations also differ in default choices such as the comparison group and the variance method, so compare results across software only after aligning these options.
Related methods
Sources
Callaway, B., & Sant'Anna, P. H. C. (2021). Difference-in-differences with multiple time periods. Journal of Econometrics, 225(2), 200-230.
Open DOI referenceRoth, J., Sant'Anna, P. H. C., Bilinski, A., & Poe, J. (2023). What's trending in difference-in-differences? A synthesis of the recent econometrics literature. Journal of Econometrics, 235(2), 2218-2244.
Open DOI reference