What’s Trending in Difference-in-Differences? — An Intuitive Explainer

Companion to the reference note RothSantAnna2023-WhatsTrendingInDiD. This document is a teaching walkthrough: plain-language intuition first, the running Medicaid example throughout, and only the few equations that actually carry the argument.


TL;DR

Difference-in-differences (DiD) is one of the most popular tools in empirical economics, and between roughly 2018 and 2022 it got a flood of new methodological papers — on staggered timing, parallel-trends violations, and inference. Practitioners couldn’t keep up, and even experts struggled to see how the pieces fit. This paper is the map.

Its trick is simple and clarifying: write down one clean “canonical” DiD model, and then show that almost every recent paper is relaxing one piece of that canonical setup while keeping the rest. Once you see the literature this way, it stops being a dizzying pile of papers and becomes three tidy strands:

  1. Staggered timing — what breaks when units get treated at different times.
  2. Parallel-trends violations — what to do when the key assumption is shaky.
  3. Inference — getting standard errors right (few clusters, design-based).

The recurring moral: be explicit about your assumptions, your comparison group, your estimand, and your robustness checks — and match the estimator to the design.


The big idea: one model, relaxed three ways

Think of the canonical model as a tidy room with four things in it:

  • two time periods, a treated group and a comparison group;
  • Parallel-Trends (the groups would have moved together absent treatment);
  • No-Anticipation (no effect before treatment starts);
  • a clean sampling story (many independent clusters) for standard errors.

Each strand of the modern literature walks into that room and removes one piece, then asks “what still works, and what do we replace it with?” That’s the whole organizing principle. Keep it in mind and the rest of the paper — and the rest of the field — falls into place.

Running example (the paper’s own): states expanding Medicaid. Outcome = insurance coverage in state , year ; treatment = whether the state expanded Medicaid. We want the effect of expansion on coverage.


Part 0 — The canonical 2×2 model

Setup and the estimand

Two periods (). Treated states expand Medicaid between period 1 and 2; comparison states never expand. Using Potential-Outcomes, each state has a (what coverage would be with expansion) and (without). We only ever see one of them — the Fundamental-Problem-of-Causal-Inference.

The target is the ATT in period 2:

In words: among the states that actually expanded Medicaid, how much higher was their coverage than it would have been without expansion? The hard part is the second term — for treated states is never observed. We have to impute that missing counterfactual.

The two assumptions that make it work

Parallel Trends. Absent treatment, treated and comparison states’ average coverage would have changed by the same amount:

Crucially this allows selection on levels (expansion states can be richer, bluer, healthier to begin with) — it only forbids selection on trends. Any confounding must have a constant additive effect across the two periods.

No Anticipation. Treated states’ coverage in the pre-period isn’t already moving because expansion is coming: for treated units.

Identification: impute the counterfactual

Rearranging parallel trends and using no-anticipation gives the famous result — the ATT equals the difference of the two groups’ changes:

The intuition is worth saying slowly: take the treated group’s own pre-period level, then add on the comparison group’s change as the estimate of “what would have happened anyway.” Whatever extra movement the treated group shows on top of that is the treatment effect. That’s the entire DiD idea in one line.

In practice you run a two-way fixed effects (TWFE) regression , where exactly equals the DiD above, and you cluster standard errors at the level of the independent units (e.g. states). With many clusters, that’s valid inference. This is the room. Now we start removing furniture.


Strand 1 — Staggered timing (and why TWFE breaks)

The problem

Real policies roll out at different times: some states expanded Medicaid in 2014, others in 2015, others never. The natural instinct is to keep using TWFE — just a “static” version or a “dynamic” event-study version with leads and lags. Both can fail badly once treatment effects are heterogeneous (different across cohorts or growing over time — which is almost always).

Forbidden comparisons and negative weights

Here’s the heart of it. Goodman-Bacon (2021) showed that the TWFE coefficient is a weighted average of every possible 2×2 DiD you can form between pairs of units that did and didn’t switch. Most of those are fine: treated vs not-yet-treated. But some are “forbidden comparisons” that use an already-treated state as the control group.

Example: in 2016, a state that expanded Medicaid in 2014 gets used as a “control” for a state expanding in 2016. But the 2014 state’s outcome is already moving because of its own treatment effect. Using it as a clean baseline contaminates the comparison.

When effects grow over time, these forbidden comparisons get negative weights. The consequence is alarming: where the weights sum to 1 but some are negative. So you can have every state’s true effect be positive and yet the TWFE coefficient comes out negative — the “wrong sign.” Long-run effects are especially prone to negative weights.

A one-line mechanical intuition (via Frisch–Waugh–Lovell): TWFE effectively weights each observation by , where is predicted from the fixed effects. For an early-treated unit in a late period — where almost everyone is treated — that prediction can exceed 1, so a genuinely treated unit gets a negative weight. The “Negative-Weighting” problem in a nutshell.

The dynamic event-study spec has a second disease too: the lead (“pre-trend”) coefficients can be contaminated by post-treatment effects, so pre-trend tests built from staggered TWFE can reject even when parallel trends holds (and vice versa). Don’t trust them.

The fix: build from clean comparisons

The modern estimators all follow the same recipe as the original 2×2 DiD, just done carefully:

  1. Define a clean building block — the group-time ATT: , the effect at time for the cohort first treated at . (E.g. = effect in 2016 for states that expanded in 2014.)
  2. Identify each using only a clean control group — never-treated or not-yet-treated units — exactly like the 2×2 case.
  3. Aggregate the building blocks with weights the researcher chooses (e.g. by cohort size, or into an event-study profile), not weights OLS happens to pick.

Two big advantages over TWFE: it’s valid under arbitrary heterogeneity (no negative weights), and it’s transparent — you can see exactly which units serve as the control group.

The estimator menu (and how to choose)

EstimatorComparison groupPre-periods used
Callaway–Sant’Anna (CS)never- or not-yet-treatedthe last pre-period
Borusyak et al. / imputation (BJS)all not-yet-treated (TWFE on untreated cells)the average of all pre-periods
Sun–Abrahamnever- or last-treated cohortrelative-time (event study)
de Chaisemartin–D’Haultfœuillenot-yet-treated; handles on/off treatmentadjacent periods
Stacking (Cengiz et al.)matched clean controls per eventper-event baseline

The key tradeoff (cleanest in CS vs BJS): using more pre-periods (BJS) is more efficient but leans on parallel trends holding over a longer horizon, so it’s more biased if parallel trends only holds approximately. Using just the last pre-period (CS) is more robust to that but slightly less efficient.

Practical reassurance from the authors: these heterogeneity-robust estimators usually give similar answers. The first-order win is just to use any method that makes the target parameter and the comparison group explicit. Diagnosing TWFE’s bad weights (Goodman-Bacon decomposition, etc.) is useful, but eliminating the bad comparisons beats merely measuring them.


Parallel-Trends is an assumption about an unobservable counterfactual, so we should be nervous about it. Two reasons to worry, specifically: time-varying confounders (bluer states expand Medicaid and face different economic shocks), and functional form — parallel trends in levels generally won’t hold in logs, and it’s rarely obvious which is right.

Often parallel trends is more believable conditional on covariates (e.g. a state’s partisan lean): Conditional-Parallel-Trends. Within cells of , run DiD; then average up. But a warning: naively throwing into a TWFE regression does not consistently estimate the ATT under treatment effect heterogeneity. Use a method designed for it:

  • Regression adjustment — model the control group’s outcome change as a function of , predict the counterfactual for treated units.
  • Inverse probability weighting (IPW) — model the Propensity-Score and reweight (Abadie 2005).
  • Doubly-robust (DR) — combine both; consistent if either the outcome model or the propensity model is right (Sant’Anna–Zhao 2020). This is the recommended default, except under poor Overlap (propensity near 0/1), where regression adjustment is safer.

Plotting pre-treatment event-study coefficients and checking they’re “flat” is the standard plausibility check. It is not enough, for three reasons:

  1. Parallel pre-trends ≠ parallel post-trends. The authors’ vivid example: boys’ and girls’ average heights move in parallel until ~age 13, then diverge — but that doesn’t mean bar mitzvahs cause height. Flat pre-trends don’t guarantee the post-period assumption.
  2. Low power. A pre-trend big enough to seriously bias your estimate is often not statistically significant — these tests frequently miss real violations. In simulations calibrated to top journals, linear violations detected only ~50% of the time produced biases as large as the estimated effect itself. (Worse: a violation you catch only half the time still produces a spurious significant effect about half the time — ~10× the nominal 5%.)
  3. Pre-test bias. Conditioning your analysis on “passing” the pre-test selects your sample and can make the bias worse, not better.

See RothPretrends2022-PretestWithCaution. At minimum, report the power of your pre-test against economically relevant violations, not just its p-value.

Instead of pretending parallel trends holds exactly, Rambachan–Roth ask: how big would a violation have to be to overturn my conclusion? Let be the (unobserved) post-treatment violation and the (observed) pre-trend. Assume the post-violation is no larger than times the biggest pre-period violation:

Then construct confidence sets for the ATT that are valid under that restriction. Report the “breakdown” — the threshold at which your conclusion flips.

Reading it: “Medicaid expansion still significantly raised coverage unless post-expansion differential trends were more than twice as large as the biggest difference we saw before expansion.” That makes the robustness of the finding precise and arguable, instead of a binary “pre-trends looked fine.”

A nice feature, opposite to conventional tests: these confidence sets get wider when the pre-trend is noisily estimated — imprecision honestly costs you, rather than helping you “pass.” See RambachanRoth2023-MoreCredibleParallelTrends. A related idea is bracketing (Ye et al.): if two control groups are known to bound the treated group’s trend (e.g. a more- and a less-cyclical industry), the ATT is bounded between them.


Strand 3 — Inference and sampling

Few clusters

Standard clustered SEs assume many independent treated and control clusters. With, say, 3 treated states, the central limit theorem is a bad approximation — the cluster-level shocks don’t average out. Remedies all buy validity with extra assumptions:

  • Donald–Lang: Gaussian, homoskedastic cluster shocks → with df.
  • Conley–Taber: learn the error distribution from many control clusters (needs few treated, many control).
  • Cluster wild bootstrap: works in some small-cluster cases but needs homogeneity conditions that TWFE/heterogeneous effects often violate.
  • Permutation / Fisher Randomization Tests: assumption-free about outcomes, but assume random assignment and test the sharp null of no effect for anyone.

No free lunch — pick the homogeneity assumption most plausible in your context.

Design-based inference and the clustering rule

The canonical story imagines your 50 states were sampled from an infinite super-population — but what super-population? And at what level do you cluster? Design-Based-Inference sidesteps this: treat the units as fixed and the treatment assignment as the source of randomness (the Randomization view, extended to quasi-experiments by Rambachan–Roth and AtheyImbens2022-DesignBasedDiD).

The good news: methods valid under the sampling view are typically valid under the design view too. And it delivers a crisp, practical rule:

Cluster at the level at which treatment is independently assigned. If policy is set at the state level, cluster on state.


The practitioner checklist (Table 1, as a decision flow)

  1. Is everyone treated at the same time?
    • Yes (and balanced panel) → plain TWFE is fine and interpretable.
    • No → use a heterogeneity-robust estimator (Strand 1). Only use TWFE if you’re willing to assume effects are homogeneous.
  2. Are you sure parallel trends holds?
    • Yes → say why, and justify the functional form.
    • No → (a) consider conditioning on covariates; (b) plot an event study; (c) report power of the pre-test against relevant violations; (d) report a formal sensitivity analysis ( breakdown value).
  3. Many treated & control clusters from a super-population?
    • Yes → cluster-robust SEs at the assignment level.
    • Few treated clusters → use a small-cluster method (Strand 3).
    • Can’t imagine the super-population → go design-based.

Cheat-sheet: which package does what (Table 2)

NeedR / Stata packages
Heterogeneity-robust staggered estimatorsdid/csdid, did2s, didimputation, did_multiplegt, eventstudyinteract, fixest, staggered, stackedev
DiD with covariates (doubly-robust)DRDID/drdid
Diagnose TWFE bad weightsbacondecomp/ddtiming, TwoWayFEWeights
Honest sensitivity / pre-trend powerhonestDiD, pretrends

If you remember five things

  1. Canonical DiD = impute the counterfactual using the control group’s change, under parallel trends + no anticipation.
  2. Staggered TWFE makes forbidden comparisons → negative weights → possible wrong sign. Use a heterogeneity-robust estimator instead.
  3. Build from clean group-time ATT(g,t) and aggregate with your weights; the various modern estimators usually agree.
  4. Flat pre-trends ≠ valid design. Report power and a sensitivity breakdown, not just a pre-trends p-value.
  5. Cluster where treatment is assigned; go design-based when the super-population is unclear.

Connections