Skip to content

Commit

Permalink
fix: change to extract_central_estimates to deal with 1-time estimates
Browse files Browse the repository at this point in the history
  • Loading branch information
ntorresd committed Aug 1, 2024
1 parent ea6093f commit 962df9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/plot_seromodel.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ extract_central_estimates <- function(
alpha = 0.05,
par_name = "foi_vector"
) {
samples <- rstan::extract(seromodel, par_name)[[1]]
samples <- rstan::extract(seromodel, par_name)[[1]] %>%
as.matrix() #to deal with 1-time estimates
central_estimates <- data.frame(
median = apply(samples, 2, quantile, 0.5),
lower = apply(samples, 2, quantile, alpha),
Expand Down

0 comments on commit 962df9e

Please sign in to comment.