What is CausalImpact and how does it work?
masterCausalImpact is an R package used for causal inference on time series data. It estimates the causal effect of a designed intervention (e.g., an advertising campaign) by using a Bayesian structural time-series model.
How it works
The package estimates how a response metric would have evolved after an intervention if the intervention had not occurred (the counterfactual). It does this by modeling the outcome time series using a set of control time series.
Key Assumptions
For valid conclusions, the following assumptions must hold:
- Control Series Integrity: The control time series used in the model must not have been affected by the intervention.
- Stable Relationship: The relationship between the treated series and the control series must remain stable during the post-intervention period.