# google/CausalImpact

An R package for causal inference in time series

Repository: https://github.com/google/CausalImpact
Canonical: https://ross.abutalabs.com/products/causalimpact
Language: R
License: Apache-2.0
License Family: permissive
Last push: 2026-03-31T04:46:51+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 75, release rhythm 35, longevity 100
- inputs: {"age_days": 4408, "days_push": 155, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1854, forks 264 (observed 2026-08-28T04:05:44.645268+00:00)

## What it is
CausalImpact is an R package for estimating the causal effect of a designed intervention on a time series using Bayesian structural time-series models. It estimates how a response metric would have evolved without the intervention, useful when randomized experiments are not available.

## Use cases
- measure the impact of an ad campaign on daily clicks
- estimate causal effect of a policy change on a time series
- run counterfactual analysis when no A/B test is possible
- analyze how a product launch affected website traffic
- estimate intervention effects using control time series
- quantify incremental impact of a marketing intervention

## When to choose
- you need to estimate causal effects on time series without a randomized experiment
- you have unaffected control time series to model the counterfactual
- you work in R and want a well-established, maintained package

## When to avoid
- you cannot identify control series unaffected by the intervention
- the relationship between treated and control series is unstable over the post-period
- you need a Python-native implementation (use TFP CausalImpact instead)

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, data-science, analytics
- domain: data-science, analytics, time-series
- platform: python
- tags: causal-inference, bayesian-structural-time-series, time-series, counterfactual-analysis, intervention-analysis, r-package, statistics, r

## Member repositories
- google/CausalImpact (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:44.645268+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:16:48.725481+00:00, confidence not recorded.
  - readme: https://github.com/google/CausalImpact (fetched 2026-08-28T04:05:44.645268+00:00, sha 72a797f60f6c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
