jamalsenouci / causalimpact

Python port of CausalImpact R library
Apache License 2.0
262 stars 62 forks source link

Confidence Interval First Data Point #46

Open aristidesz opened 10 months ago

aristidesz commented 10 months 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 4 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