Panel Data Causal Impact Analysis

Statistics
Introduced by
Brodersen et al. (2015); panel extension by Holtz et al. and subsequent literature
Year
2015 (base method); panel extension mid-2010s
Type
Bayesian structural time-series causal inference
Family
Quasi-experimental / causal inference

What does it do?

Panel data causal impact analysis extends the Bayesian structural time-series approach of Brodersen et al. (2015) to panels with several treated units, using untreated units as a donor pool for constructing counterfactuals.

For each treated unit and post-intervention period it yields an estimated effect with credible intervals, which can then be averaged across units and periods. Because the multi-unit specification varies between implementations (for example, whether treated units share parameters), the model used should be stated explicitly in any analysis.

The intuition behind the method

Consider an intervention rolled out in several regions at the same time, while other regions were not exposed. The question is what the treated regions would have looked like without the intervention. The method uses the observed outcomes of untreated control units, recorded over the same period, as predictors of the treated units' outcomes before the intervention. A Bayesian state-space model is fitted on that pre-intervention window and then projected into the post-intervention window to form a counterfactual trajectory. The gap between the observed outcome and this counterfactual is the estimated effect, and it can be examined over time and aggregated across treated units.

History

The base method is described by Brodersen, Gallusser, Koehler, Remy, and Scott (2015) in the Annals of Applied Statistics, and an open-source R package, CausalImpact, accompanies it. Multi-unit panel versions are adaptations of this single-series framework and differ in how they share information across treated units. The synthetic control design of Abadie, Diamond, and Hainmueller (2010) is a related but distinct approach for comparative case studies.

When to use it

Choose this method when an intervention affects several units at the same time, you have panel time-series data with a clear pre- and post-intervention window, and there is a set of untreated control units that were plausibly unaffected. It is most useful when individual treated units have too few observations for a reliable single-series analysis. The key assumptions are that control series are not affected by the intervention, that the relationship between treated and control series estimated before the intervention continues to hold afterwards, and that the intervention date is exogenous and fixed in advance. Do not use it when there is no clean intervention date, when the donor pool is small or poorly matched to the treated units, when the pre-intervention period is short relative to the seasonality and noise in the data, or when units follow very different dynamics that a shared specification would distort.

Limitations and considerations

  • A sufficiently long pre-intervention period is needed to estimate trend, seasonal and covariate components reliably; the required length depends on seasonality and noise, and placebo tests help judge whether it is adequate.
  • MCMC fitting across many treated units and time points can be computationally slow, and the sampler settings require checking.
  • The counterfactual is only as valid as the donor pool: control units with structurally different pre-period dynamics produce misleading counterfactuals and intervals.
  • Whether treated units share one model or each receives its own affects the estimates, so results depend on this choice and it should be reported.
  • The approach assumes the treated-control relationship is stable after the intervention; if it changes for reasons other than the intervention, the effect is misattributed.
  • Like other causal impact designs, the approach cannot handle spillovers from treated units to control units, which violate the stable unit treatment value assumption.

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

Strengths

  • The counterfactual is built from observed control series rather than from an assumed common trend, so the comparison rests on data from untreated units over the same period.
  • Local trend and seasonal components are modelled explicitly, which allows the counterfactual to follow structure in the outcome that a static regression would miss.
  • The fully Bayesian treatment gives credible intervals for the counterfactual and the effect, and it allows prior information on parameters to be incorporated.
  • Spike-and-slab priors on control-unit covariates perform automatic selection among donor units, which helps when many controls are available.
  • Pointwise effect trajectories show when an effect emerges and how it evolves, not only an overall average.

Applications

  • Estimating the effect of an online advertising campaign on outcomes such as search-related site visits, as in the original Brodersen et al. (2015) example, extended to several markets rolled out together.
  • Estimating the joint effect of a regulatory change that takes effect in several states or countries at the same time.
  • Evaluating public-health measures, such as mask mandates or vaccination drives, applied in multiple regions over the same period.
  • Measuring the effect of a product feature launched across several user segments or cohorts on engagement metrics.
  • Evaluating education or labour-market reforms implemented simultaneously in several provinces.

How it works

How it works

1

The analyst assembles a balanced or unbalanced panel with outcome y for N units over T time periods. The intervention date is fixed in advance, and N1 units are treated while N0 units serve as untreated controls. Pre-intervention observations for all units form the training window.

2

The counterfactual for each treated unit is predicted from the control units' series, which enter as covariates in a regression. In the Bayesian structural time-series form described by Brodersen et al. (2015), this regression is extended with a local-trend state, seasonal components, and covariate coefficients that can vary over time. The compact expression in the mechanics section is a simplified core (a regression plus a common time effect) and omits these components, so it should not be read as the full model.

Formula
\hat{y}_{it}^{(0)} = \mathbf{x}_{it}^{\top}\boldsymbol{\beta} + \mu_t + \varepsilon_{it}
3

The pointwise effect for each treated unit and post-period time point is the observed outcome minus the predicted counterfactual. The average across treated units at a given time follows the formula in the mechanics section. The cumulative effect is the sum of the pointwise effects over the post-period, and an average effect over treated units and post-period time points summarises the overall impact. These summaries are computed from each posterior draw, so they carry credible intervals.

Formula
\hat{\tau}_{it} = y_{it} - \hat{y}_{it}^{(0)},\quad \hat{\tau}_t = \frac{1}{N_1}\sum_{i \in \text{treated}} \hat{\tau}_{it}
4

Priors are placed on the model parameters, including the variance components of the local trend and seasonal terms and the coefficients on control-unit covariates. In the full Brodersen et al. (2015) model, spike-and-slab priors on the covariates allow the model to shrink the contribution of irrelevant control units toward zero, which limits overfitting when the donor pool is large relative to the pre-period length.

5

Posterior inference uses Markov chain Monte Carlo sampling, as in Brodersen et al. (2015), to draw from the posterior predictive distribution of the counterfactual. Applying the effect definitions to each draw gives credible intervals for the counterfactual, the pointwise effect and the cumulative effect. The posterior probability that the cumulative effect is positive is a Bayesian probability statement and should not be read as a frequentist p-value without separate validation.

Common pitfalls

  • Using control units that were partly affected by the same intervention can bias the estimated effect in either direction, depending on how the controls were affected.
  • Reporting only the pooled average across treated units can hide null or negative effects in individual units, so unit-specific effects should be checked.
  • Treating a high posterior probability of a positive effect as conclusive without placebo tests on pre-intervention windows.
  • Choosing the intervention date after inspecting the outcome trajectory invalidates the pre/post split and biases the credible intervals.

Frequently asked questions

How does this differ from running CausalImpact separately for each treated unit?

Separate models estimate each unit's counterfactual from its own pre-period and controls, and they do not share information across units. A panel specification can share parameters across treated units, which may stabilise estimates when individual pre-periods are short. Implementations differ, so the chosen specification should be stated explicitly.

How many pre-intervention time points are needed?

There is no universal number. The pre-period must be long enough for the model to learn trend and seasonal structure, so it depends on the seasonality and noise in the series. Short pre-periods generally lead to wide credible intervals, and placebo tests in the pre-period show whether the length is adequate.

What makes a good donor pool?

Control units should be plausibly unaffected by the intervention, share similar pre-intervention dynamics with the treated units, and come from the same population. A donor pool with structurally different trends undermines the counterfactual however sophisticated the model.

How should I validate the causal claim?

Conduct placebo tests by moving the intervention date into the pre-period and checking that the model finds no spurious effect. Also apply the model to control units that were known to be unaffected and confirm that the estimated effects are near zero.

Can I use this with an unbalanced panel?

Yes. Missing outcomes can be treated as missing in the state-space likelihood, which assumes that missingness is unrelated to the intervention. Large or systematic gaps, especially in the post-period or concentrated in treated units, should be examined before fitting.

Related methods

Sources

  1. Brodersen, K. H., Gallusser, F., Koehler, J., Remy, N., & Scott, S. L. (2015). Inferring causal impact using Bayesian structural time-series models. Annals of Applied Statistics, 9(1), 247-274.

    Open DOI reference
  2. Abadie, A., Diamond, A., & Hainmueller, J. (2010). Synthetic control methods for comparative case studies: Estimating the effect of California's tobacco control program. Journal of the American Statistical Association, 105(490), 493-505.

    Open DOI reference