- Introduced by
- Kay H. Brodersen, Fabian Gallusser, Jim Koehler, Nicolas Remy, Steven L. Scott (Google)
- Year
- 2015
- Type
- Bayesian causal inference / counterfactual forecasting
- Family
- Quasi-experimental / causal inference
What does it do?
Causal Impact Analysis, introduced by Brodersen et al. (2015) at Google, uses Bayesian structural time-series models to estimate what would have happened to an outcome had an intervention never occurred.
By constructing a probabilistic counterfactual from pre-treatment data and control covariates, it quantifies point-in-time and cumulative treatment effects with full posterior uncertainty intervals.
The intuition behind the method
Imagine a product receives a marketing campaign and its daily sales spike. Was the spike caused by the campaign or would sales have risen anyway due to seasonal trends? Causal Impact fits a Bayesian time-series model to the pre-campaign period using related control series (e.g., sales of an unaffected product) as predictors. This model is then projected forward to produce a synthetic counterfactual — what sales would have looked like without the campaign. The difference between what actually happened and this synthetic baseline, together with its Bayesian credible interval, is the estimated causal effect.
History
Causal Impact was developed by Brodersen, Gallusser, Koehler, Remy and Scott at Google and published in the Annals of Applied Statistics in 2015. The method addressed the practical need to estimate the effect of online marketing interventions on aggregate time-series metrics where randomised control groups are unavailable. The original paper reports an application to the causal effect of an online advertising campaign on search-related site visits, and the CausalImpact R package provides an implementation of the approach.
When to use it
Use Causal Impact when you have a single treated unit observed as a time series, a clearly defined intervention date, and ideally at least one control covariate series that was not affected by the treatment (a related metric that was not exposed to the intervention). It is especially well-suited for digital marketing, product launches, and policy evaluations where the outcome is a time series and a randomised comparison is unavailable. The pre-intervention window should be long enough to capture the outcome's trend, its seasonality and its relationship with the controls; a short window yields a weakly identified model with wide credible intervals. Do not use it when the intervention affected all available control series (contamination), when the pre-intervention series is too short to calibrate the model, or when the assumption that controls are unaffected by the treatment cannot be defended.
Limitations and considerations
- Requires that control covariate series are genuinely unaffected by the intervention; if controls are contaminated, the counterfactual will absorb part of the treatment effect.
- A short pre-intervention window yields a poorly calibrated BSTS model, producing wide and unreliable credible intervals.
- As originally presented, the method targets one treated time series or an aggregate series; panels with several treated units adopted at different times fall outside its original scope.
- Model specification choices (trend type, seasonality, choice of covariates) can materially influence results and require substantive judgment.
- The counterfactual rests on the assumption that the outcome-control relationship and the trend would have continued unchanged absent the intervention; unmodelled concurrent events at the intervention date are attributed to the treatment.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Provides full posterior uncertainty quantification for pointwise and cumulative effects, rather than single-point estimates.
- Automatically constructs a synthetic counterfactual from multiple control covariates without requiring a matched control group of units.
- Handles complex time-series structure including local trends and seasonality via the BSTS framework.
- Targets a single treated series with a known intervention date, so it can be used where a design that compares many treated units with many comparison units is not available.
- A sparsity-inducing prior on the regression coefficients can shrink weakly supported control covariates toward zero, which helps guard against overfitting.
Applications
- Estimating the sales lift caused by a digital advertising campaign using unaffected product categories as controls.
- Evaluating the effect of a public health intervention (e.g., a vaccination rollout) on disease incidence when only aggregate national data are available.
- Measuring the impact of a software feature launch on a product engagement metric with pre-launch data as the baseline.
- Assessing whether a regulatory change affected a financial market index, using related indices as contemporaneous controls.
- Quantifying the effect of a news event or social media shock on brand sentiment or search volume over time.
How it works
How it works
A Bayesian structural time-series model is fitted to the pre-intervention outcome series. The trend μ_t has a level and a slope term δ_{t-1}, so it is a local linear trend rather than a level alone. The slope is itself a latent state that evolves over time, although its dynamics are not shown in the formula above. Seasonal components can also be added, although the formula omits them. The regression term x_t^T β uses contemporaneous control covariates. A sparsity-inducing prior on the regression coefficients shrinks weakly supported controls toward zero, which helps limit overfitting when many candidate controls are available.
Formula
y_t = \mu_t + x_t^\top \beta + \varepsilon_t, \quad \mu_t = \mu_{t-1} + \delta_{t-1} + \eta_tThe fitted BSTS model is used to forecast the outcome during the post-intervention period as if the intervention had not occurred. This counterfactual forecast, with its full posterior predictive distribution, represents the expected trajectory of the outcome under the no-treatment assumption, conditioned on the observed control covariates in the post period. The counterfactual is credible only if, absent the intervention, the relationship between the outcome and the controls estimated from the pre-period would have continued unchanged, and if no other event affecting the outcome occurred at the intervention date.
Formula
\hat{y}_t^{\text{cf}} = \mathbb{E}[y_t \mid x_t, \text{pre-treatment data}]The pointwise causal effect at each post-intervention time t is the difference between the observed outcome and the posterior counterfactual forecast. Summing these pointwise effects gives the cumulative causal impact. A posterior probability and a one-sided tail-area probability summarise whether the cumulative effect is inconsistent with no impact; these are Bayesian summaries and are not classical p-values.
Formula
\hat{\tau}_t = y_t - \hat{y}_t^{\text{cf}}, \quad \hat{\tau}_{\text{cumul}} = \sum_{t=T_0+1}^{T} \hat{\tau}_tCommon pitfalls
- Including control series that were themselves influenced by the intervention, which deflates the estimated effect by absorbing the causal signal into the counterfactual.
- Using a pre-intervention window too short to capture the outcome's trend, seasonality and relationship with the controls, which leaves the model weakly identified and the counterfactual unstable.
- Interpreting the posterior tail-area probability as a classical frequentist p-value; it is a Bayesian summary and should be reported with credible intervals.
- Assuming the structural relationship between the outcome and controls is stable across the intervention; if the intervention changed that relationship, the counterfactual is invalid.
- Skipping validation: interpreting post-intervention results without checking pre-period fit, placebo results and sensitivity to covariate and trend specification.
Frequently asked questions
How is Causal Impact different from Difference-in-Differences?
DiD compares average changes across a treatment group and a control group of units. Causal Impact works on a single treated time series and constructs a synthetic counterfactual from control covariate series using a Bayesian state-space model. Causal Impact also provides full posterior distributions rather than point estimates, and naturally accommodates trend and seasonality.
How long should the pre-intervention period be?
It should be long enough for the model to learn the outcome's trend, any seasonal pattern and its relationship with the control series. In practice this means covering several full cycles of any seasonality and a period over which the relationship with the controls is plausibly stable. A short pre-intervention window leaves the model weakly identified, and its credible intervals and counterfactual forecasts will be wide and unreliable. The adequacy of the window is best judged from pre-period fit and placebo analyses rather than from a fixed rule.
What if I have no control covariates?
The model can be fitted without control covariates, in which case the counterfactual relies only on the outcome's own trend (and any seasonal components) extrapolated forward. Without controls, any post-treatment shock unrelated to the intervention can masquerade as a treatment effect, making the assumption of a stable trend especially demanding.
What does the posterior probability reported by CausalImpact mean?
It is the posterior probability that the cumulative effect has the sign consistent with the direction of impact (e.g., positive). A high posterior probability, together with a credible interval that excludes zero, indicates evidence of a genuine effect. It is not a classical p-value and should not be treated as one.
Can Causal Impact handle seasonal data?
Yes. The BSTS model supports seasonal components, which are estimated from pre-intervention data and projected forward in the counterfactual. If your time series shows strong seasonality, specifying the seasonal structure correctly is important for a well-calibrated counterfactual.
Related methods
Sources
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 referenceCausalImpact. Wikipedia.
Open publication reference