Relative Effects incorrect (wrong sign) when post-period mean is negative
Open
- Dominant language
- R
- Stars
- 1.9k
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
See impact_inference.R, line 248:
```R
summary <- dplyr::mutate(summary,
RelEffect = AbsEffect / Pred,
RelEffect.lower = AbsEffect.lower / Pred,
RelEffect.upper = AbsEffect.upper / Pred,
RelEffect.sd = AbsEffect.sd / Pred)
```
I noticed negative RelEffect.sd in my `CausalImpactObject$summary` which is clearly the product of not using ```abs(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, when ```Pred < 0 ```.
Contributor guide
Assessment
This issue has not been assessed yet.