google / CausalImpact

An R package for causal inference in time series
Apache License 2.0
1.71k stars 254 forks source link

Statistically Testing the post-period two series or testing the Difference equals zero #48

Closed aalsharef closed 3 years ago

aalsharef commented 3 years ago

Hello,

Thanks to the authors for making, sharing, and publishing this great package. My question is: after the intervention occurs and in the post-period window, we have two-time series:

  1. The time series after the intervention (The real data)
  2. The prediction time series data (Created by the library) predicting what would have happened if we didn't introduce the intervention.

My question is: Is there a statistical test to check and test whether the difference between these two-time series is statistically significant or not. In other words, the plot(impact) command would produce 3 plots (original, pointwise, and cumulative) is there a statistical test to test the hypothesis of whether the difference between the aforementioned two time series in the "pointwise" figure equals zero or not.

http://google.github.io/CausalImpact/CausalImpact.html

Thank you very much.

alhauser commented 3 years ago

This is exactly what the summary() method reports as the "Posterior prob. of a causal effect".