Heterogeneous Treatment Effect Difference-in-Differences (HTE-DiD)

Statistics
Introduced by
Callaway & Sant'Anna; Sun & Abraham
Year
2021
Type
Causal inference / panel regression
Family
Quasi-experimental / causal inference

What does it do?

HTE-DiD extends the classic Difference-in-Differences estimator to settings where treatment effects vary across units, time periods, or treatment cohorts.

Developed formally by Callaway and Sant'Anna (2021) and Sun and Abraham (2021), it avoids the biases that arise when a conventional two-way fixed-effects regression is used with staggered adoption or effect heterogeneity, by estimating cohort-and-time-specific average treatment effects that can then be aggregated flexibly.

The intuition behind the method

In standard DiD, a single regression coefficient is taken to represent the treatment effect for everyone. If some units were treated earlier than others, or if the effect grows or fades over time, that single number is a weighted average that can mislead and, in some configurations, have the wrong sign. HTE-DiD instead estimates a separate effect for each combination of treatment cohort and calendar period, then builds summaries such as the overall average, the effect by time since treatment, or the effect by cohort. This keeps the core DiD comparison of changes across treated and untreated units while allowing the effect to differ across the population.

History

The problems with naive two-way fixed-effects DiD in staggered settings were documented by Goodman-Bacon (2021) and de Chaisemartin and D'Haultfoeuille (2020). Callaway and Sant'Anna (2021) and Sun and Abraham (2021) provided cohort-specific treatment effect estimators as alternatives. Their framework became a standard reference for applied researchers working with staggered rollouts and has been implemented in software packages.

When to use it

Use HTE-DiD when treatment is adopted at different times by different units (staggered rollout), when you suspect treatment effects vary across cohorts or change over time, or when two-way fixed-effects DiD may be biased because effects are heterogeneous. It requires panel or repeated cross-section data and several pre-treatment periods, so that parallel trends can be examined. Do not use HTE-DiD when all units are treated simultaneously and there is strong prior reason to expect homogeneous effects; classic DiD is sufficient and simpler to communicate in that case.

Limitations and considerations

  • Requires sufficient observations within each cohort-period cell; thin cells produce imprecise estimates and may prevent estimation for some cohorts.
  • More complex to implement and communicate than classic DiD; it requires dedicated software such as the csdid (Stata) or did (R) package.
  • The cohort-specific parallel-trends assumption cannot be tested in the post-treatment periods and must be defended on substantive grounds.
  • Identification also relies on no anticipation (outcomes do not respond before the treatment date) and on no interference across units (SUTVA). Violations of either bias the estimates.
  • Each cohort needs valid comparison units (never-treated or not-yet-treated) and enough pre-treatment periods within the estimation window; otherwise its effects cannot be estimated.
  • Aggregated summaries depend on the chosen weights; different aggregations can yield different effect sizes, so the choice should be motivated by theory rather than by which result looks strongest.
  • In designs with few cohorts or short panels, power is limited, and estimates for late cohorts may rest on few pre-treatment periods.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Avoids using already-treated units as controls, the source of negative weighting in two-way fixed-effects estimators.
  • Provides disaggregated cohort-and-time estimates that show how effects evolve and differ across groups, rather than averaging them into a single coefficient.
  • Supports flexible aggregation: researchers can report the overall ATT, dynamic effects relative to treatment date, or cohort-specific effects depending on their question.
  • The cohort-specific parallel-trends condition can be examined using pre-treatment estimates, making the identification strategy transparent and open to falsification.
  • Accommodates never-treated and not-yet-treated control units, using more of the available comparison variation.

Applications

  • Estimating the effect of a policy rolled out at different times across states, firms, or schools, where treatment timing varies.
  • Studying how the effect of a labour-market programme grows or decays in the months and years after treatment.
  • Evaluating health interventions adopted sequentially across hospitals or regions, where early adopters differ from late adopters.
  • Assessing the heterogeneous effects of minimum-wage increases across worker cohorts exposed at different periods.
  • Analysing the impact of financial regulations that took effect at different times across banks or markets.
  • Investigating how the benefits of a technology adoption programme differ between early-adopting and late-adopting firms.

How it works

How it works

1

Units are classified into cohorts based on when they first received treatment. Units that are never treated form the clean control group. This step matters because, in staggered designs, already-treated units must not serve as controls for later-treated units, which would contaminate the comparison.

Formula
G_i \in \{g_1, g_2, \ldots, \infty\}: \text{ cohort defined by first treatment period (}G_i=\infty\text{ if never treated)}
2

For each cohort g and calendar period t, the Cohort-Average Treatment effect on the Treated (CATT) compares the average outcome of cohort g at time t with what that cohort would have experienced had it never been treated. This counterfactual is estimated using never-treated or not-yet-treated units as controls, under the parallel-trends condition.

Formula
CATT(g,t) = E[Y_t(g) - Y_t(\infty) \mid G_i = g]
3

Individual CATTs are combined into aggregate summaries using weights chosen by the researcher, which must sum to one. Common aggregations are the simple average treatment effect, the dynamic effect by number of periods since treatment, and the cohort-specific average effect. The aggregation should match the substantive question and be specified before estimation.

Formula
\theta = \sum_{g,t} w(g,t)\, CATT(g,t), \quad \sum_{g,t} w(g,t) = 1
4

The identifying assumption is cohort-specific: in the absence of treatment, each cohort would have followed the same trend as the never-treated group. Pre-treatment periods allow this to be checked, but the post-treatment counterfactual trend cannot be observed and must be defended on substantive grounds.

Formula
E[Y_t(\infty) - Y_{t-1}(\infty) \mid G_i = g] = E[Y_t(\infty) - Y_{t-1}(\infty) \mid G_i = \infty]
5

A key design requirement is that the comparison group for each cohort consist only of never-treated or not-yet-treated units. Using already-treated units as controls contaminates the counterfactual. This is the mechanism behind the negative-weighting problem that Goodman-Bacon (2021) describes for two-way fixed-effects estimators.

Formula
\mathcal{C}(g,t) = \{ i : G_i = \infty \} \cup \{ i : G_i > t \}, \quad \text{already-treated units } (G_i \le t,\; G_i \ne g) \text{ are excluded}

Common pitfalls

  • Running a standard two-way fixed-effects regression with staggered adoption and reporting a single DiD coefficient. With heterogeneous effects this can be biased, and in some configurations it can have the wrong sign (Goodman-Bacon 2021).
  • Including already-treated units as controls for later-treated cohorts, which violates the clean-control requirement and contaminates the counterfactual.
  • Skipping pre-trend checks or examining only one or two pre-treatment lags. With staggered designs, parallel trends should be checked across all available pre-treatment periods for each cohort.
  • Choosing the aggregation weights after seeing results rather than specifying them in advance, which introduces researcher degrees of freedom.
  • Ignoring thin cohort-period cells. When a cell has very few observations, its estimate is unreliable and should be reported with caveats or excluded.

Frequently asked questions

Why can I not just run a two-way fixed-effects regression and report the interaction coefficient?

With staggered adoption and heterogeneous effects, the TWFE estimator implicitly uses already-treated units as controls for later-treated units and applies negative weights to some cohort-period effects. The result can be a misleading blend of effects, and in some configurations it can have the wrong sign. Goodman-Bacon (2021) documents this problem, and Callaway and Sant'Anna (2021) and Sun and Abraham (2021) propose estimators that avoid it.

What is a CATT and why does it matter?

A Cohort-Average Treatment effect on the Treated is the average effect for units that first received treatment in a specific period, evaluated at a specific calendar time. Callaway and Sant'Anna (2021) write this group-time effect as ATT(g,t); CATT is the label used in other work. Reporting these effects preserves the heterogeneity in the data and allows summaries that are directly interpretable, for example the average effect two periods after treatment across all cohorts.

Which units should serve as the control group?

Only never-treated units, or units that have not yet been treated as of the time period being compared. Already-treated units must be excluded from the control group for a given cohort, because their outcomes have already been affected by treatment and they no longer represent the untreated counterfactual.

How do I check the parallel-trends assumption in a staggered design?

Plot or report the pre-treatment estimates for each cohort. Estimates close to zero are consistent with parallel trends, but they do not prove it: pre-trend tests have limited power, so non-rejection is not confirmation. Report them alongside a sensitivity analysis, such as bounds on how large a violation would have to be to overturn the conclusions, and defend the assumption on substantive grounds.

What software is available for HTE-DiD?

The did package in R and csdid in Stata implement the Callaway-Sant'Anna estimator. The eventstudyinteract package in Stata implements the Sun-Abraham estimator.

Related methods

Sources

  1. Callaway, B., & Sant'Anna, P. H. C. (2021). Difference-in-Differences with multiple time periods. Journal of Econometrics, 225(2), 200-230.

    Open DOI reference
  2. Sun, L., & Abraham, S. (2021). Estimating dynamic treatment effects in event studies with heterogeneous treatment effects. Journal of Econometrics, 225(2), 175-199.

    Open DOI reference