jamalsenouci / causalimpact

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

Fix the report summary when p>alpha #51

Closed simon19891101 closed 2 months ago

simon19891101 commented 3 months ago

Issue

At the moment, the report summary doesn't render properly when p>alpha (statistically insignificant), as shown below.

Screenshot 2024-03-20 at 10 43 05 AM

This is caused by the code below

Screenshot 2024-03-20 at 10 46 21 AM

Fix

This is easily fixed by passing the p value following the way for p<alpha.

Test

It's generating the correct report. Screenshot 2024-03-20 at 10 49 22 AM