diff --git a/R/impact_inference.R b/R/impact_inference.R index 301b907..4d4ffbb 100644 --- a/R/impact_inference.R +++ b/R/impact_inference.R @@ -246,10 +246,10 @@ CompileSummaryTable <- function(y.post, y.samples.post, AbsEffect.sd = c(sd(rowMeans(y.repmat.post - y.samples.post)), sd(rowSums(y.repmat.post - y.samples.post)))) summary <- dplyr::mutate(summary, - RelEffect = AbsEffect / Pred, - RelEffect.lower = AbsEffect.lower / Pred, - RelEffect.upper = AbsEffect.upper / Pred, - RelEffect.sd = AbsEffect.sd / Pred) + RelEffect = AbsEffect / abs(Pred), + RelEffect.lower = AbsEffect.lower / abs(Pred), + RelEffect.upper = AbsEffect.upper / abs(Pred), + RelEffect.sd = AbsEffect.sd / abs(Pred)) rownames(summary) <- c("Average", "Cumulative") # Add interval coverage, defined by alpha