Tutorials › Econometrics (Graduate) › Imputation Estimation for Staggered Difference-in-Differences

Difference-in-Differences and Events · Tutorial 672 of 952

Imputation Estimation for Staggered Difference-in-Differences

Learn how to estimate staggered difference-in-differences effects by imputing treated units’ untreated outcomes and carrying the fitted-model uncertainty into inference.

Advanced 12 min read

What You'll Learn

  • Define untreated observations and the treated observations whose counterfactual outcomes must be imputed.
  • State the untreated-outcome model and the assumptions needed for its predictions to identify causal effects.
  • Estimate effects by comparing observed treated outcomes with fitted untreated-outcome predictions.
  • Aggregate imputed effects using weights that define a clear target population and time period.
  • Distinguish outcome variation from uncertainty in the estimated counterfactual model.
  • Recognize when fixed-effects support, serial dependence, or few treated clusters complicate inference.

Why Impute Untreated Outcomes?

With staggered adoption, different units begin treatment in different periods. Once a unit is treated, its observed outcome no longer reveals what would have happened to it untreated. Imputation estimation addresses this missing counterfactual directly: fit a model for untreated outcomes using observations that are untreated, predict the untreated outcomes for treated unit-periods, and compare those predictions with the observed outcomes.

The approach makes the source of identification visible. The causal comparison depends on the untreated-outcome model being appropriate for the treated observations, not on a single regression coefficient whose weighting may be difficult to interpret. It also permits treatment effects to vary across units and over time. The cost is that predictions rely on a specified model and on enough untreated data to estimate and apply it.

Definition: Let \(G_i\) be unit \(i\)'s first treatment period, with \(G_i=\infty\) for a never-treated unit. The treatment indicator is \(D_{it}=1\{t\geq G_i\}\). An observation is untreated when \(D_{it}=0\); it is treated when \(D_{it}=1\). Write \(Y_{it}(0)\) and \(Y_{it}(1)\) for the potential outcomes without and with treatment. The treatment effect for a treated unit-period is \(\tau_{it}=Y_{it}(1)-Y_{it}(0)\).

The Untreated-Outcome Model and Identification

A common imputation specification models the conditional mean of the untreated potential outcome as an additive unit and time component, optionally with covariates:

$$ Y_{it}(0)=\alpha_i+\lambda_t+X_{it}'\beta+\varepsilon_{it}, \qquad E[\varepsilon_{it}\mid \mathcal{F}]=0. $$

Here \(\alpha_i\) captures persistent differences across units, \(\lambda_t\) captures common period changes, \(X_{it}\) is a vector of covariates, and \(\mathcal{F}\) denotes the conditioning information used to specify the model, such as treatment timing and observed covariates. The fixed effects require a normalization for estimation, but predicted values do not depend on which equivalent normalization is chosen. A model may omit \(X_{it}\) when no covariates are included.

The equation is a restriction on untreated potential outcomes, not on observed outcomes after treatment. Estimate its parameters only from untreated observations: never-treated units and periods before a unit first receives treatment. Do not use treated outcomes to fit the untreated-outcome model, because treatment effects would then distort the predictions intended to represent no treatment.

For a causal interpretation, the untreated-outcome model must correctly describe the relevant conditional mean, and the untreated observations must provide support for estimating it and predicting the treated cells. In particular, a unit fixed effect cannot be estimated for a unit with no observed untreated period unless some additional structure supplies that information. There must also be no anticipation: before its treatment begins, a unit’s observed outcome follows its untreated potential outcome. Consistency and no interference are needed so observed outcomes correspond to the relevant potential outcomes and one unit’s treatment does not change another unit’s outcome. These conditions do not make treatment adoption random; they state what must hold for the model-based counterfactual comparison to be credible.

The causal assumption is stronger than merely fitting a regression well to the untreated sample. A good fit among untreated observations does not, by itself, establish that the model correctly predicts the untreated trajectory of treated units. That extrapolation is the key identifying step.

Estimation rule: Fit the specified untreated-outcome model using only observations with \(D_{it}=0\). For every treated observation, predict \(\widehat{Y}_{it}(0)\) from the fitted model and form the imputed effect \(\widehat{\tau}_{it}=Y_{it}-\widehat{Y}_{it}(0)\). The prediction estimates a conditional mean counterfactual; it does not recover the unit’s unobserved individual shock.

Worked Example: Predicting One Treated Unit’s Counterfactual

Worked Example: Predicting One Treated Unit’s Counterfactual

Consider hypothetical outcome data for three units over three periods. Unit A first receives treatment in period 2; units B and C are never treated. Suppose the untreated-outcome model is additive in unit and period effects, with no covariates.

UnitPeriod 0Period 1Period 2
A (treated from period 2)81015
B (never treated)101214
C (never treated)141618

Fit the model using A’s periods 0 and 1 and all periods for B and C. Each unit’s untreated outcome increases by 2 from period 0 to period 1. The never-treated units also each increase by 2 from period 1 to period 2. Thus the fitted common period change is 2 per period. A’s last untreated outcome is 10, so its predicted untreated outcome in period 2 is

$$ \widehat{Y}_{A,2}(0)=10+2+2=14. $$

The observed outcome is 15, giving the imputed effect

$$ \widehat{\tau}_{A,2}=Y_{A,2}-\widehat{Y}_{A,2}(0)=15-14=1. $$

The estimate is 1 outcome unit in period 2. It is not justified merely because A’s outcome rose from 10 to 15: the model attributes 4 units of that increase to the period change that would have occurred without treatment. The causal interpretation depends on the additive untreated-outcome model and its support, not on this arithmetic alone.

Aggregating Imputed Effects

An imputation procedure first produces treated-cell estimates. A single summary requires weights, and those weights determine the estimand. For a collection \(\mathcal{T}\) of treated unit-periods with nonnegative weights \(w_{it}\) that sum to 1, define

$$ \widehat{\tau}_{w} = \sum_{(i,t)\in\mathcal{T}} w_{it} \left[Y_{it}-\widehat{Y}_{it}(0)\right], \qquad \sum_{(i,t)\in\mathcal{T}} w_{it}=1. $$

Equal weights across treated observations estimate an average over those observations, so units observed treated for more periods contribute more. Equal weights across units instead give each unit the same total weight, which changes the target when treatment duration differs. Weights can also select a particular cohort or event time. Always state which cells are included and how they are weighted; an aggregate is not defined by the imputation step alone.

Worked Example: Choosing an Aggregation Target

Suppose a fitted untreated-outcome model gives the following hypothetical predictions. An early-adopting unit is treated in periods 1 and 2; a later-adopting unit is treated only in period 2.

Unit and periodObserved outcomePredicted untreated outcomeImputed effect
Early adopter, period 112102
Early adopter, period 215114
Later adopter, period 213121

For an equal-treated-cell-weight average over these three observations, each weight is \(1/3\):

$$ \widehat{\tau}_{\mathrm{cell}} = \frac{2+4+1}{3} = \frac{7}{3} \approx 2.333. $$

This is an average effect of about 2.333 outcome units per treated cell. It gives the early adopter two-thirds of the total weight because that unit contributes two treated cells. If the target is instead the average of the two units’ average effects, first average within each unit and then give the units equal weight:

$$ \widehat{\tau}_{\mathrm{unit}} = \frac{1}{2}\left(\frac{2+4}{2}+1\right) = \frac{1}{2}(3+1) = 2. $$

Both calculations are correct for their stated targets; they differ because the weighting differs. For period 2 alone, the two imputed effects are 4 and 1, so their equal-weight average is \((4+1)/2=2.5\) outcome units for that period’s treated observations.

Why Counterfactual Estimation Uncertainty Matters

An imputed effect contains uncertainty from two sources: the treated outcome and the fitted model used to predict its untreated counterfactual. Treating \(\widehat{Y}_{it}(0)\) as known would omit the second source and generally understate uncertainty. A useful derivation makes this explicit for a linear model with fixed design matrices and independent, homoskedastic errors. Let \(Z_0\) be the design matrix for untreated observations, \(Y_0\) their outcomes, and \(Z_1\) the design matrix for the treated cells being averaged. Let \(w\) contain the aggregation weights, and define \(c=Z_1'w\). With ordinary least squares,

$$ \widehat{\beta}=(Z_0'Z_0)^{-1}Z_0'Y_0, \qquad \widehat{\tau}_{w}=w'Y_1-c'\widehat{\beta}. $$

The second expression follows because the weighted average of the fitted counterfactuals is \(w'Z_1\widehat{\beta}=c'\widehat{\beta}\). If the treated-cell errors are independent of the errors used to fit the untreated model, then the two random components in this difference have zero covariance. When each error has variance \(\sigma^2\), the variance is

$$ \operatorname{Var}(\widehat{\tau}_{w}) = \sigma^2 w'w + \sigma^2 c'(Z_0'Z_0)^{-1}c. $$

The first term is variation in the treated outcomes; the second is uncertainty from estimating the counterfactual model. This formula is a justification under the stated simplified assumptions, not a universal standard-error recipe. Panel outcomes often have serial dependence within units, and treated outcomes can be correlated with untreated observations from the same units. In those settings, the covariance between the two components also matters.

In practice, use an inference procedure that matches the sampling and treatment-assignment structure. A common approach is a cluster-robust variance estimator at the level at which treatment is assigned, or a cluster bootstrap that resamples those units and refits the untreated-outcome model in every replication. The entire imputation-and-aggregation procedure must be repeated so that uncertainty in the fitted counterfactuals is included. With few treated clusters, conventional cluster-robust approximations can be unreliable; the number and distribution of treated clusters need to inform the choice and interpretation of inference.

Worked Example: Including Uncertainty in the Estimated Trend

Consider a hypothetical two-period panel with two treated units and three never-treated controls. For this illustration, let each unit’s outcome change be the post-period outcome minus the pre-period outcome. Assume untreated changes share a common mean \(\delta\), unit clusters are independent, and the variance calculation is the usual sample-variance approximation across clusters.

UnitPre-period outcomePost-period outcomeChange
Treated 120255
Treated 230366
Control 118202
Control 222253
Control 325294

The untreated trend is estimated using the control changes:

$$ \widehat{\delta}=\frac{2+3+4}{3}=3. $$

The two treated changes are 5 and 6. Subtracting the estimated untreated change gives imputed effects \(5-3=2\) and \(6-3=3\), whose average is

$$ \widehat{\tau}=\frac{2+3}{2}=2.5. $$

The sample variance of treated changes is \(\big[(5-5.5)^2+(6-5.5)^2\big]/(2-1)=0.5\). The sample variance of control changes is \(\big[(2-3)^2+(3-3)^2+(4-3)^2\big]/(3-1)=1\). The estimated variance of the difference in means, including uncertainty in the estimated control trend, is

$$ \widehat{\operatorname{Var}}(\widehat{\tau}) = \frac{0.5}{2}+\frac{1}{3} = 0.5833, \qquad \widehat{SE}(\widehat{\tau})=\sqrt{0.5833}\approx 0.7638. $$

The standard error is about 0.7638 outcome units. It includes variation in treated changes and uncertainty from estimating the untreated change using only three controls. This small example is not evidence that a normal approximation is accurate with so few clusters; it illustrates the uncertainty components, while reliable inference requires methods appropriate to the design and cluster count.

Practical Checks and Common Pitfalls

Before interpreting an imputation estimate, inspect which observations actually identify the untreated-outcome model. A model can be estimable overall yet fail to predict particular treated cells: for example, a treated unit with no untreated observations offers no direct information about its unit fixed effect. Covariate values or time patterns outside the untreated sample’s support also require extrapolation. Such cells should not be treated as automatically identified merely because software produces a fitted value.

A frequent error is to fit the untreated-outcome model using all observations, including treated outcomes, then describe the resulting fitted values as untreated counterfactuals. This can feed treatment effects into the prediction model and pull estimated effects toward zero or otherwise distort them. The correction is to fit the specified model on untreated observations only, predict counterfactuals for treated cells, and report the model and support assumptions that justify those predictions.

A second pitfall is to report an aggregate without defining its weights. Equal weight per treated observation, per unit, per cohort, or per event time can answer different questions. A third is to calculate uncertainty as though the fitted counterfactuals were fixed. Inference must reflect estimation of the untreated model and the dependence structure of the panel.

Key takeaway: Imputation estimation makes staggered difference-in-differences comparisons by learning an untreated-outcome model from untreated observations and comparing treated outcomes with its predictions. The resulting causal claim depends on the model’s validity and support; its uncertainty depends on both the treated outcomes and the estimated counterfactuals.

Check Your Understanding

Answer each question by identifying the model or estimand involved.

  1. Why should a treated observation not be used to fit the model intended to predict its untreated potential outcome?
  2. Under an additive unit-and-time fixed-effects model, what information is missing when a unit is treated in its first observed period?
  3. In the aggregation example, why does equal weighting of treated cells give the early adopter more total weight than the later adopter?
  4. Which two sources of uncertainty appear in the variance derivation, and why might their covariance matter in a panel?
  5. What does a good fit among untreated observations fail to establish about predictions for treated units?
Clinical Biostats