liveBook · Manning

CausalImpact

As explained in Causal Inference for Data Science

The CausalImpact function is an R function that estimates an intervention's effect from pre-event and post-event time-series data.

CausalImpact estimates an intervention’s effect by comparing observed post-event outcomes with a model-based counterfactual prediction of what would have happened without the event. section 11.3.6

The result reports:

  • Actual and predicted values for the selected post-treatment period. section 11.3.6
  • Absolute and relative effects, with average and cumulative summaries. section 11.3.6
  • Confidence intervals and plots showing pointwise and accumulated differences. section 11.3.6

R analysis

Choose pre- and post-treatment periods, then run `CausalImpact(df, pre.period, post.period)`. Evaluating the complete post-event period estimates an absolute effect of 443, with a confidence interval of 197 to 700 in the synthetic example. section 11.3.6

How Causal Inference for Data Science covers it

How deep it goes
Explains period selection, outputs, plots, and confidence intervals, but defers model validation after treatment.
Examples
Uses a synthetic dataset, whole-period R analysis, event-time-only analysis, and diagnostic plots.
What it assumes
Assumes stable relationships between the outcome and controls during the evaluation period.
What you can do after
Apply it via R to estimate average, cumulative, absolute, and relative intervention effects.
How it connects
Connects counterfactual prediction, treatment effects, confidence intervals, and time-series evaluation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal Inference for Data Science. The section links point to the parts of the book it draws on.