Time Series Causal Inference

Routing Summary

This folder covers Bayesian structural time-series models (BSTS) for inferring causal impact of interventions on time-series outcomes — the CausalImpact framework (Brodersen et al., Ann. Applied Stats. 2015). Contains 7 notes plus a State-Space and Kalman Filter sub-topic (the general filtering/smoothing machinery underlying BSTS).

Sub-topics

Sub-topicNotesCovers
State-Space and Kalman Filter5Linear-Gaussian state-space models, the Kalman filter (predict-update recursion), the RTS smoother, and the marginal likelihood via the prediction-error decomposition — Särkkä (2013). The general machinery underlying BSTS.

Concept Map

ConceptNoteTypeDepends OnKey Result
BSTS state-space modelBayesian Structural Time-Series ModeldefinitionEqs (2.1), (2.2): ; modular state components
Local linear trend + seasonalityLocal Linear Trend and SeasonalitydefinitionBayesian Structural Time-Series ModelEqs (2.3)-(2.5): stochastic level + slope; sum-to-zero seasonal
Spike-and-slab priorSpike-and-Slab Prior for Covariate SelectiondefinitionBayesian Structural Time-Series ModelEqs (2.8)-(2.12); automatic selection from controls
MCMC inferenceMCMC Inference for CausalImpactconceptLocal Linear Trend and Seasonality, Spike-and-Slab Prior for Covariate SelectionGibbs + Durbin-Koopman smoother; linear in , < 30s
Counterfactual impactCounterfactual Impact EstimationdefinitionMCMC Inference for CausalImpactEqs (2.15)-(2.17): ; cumulative; running average
Empirical applicationCausalImpact Empirical ApplicationexampleCounterfactual Impact Estimation22% lift [13%, 30%]; observational ≈ randomized; placebo = null

Concept Dependency Chain

Bayesian Structural Time-Series Model
  ├── Local Linear Trend and Seasonality (state components)
  │     └── trend: (2.3)-(2.4), seasonality: (2.5)
  ├── Spike-and-Slab Prior for Covariate Selection (variable selection)
  │     └── spike: (2.8)-(2.9), slab: (2.10)-(2.12), Zellner g-prior
  └── MCMC Inference for CausalImpact (Gibbs sampler)
        ├── Durbin-Koopman simulation smoother (state step)
        ├── Conjugate Gamma draws (variance step)
        └── Spike-slab Gibbs (variable selection step)
              └── Counterfactual Impact Estimation
                    ├── Pointwise impact: φ_t = y_t - ỹ_t (Eq 2.15)
                    ├── Cumulative impact: Σ φ_t (Eq 2.16)
                    └── Running average: (1/t-n) Σ φ_t (Eq 2.17)
                          └── CausalImpact Empirical Application
                                (advertising: 22% lift; placebo: null)

Notes

Sources

  • Differences-in-Differences — CausalImpact generalizes DiD to time series (DD = special case with zero-variance local level, static regression, OLS)
  • Counterfactual Inference — existing note on BART-based counterfactuals; CausalImpact is the time-series analog
  • MCMC Basics — foundational MCMC concepts (Gibbs sampler)
  • Synthetic Control — CausalImpact also generalizes SC by adding trend/seasonality and allowing negative weights