Skip to content

Commit

Permalink
Corrected population_group in attack rate plot when by_group=FALSE
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshay218 committed Aug 15, 2024
1 parent 6aacae6 commit 7da75a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/plot_infection_histories.R
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ plot_attack_rates_pointrange <- function(infection_histories,
if (!by_group) {
antibody_data$population_group <- 1
infection_histories$population_group <- 1
demographics$population_group <- 1
if(!is.null(true_ar)) true_ar$population_group <- 1
}

Expand Down Expand Up @@ -339,6 +340,7 @@ plot_attack_rates_pointrange <- function(infection_histories,
year_breaks <- c(year_breaks, max_time + 2)
year_labels <- c(year_labels, "Prior")
}

if (!plot_den) {
quantiles <- ddply(tmp, .(j, population_group), function(x) quantile(x$V1, c(0.025, 0.5, 0.975)))
colnames(quantiles) <- c("j", "population_group", "lower", "median", "upper")
Expand Down

0 comments on commit 7da75a2

Please sign in to comment.