jamalsenouci / causalimpact

Python port of CausalImpact R library
Apache License 2.0
277 stars 64 forks source link

Confidence Interval First Data Point #46

Open aristidesz opened 1 year ago

aristidesz commented 1 year ago

Just wondering why the point_pred lower and upper bounds are unusually large for the first data point. This happens even in the example while this is not the case with the R package.

e.g. from the example: Lower: -2804.815502 & Upper: 3048.805211

and the rest have more normal values.

Is there any way to fix this issue?

simon19891101 commented 8 months ago

I see the same. Looks like the author is aware of this so decided to plot from the second row. Would be much appreciated if you got time to look into this... @jamalsenouci

https://github.com/jamalsenouci/causalimpact/blob/8e9dd882a74bc1f4c4c2a514d7945606c816d51b/src/causalimpact/analysis.py#L876