---
title: Stacked DiD Event Study Methodology
url: https://www.emergentmind.com/topics/stacked-did-event-study
type: topic
---

# Stacked DiD Event Study Methodology

A stacked Difference-in-Differences (DiD) event study is a methodological framework for estimating intertemporal treatment effects in panel data settings where treatment timing is staggered, treatment may be non-binary or non-absorbing, and outcomes may exhibit dynamic or lagged effects. It addresses limitations of conventional two-way fixed-effects (TWFE) and local projection estimators by constructing cohort-specific 2×2 DiD contrasts and aggregating these with transparent weighting, thereby yielding estimators with robust causal interpretation under clear parallel-trends assumptions.

## 1. Model Setup and Potential Outcomes

The stacked DiD event study requires panel data $\{(Y_{i,t}, D_{i,t}): i=1,\ldots,N;\; t=1,\ldots,T\}$, where $D_{i,t}$ is a possibly multi-level or non-absorbing treatment. The potential outcome framework defines $Y_{i,t}(d_{1},\ldots,d_{T})$ as the outcome for unit $i$ under treatment path $(d_{1},\ldots,d_{T})$, with observed $Y_{i,t}=Y_{i,t}(D_{i,1},\ldots,D_{i,T})$. Treatment need not be binary or permanent; $D_{i,t}$ can vary in $\mathbb{R}^+$.

The no-anticipation assumption states that $Y_{i,t}(d_{1},\ldots,d_{T}) = Y_{i,t}(d_{1},\ldots,d_{t})$, i.e., potential outcomes at time $t$ depend only on treatment up to that period. The key identifying assumption is parallel trends for the status-quo outcome: for any two units $i,j$ with the same baseline dose $D_{i,1}=D_{j,1}$,
\[
\mathbb{E}\left[Y_{i,t}(SQ\text{-}path_i^t)-Y_{i,t-1}(SQ\text{-}path_i^{t-1})\right] = \mathbb{E}\left[Y_{j,t}(SQ\text{-}path_j^t)-Y_{j,t-1}(SQ\text{-}path_j^{t-1})\right]
\]
for all $t$, where $SQ$-path denotes the status-quo (no-switch) path.

## 2. Event Time, Cohort Structure, and Data Stacking

Let $G_i = \min\{t \ge 2: D_{i,t} \ne D_{i,t-1}\}$, the first period when unit $i$'s treatment changes. Event time for unit $i$ is defined by $\ell = t-(G_i-1)$, with $\ell=1$ indicating the first post-switch period. Each value of $G_i$ defines a cohort; stacking converts all cohort's calendar dates to event time indexed by $\ell$.

Stacking constructs a pooled dataset for estimation by realigning the time axis of observations based on treatment adoption events rather than calendar time. This enables the comparison of pre- and post-treatment outcomes across units with different treatment timings, supporting dynamic effect estimation.

## 3. Stacked DiD Event-Study Estimator Construction

For each unit $i$ and event time $\ell$, define:
- $Y_{i,\text{pre}} = Y_{i,G_i-1}$, $Y_{i,\text{post}} = Y_{i,G_i-1+\ell}$
- $S_i = \text{sign}(D_{i,G_i}-D_{i,1})$
- The control pool consists of all $j$ with $D_{j,1}=D_{i,1}$ and $G_j > G_i-1+\ell$.

The unit-level DiD is:
\[
\mathrm{DID}_{i,\ell} = [Y_{i,\text{post}} - Y_{i,\text{pre}}] - \mathbb{E}_{j \in \text{pool}}[Y_{j,\text{post}} - Y_{j,\text{pre}}]
\]
Aggregating over all eligible units at event time $\ell$:
\[
\hat{\delta}_\ell = \frac{1}{N_\ell} \sum_{i:G_i \le T-(\ell-1)} S_i \cdot \mathrm{DID}_{i,\ell}
\]
Under the maintained assumptions, $\hat{\delta}_\ell$ identifies the average effect of $\ell$ periods of exposure to a non-baseline treatment.

## 4. Extensions: Normalization, Weighting, and Covariate Balancing

When treatment is non-binary, normalization is required for interpretable effect scaling:
\[
\Delta D_{i,\ell} = \sum_{k=0}^{\ell-1} (D_{i,G_i+k} - D_{i,1})
\]
The normalized effect at $(i,\ell)$:
\[
\delta^n_{i,\ell} = \delta_{i,\ell} / \Delta D_{i,\ell}
\]
Aggregated as
\[
\hat{\delta}^n_\ell = \hat{\delta}_\ell / \Delta D_\ell
\]
where $\Delta D_\ell$ is the mean absolute increment.

Recent refinements address covariate imbalance between treated and controls within sub-experiments. The Covariate-Balanced Weighted Stacked DiD (CBWSDID) estimator implements initial matching or weighting (e.g., propensity scores, entropy balancing, or nearest-neighbor matching) within each cohort-event-time stratum, followed by corrective reweighting across sub-experiments to ensure that the final estimator targets the aggregate ATT under covariate-conditional parallel trends [2604.02293].

## 5. Comparison to Other Event-Study Estimators

TWFE event-study estimators, based on group and time fixed effects plus event-time dummies, can produce biased or misleading estimates in the presence of heterogeneous treatment effects, as their weights on dynamic causal effects can be negative or non-convex [2007.04267]. Panel-data local projections (regressions of $Y_{i,t+\ell}$ on $D_{i,t}$ plus FEs) similarly mix effects across event times and can also yield contaminated or attenuated coefficients.

Stacked DiD event studies maintain clear causal interpretation by contrasting each post-treatment period with only not-yet-treated synthetic controls, ensuring identification robustness. They also permit explicit organization of placebo checks (using pre-event leads) to test for parallel pre-trends.

Efficient extensions utilize semiparametric influence functions and optimal weighting for variance minimization, leveraging overidentifying moment restrictions and achieving the semiparametric efficiency bound under regularity conditions [2506.17729]. Imputation-based estimators further recast the event-study as estimating the difference between actual and counterfactual outcomes predicted from untreated samples with unit and time fixed effects [2108.12419].

## 6. Implementation, Inference, and Diagnostic Procedures

A typical implementation comprises:
1. Calculation of cohort indicators ($G_i$), event times ($\ell$), construction of treated and control samples in the event window.
2. Estimation of cohort-event-time DiD contrasts, with optional normalization or covariate balancing.
3. Aggregation with appropriately derived weights, possibly including CBWSDID corrective weights.
4. Inference via cluster-robust or bootstrap standard errors. Analytic variance estimators based on influence functions and multiplier bootstrapping for simultaneous/confidence bands are now standard [2604.27035].
5. Placebo tests/exclusionary pre-trend regressions, often fitting robust OLS models on untreated samples and, if required, leave-one-out variance estimation for conservative coverage [2108.12419].

Empirical applications frequently compare stacked DiD estimators to conventional TWFE, weighted or matched panel matching, and local-projection methods, typically demonstrating reduced bias, recovery of dynamic ATT, and credible inference even under deviations from strong parallel trends.

## 7. Applications, Extensions, and Simulation Evidence

Stacked DiD event-study methods have been applied across policy evaluation, labor, macro, and environmental economics. For repeated treatment settings, extensions allow for absorbing and non-absorbing (switching on/off) episodes, under finite-memory assumptions and episode-specific parallel trends [2604.02293]. Simulations consistently reveal that design-based covariate adjustment, coupled with corrective weighting, can eliminate pre-trend bias and restore uniform coverage for long-run effects.

Available software (e.g., `cbwsdid` in R) streamlines implementation of these estimators and supports design diagnostics. Empirical results confirm substantial improvements in bias, precision, and pre-trend control relative to unadjusted or TWFE approaches, especially when parallel trends are only plausible after covariate adjustment or matching [2604.02293].

Source: https://www.emergentmind.com/topics/stacked-did-event-study