Skip to content

Commit

Permalink
Merge pull request #23 from caitlinch/master
Browse files Browse the repository at this point in the history
Update var name ..prev to .data$prev
  • Loading branch information
caitlinch authored Nov 5, 2024
2 parents 8fe4a48 + 13697df commit ba5c35f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/getPrevalence.R
Original file line number Diff line number Diff line change
Expand Up @@ -265,20 +265,20 @@ getPrevalence.brmsfit <- function(model, newdata = NULL, re.form = NULL,
select(-all_of(PoolSizeName)) %>%
rowwise() %>%
mutate(..zeroest = all.negative.pools == 'zero' && .data$..allnegative)
pred$..prev <- t(prev)
pred$prev <- t(prev)
pred <- pred %>%
mutate(Estimate = ifelse(.data$..zeroest,
0,
ifelse(robust,
stats::median(.data$..prev, na.rm = TRUE),
mean(..prev, na.rm = TRUE))),
stats::median(.data$prev, na.rm = TRUE),
mean(.data$prev, na.rm = TRUE))),
CrILow = ifelse(.data$..zeroest,
0,
stats::quantile(..prev, 0.5 - level/2)),
stats::quantile(.data$prev, 0.5 - level/2)),
CrIHigh = ifelse(.data$..zeroest,
stats::quantile(..prev, level),
stats::quantile(..prev, 0.5 + level/2))) %>%
select(-c("..allnegative","..prev","..zeroest")) %>%
stats::quantile(.data$prev, level),
stats::quantile(.data$prev, 0.5 + level/2))) %>%
select(-c("..allnegative","prev","..zeroest")) %>%
ungroup()

predlist <- c(predlist,list(pred))
Expand Down

0 comments on commit ba5c35f

Please sign in to comment.