Skip to content

Commit

Permalink
Merge pull request #858 from Gilead-BioStats/fix-854
Browse files Browse the repository at this point in the history
Fix-854 Fix PredictBounds
  • Loading branch information
samussiah authored Nov 7, 2022
2 parents d78486f + 0b037b8 commit 80a8e9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/Analyze_NormalApprox_PredictBounds.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ Analyze_NormalApprox_PredictBounds <- function(
"Metric"
)
} else if (strType == "rate") {
dfBounds <- tidyr::expand_grid(Threshold = vThreshold, LogDenominator = vRange) %>%
dfBounds <- tidyr::expand_grid(Threshold = vThreshold, Denominator = vRange) %>%
mutate(
Denominator = exp(.data$LogDenominator),
LogDenominator = log(.data$Denominator),
# Calculate expected rate at given exposure.
vMu = sum(dfTransformed$Numerator) / sum(dfTransformed$Denominator),
phi = mean(((dfTransformed$Metric - sum(dfTransformed$Numerator) / sum(dfTransformed$Denominator)) /
Expand Down

0 comments on commit 80a8e9d

Please sign in to comment.