-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative Effects incorrect (wrong sign) when post-period mean is negative #31
Comments
It may be sufficient to issue a warning when Pred is negative -- further consideration reminds me that working with relative measures "around" zero is fundamentally problematic. |
I just want to confirm that this bug is still ongoing and that an implementation of the suggestion by @mefergus does indeed work (i.e. wrap the variable Pred in abs() for line 248). I have forked the package and you can find it here: https://github.com/vector-news/CausalImpact and you can install it using devtools::install_github("vector-news/CausalImpact") I have also opened a pull request to fix this issue, which you can see here: #60. Thank you @mefergus and others for looking into this issue. Hopefully, it will be resolved for future versions. |
Hi there, this will be resolved in the upcoming CausalImpact 1.3. |
See impact_inference.R, line 248:
I noticed negative RelEffect.sd in my
CausalImpactObject$summary
which is clearly the product of not usingabs(Pred)
as the denominator, as I believe it should be in each of these cases. In particular the upper and lower bounds are out of order, too, whenPred < 0
.The text was updated successfully, but these errors were encountered: