Skip to content

Relative Effects incorrect (wrong sign) when post-period mean is negative #31

Open
@mefergus

Description

@mefergus

See impact_inference.R, line 248:

  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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions