diff --git a/NEWS.md b/NEWS.md index a37bfc384..32724e466 100644 --- a/NEWS.md +++ b/NEWS.md @@ -15,6 +15,7 @@ estimate_infections() ``` +- Added support for fitting the susceptible population size. By @seabbs in #904 and reviewed by @sbfnk. - A bug was fixed where the initial growth was never estimated (i.e. the prior mean was always zero). By @sbfnk in #853 and reviewed by @seabbs. - A bug was fixed where an internal function for applying a default cdf cutoff failed due to a difference a vector length issue. By @jamesmbaazam in #858 and reviewed by @sbfnk. - All parameters have been changed to the new parameter interface. By @sbfnk in #871 and #890 and reviewed by @seabbs. diff --git a/R/create.R b/R/create.R index d65132f09..446336c37 100644 --- a/R/create.R +++ b/R/create.R @@ -263,7 +263,8 @@ create_rt_data <- function(rt = rt_opts(), breakpoints = NULL, breakpoints = breakpoints, future_fixed = as.numeric(future_rt$fixed), fixed_from = future_rt$from, - pop = rt$pop, + use_pop = + as.integer(rt$pop != Fixed(0)) + as.integer(rt$pop_period == "all"), stationary = as.numeric(rt$gp_on == "R0"), future_time = horizon - future_rt$from ) @@ -584,12 +585,14 @@ create_stan_data <- function(data, seeding_time, rt, gp, obs, backcalc, R0 = rt$prior, frac_obs = obs$scale, rep_phi = obs$phi, + pop = rt$pop, lower_bounds = c( alpha = 0, rho = 0, R0 = 0, frac_obs = 0, - rep_phi = 0 + rep_phi = 0, + pop = 0 ) ) ) diff --git a/R/opts.R b/R/opts.R index ca5c11dda..c6e846bf8 100644 --- a/R/opts.R +++ b/R/opts.R @@ -320,11 +320,17 @@ trunc_opts <- function(dist = Fixed(0), default_cdf_cutoff = 0.001, #' conservative estimate of break point changes (alter this by setting #' `gp = NULL`). #' -#' @param pop Integer, defaults to 0. Susceptible population initially present. -#' Used to adjust Rt estimates when otherwise fixed based on the proportion of -#' the population that is susceptible. When set to 0 no population adjustment +#' @param pop A `` giving the initial susceptible population size. +#' Used to adjust Rt estimates based on the proportion of the population that +#' is susceptible. Defaults to `Fixed(0)` which means no population adjustment #' is done. #' +#' @param pop_period Character string, defaulting to "forecast". Controls when +#' susceptible population adjustment is applied. "forecast" only applies the +#' adjustment to forecasts while "all" applies it to both data and forecasts. +#' Note that with "forecast", Rt estimates are unadjusted for susceptible +#' depletion but posterior predictions are adjusted. +#' #' @param gp_on Character string, defaulting to "R_t-1". Indicates how the #' Gaussian process, if in use, should be applied to Rt. Currently supported #' options are applying the Gaussian process to the last estimated Rt (i.e @@ -354,14 +360,15 @@ rt_opts <- function(prior = LogNormal(mean = 1, sd = 1), use_breakpoints = TRUE, future = "latest", gp_on = c("R_t-1", "R0"), - pop = 0) { + pop = Fixed(0), + pop_period = c("forecast", "all")) { rt <- list( use_rt = use_rt, rw = rw, use_breakpoints = use_breakpoints, future = future, - pop = pop, - gp_on = arg_match(gp_on) + gp_on = arg_match(gp_on), + pop_period = arg_match(pop_period) ) # replace default settings with those specified by user @@ -388,6 +395,23 @@ rt_opts <- function(prior = LogNormal(mean = 1, sd = 1), prior <- LogNormal(mean = prior$mean, sd = prior$sd) } + if (is.numeric(pop)) { + lifecycle::deprecate_warn( + "1.7.0", + "rt_opts(pop = 'must be a ``')", + details = "For specifying a fixed population size, use `Fixed(pop)`" + ) + pop <- Fixed(pop) + } + rt$pop <- pop + if (rt$pop_period == "all" && pop == Fixed(0)) { + cli_abort( + c( + "!" = "pop_period = \"all\" but pop is fixed at 0." + ) + ) + } + if (rt$use_rt) { rt$prior <- prior } else { @@ -724,7 +748,10 @@ obs_opts <- function(family = c("negbin", "poisson"), cli_abort( c( "!" = "Specifying {.var phi} as a vector of length 2 is deprecated.", - "i" = "Mean and SD should be given as list elements." + "i" = paste0( + "Use a {.cls dist_spec} instead, e.g. Normal(mean = {phi[1]}, ", + "sd = {phi[2]})." + ) ) ) } diff --git a/R/simulate_infections.R b/R/simulate_infections.R index 6998a8171..8f8531ef4 100644 --- a/R/simulate_infections.R +++ b/R/simulate_infections.R @@ -69,7 +69,7 @@ simulate_infections <- function(estimates, R, initial_infections, CrIs = c(0.2, 0.5, 0.9), backend = "rstan", seeding_time = NULL, - pop = 0, ...) { + pop = Fixed(0), ...) { ## deprecated usage if (!missing(estimates)) { deprecate_stop( @@ -86,7 +86,6 @@ simulate_infections <- function(estimates, R, initial_infections, assert_numeric(R$R, lower = 0) assert_numeric(initial_infections, lower = 0) assert_numeric(day_of_week_effect, lower = 0, null.ok = TRUE) - assert_numeric(pop, lower = 0) if (!is.null(seeding_time)) { assert_integerish(seeding_time, lower = 1) } @@ -94,6 +93,7 @@ simulate_infections <- function(estimates, R, initial_infections, assert_class(truncation, "trunc_opts") assert_class(obs, "obs_opts") assert_class(generation_time, "generation_time_opts") + assert_class(pop, "dist_spec") ## create R for all dates modelled all_dates <- data.table(date = seq.Date(min(R$date), max(R$date), by = "day")) @@ -125,7 +125,7 @@ simulate_infections <- function(estimates, R, initial_infections, initial_infections = array(log_initial_infections, dim = c(1, 1)), initial_growth = array(initial_growth, dim = c(1, length(initial_growth))), R = array(R$R, dim = c(1, nrow(R))), - pop = pop + use_pop = as.integer(pop != Fixed(0)) ) data <- c(data, create_stan_delays( @@ -179,7 +179,8 @@ simulate_infections <- function(estimates, R, initial_infections, rho = NULL, R0 = NULL, frac_obs = obs$scale, - rep_phi = obs$phi + rep_phi = obs$phi, + pop = pop )) ## set empty params matrix - variable parameters not supported here data$params <- array(dim = c(1, 0)) diff --git a/inst/stan/data/estimate_infections_params.stan b/inst/stan/data/estimate_infections_params.stan index 85be5c1c9..a54ec9d32 100644 --- a/inst/stan/data/estimate_infections_params.stan +++ b/inst/stan/data/estimate_infections_params.stan @@ -3,3 +3,4 @@ int rho_id; // parameter id of rho (GP lengthscale) int R0_id; // parameter id of R0 int frac_obs_id; // parameter id of frac_obs int rep_phi_id; // parameter id of rep_phi_id +int pop_id; // parameter id of pop diff --git a/inst/stan/data/rt.stan b/inst/stan/data/rt.stan index 357330c19..7ffff8a25 100644 --- a/inst/stan/data/rt.stan +++ b/inst/stan/data/rt.stan @@ -5,5 +5,5 @@ array[t - seeding_time] int breakpoints; // when do breakpoints occur int future_fixed; // is underlying future Rt assumed to be fixed int fixed_from; // Reference date for when Rt estimation should be fixed - int pop; // Initial susceptible population + int use_pop; // use population size int gt_id; // id of generation time diff --git a/inst/stan/data/simulation_rt.stan b/inst/stan/data/simulation_rt.stan index 3beae3161..fdae11e2a 100644 --- a/inst/stan/data/simulation_rt.stan +++ b/inst/stan/data/simulation_rt.stan @@ -2,6 +2,6 @@ array[n, seeding_time > 1 ? 1 : 0] real initial_growth; //initial growth matrix[n, t - seeding_time] R; // reproduction number - int pop; // susceptible population + int use_pop; // use population size int gt_id; // id of generation time diff --git a/inst/stan/estimate_infections.stan b/inst/stan/estimate_infections.stan index fe845b8fe..e079d345c 100644 --- a/inst/stan/estimate_infections.stan +++ b/inst/stan/estimate_infections.stan @@ -107,9 +107,13 @@ transformed parameters { frac_obs_id, params_fixed_lookup, params_variable_lookup, params_value, params ); + real pop = get_param( + pop_id, params_fixed_lookup, params_variable_lookup, params_value, + params + ); infections = generate_infections( R, seeding_time, gt_rev_pmf, initial_infections, initial_growth, pop, - future_time, obs_scale, frac_obs + use_pop, future_time, obs_scale, frac_obs ); } } else { diff --git a/inst/stan/functions/infections.stan b/inst/stan/functions/infections.stan index a599be8c2..ee379e749 100644 --- a/inst/stan/functions/infections.stan +++ b/inst/stan/functions/infections.stan @@ -20,7 +20,7 @@ real update_infectiousness(vector infections, vector gt_rev_pmf, // generate infections by using Rt = Rt-1 * sum(reversed generation time pmf * infections) vector generate_infections(vector oR, int uot, vector gt_rev_pmf, array[] real initial_infections, array[] real initial_growth, - int pop, int ht, int obs_scale, real frac_obs) { + real pop, int use_pop, int ht, int obs_scale, real frac_obs) { // time indices and storage int ot = num_elements(oR); int nht = ot - ht; @@ -42,20 +42,20 @@ vector generate_infections(vector oR, int uot, vector gt_rev_pmf, } } // calculate cumulative infections - if (pop) { + if (use_pop) { cum_infections[1] = sum(infections[1:uot]); } // iteratively update infections for (s in 1:ot) { infectiousness[s] = update_infectiousness(infections, gt_rev_pmf, uot, s); - if (pop && s > nht) { + if (use_pop == 1 || (use_pop == 2 && s <= nht)) { exp_adj_Rt = exp(-R[s] * infectiousness[s] / (pop - cum_infections[nht])); exp_adj_Rt = exp_adj_Rt > 1 ? 1 : exp_adj_Rt; infections[s + uot] = (pop - cum_infections[s]) * (1 - exp_adj_Rt); }else{ infections[s + uot] = R[s] * infectiousness[s]; } - if (pop && s < ot) { + if (use_pop && s < ot) { cum_infections[s + 1] = cum_infections[s] + infections[s + uot]; } } diff --git a/inst/stan/simulate_infections.stan b/inst/stan/simulate_infections.stan index 43ea6cba9..83fb14123 100644 --- a/inst/stan/simulate_infections.stan +++ b/inst/stan/simulate_infections.stan @@ -50,6 +50,12 @@ generated quantities { frac_obs_id, params_fixed_lookup, params_variable_lookup, params_value, params ); + + vector[n] pop = get_param( + pop_id, params_fixed_lookup, params_variable_lookup, + params_value, params + ); + for (i in 1:n) { // generate infections from Rt trace vector[delay_type_max[gt_id] + 1] gt_rev_pmf; @@ -62,7 +68,7 @@ generated quantities { infections[i] = to_row_vector(generate_infections( to_vector(R[i]), seeding_time, gt_rev_pmf, initial_infections[i], - initial_growth[i], pop, future_time, obs_scale, frac_obs[i] + initial_growth[i], pop[i], use_pop, future_time, obs_scale, frac_obs[i] )); if (delay_id) { diff --git a/man/create_forecast_data.Rd b/man/create_forecast_data.Rd index 3ca7b0ccb..38a98a37e 100644 --- a/man/create_forecast_data.Rd +++ b/man/create_forecast_data.Rd @@ -9,7 +9,7 @@ create_forecast_data(forecast = forecast_opts(), data) \arguments{ \item{forecast}{A list of options as generated by \code{\link[=forecast_opts]{forecast_opts()}} defining the forecast opitions. Defaults to \code{\link[=forecast_opts]{forecast_opts()}}. If NULL then no -forecasting will be one.} +forecasting will be done.} \item{data}{A \verb{} of confirmed cases (confirm) by date (date). \code{confirm} must be numeric and \code{date} must be in date format. Optionally diff --git a/man/create_stan_data.Rd b/man/create_stan_data.Rd index e0f05ff26..e5680e01a 100644 --- a/man/create_stan_data.Rd +++ b/man/create_stan_data.Rd @@ -48,7 +48,7 @@ define the back calculation. Defaults to \code{\link[=backcalc_opts]{backcalc_op \item{forecast}{A list of options as generated by \code{\link[=forecast_opts]{forecast_opts()}} defining the forecast opitions. Defaults to \code{\link[=forecast_opts]{forecast_opts()}}. If NULL then no -forecasting will be one.} +forecasting will be done.} } \value{ A list of stan data diff --git a/man/epinow.Rd b/man/epinow.Rd index 8a62820a5..008759969 100644 --- a/man/epinow.Rd +++ b/man/epinow.Rd @@ -73,7 +73,7 @@ observation model. Defaults to \code{\link[=obs_opts]{obs_opts()}}.} \item{forecast}{A list of options as generated by \code{\link[=forecast_opts]{forecast_opts()}} defining the forecast opitions. Defaults to \code{\link[=forecast_opts]{forecast_opts()}}. If NULL then no -forecasting will be one.} +forecasting will be done.} \item{stan}{A list of stan options as generated by \code{\link[=stan_opts]{stan_opts()}}. Defaults to \code{\link[=stan_opts]{stan_opts()}}. Can be used to override \code{data}, \code{init}, and \code{verbose} diff --git a/man/estimate_infections.Rd b/man/estimate_infections.Rd index 992b65d46..4f5a97dde 100644 --- a/man/estimate_infections.Rd +++ b/man/estimate_infections.Rd @@ -69,7 +69,7 @@ observation model. Defaults to \code{\link[=obs_opts]{obs_opts()}}.} \item{forecast}{A list of options as generated by \code{\link[=forecast_opts]{forecast_opts()}} defining the forecast opitions. Defaults to \code{\link[=forecast_opts]{forecast_opts()}}. If NULL then no -forecasting will be one.} +forecasting will be done.} \item{stan}{A list of stan options as generated by \code{\link[=stan_opts]{stan_opts()}}. Defaults to \code{\link[=stan_opts]{stan_opts()}}. Can be used to override \code{data}, \code{init}, and \code{verbose} diff --git a/man/forecast_opts.Rd b/man/forecast_opts.Rd index 2bd02766b..cadd823aa 100644 --- a/man/forecast_opts.Rd +++ b/man/forecast_opts.Rd @@ -17,7 +17,6 @@ forecasts unless set explicitly here.} } \value{ A \verb{} object of forecast setting. -rstan functions. } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} diff --git a/man/regional_epinow.Rd b/man/regional_epinow.Rd index efaa0ee6b..1dfd319df 100644 --- a/man/regional_epinow.Rd +++ b/man/regional_epinow.Rd @@ -66,7 +66,7 @@ observation model. Defaults to \code{\link[=obs_opts]{obs_opts()}}.} \item{forecast}{A list of options as generated by \code{\link[=forecast_opts]{forecast_opts()}} defining the forecast opitions. Defaults to \code{\link[=forecast_opts]{forecast_opts()}}. If NULL then no -forecasting will be one.} +forecasting will be done.} \item{stan}{A list of stan options as generated by \code{\link[=stan_opts]{stan_opts()}}. Defaults to \code{\link[=stan_opts]{stan_opts()}}. Can be used to override \code{data}, \code{init}, and \code{verbose} diff --git a/man/rt_opts.Rd b/man/rt_opts.Rd index c48cfe21e..8636fdb82 100644 --- a/man/rt_opts.Rd +++ b/man/rt_opts.Rd @@ -11,7 +11,8 @@ rt_opts( use_breakpoints = TRUE, future = "latest", gp_on = c("R_t-1", "R0"), - pop = 0 + pop = Fixed(0), + pop_period = c("forecast", "all") ) } \arguments{ @@ -50,10 +51,16 @@ Rt = Rt-1 * GP), and applying the Gaussian process to a global mean (i.e Rt but the method relying on a global mean will revert to this for real time estimates, which may not be desirable.} -\item{pop}{Integer, defaults to 0. Susceptible population initially present. -Used to adjust Rt estimates when otherwise fixed based on the proportion of -the population that is susceptible. When set to 0 no population adjustment +\item{pop}{A \verb{} giving the initial susceptible population size. +Used to adjust Rt estimates based on the proportion of the population that +is susceptible. Defaults to \code{Fixed(0)} which means no population adjustment is done.} + +\item{pop_period}{Character string, defaulting to "forecast". Controls when +susceptible population adjustment is applied. "forecast" only applies the +adjustment to forecasts while "all" applies it to both data and forecasts. +Note that with "forecast", Rt estimates are unadjusted for susceptible +depletion but posterior predictions are adjusted.} } \value{ An \verb{} object with settings defining the time-varying diff --git a/man/simulate_infections.Rd b/man/simulate_infections.Rd index bc012013f..e0e34ef23 100644 --- a/man/simulate_infections.Rd +++ b/man/simulate_infections.Rd @@ -16,7 +16,7 @@ simulate_infections( CrIs = c(0.2, 0.5, 0.9), backend = "rstan", seeding_time = NULL, - pop = 0, + pop = Fixed(0), ... ) } @@ -74,9 +74,9 @@ R given) of \code{seeding_time} days is assumed to have followed exponential growth roughly in line with the growth rate implied by the first value of R.} -\item{pop}{Integer, defaults to 0. Susceptible population initially present. -Used to adjust Rt estimates when otherwise fixed based on the proportion of -the population that is susceptible. When set to 0 no population adjustment +\item{pop}{A \verb{} giving the initial susceptible population size. +Used to adjust Rt estimates based on the proportion of the population that +is susceptible. Defaults to \code{Fixed(0)} which means no population adjustment is done.} \item{...}{deprecated; only included for backward compatibility} diff --git a/tests/testthat/test-create_rt_date.R b/tests/testthat/test-create_rt_date.R index 3fc47b1cc..463c26261 100644 --- a/tests/testthat/test-create_rt_date.R +++ b/tests/testthat/test-create_rt_date.R @@ -7,7 +7,7 @@ test_that("create_rt_data returns expected default values", { expect_equal(result$breakpoints, numeric(0)) expect_equal(result$future_fixed, 1) expect_equal(result$fixed_from, 0) - expect_equal(result$pop, 0) + expect_equal(result$use_pop, 0) expect_equal(result$stationary, 0) expect_equal(result$future_time, 0) }) @@ -27,13 +27,13 @@ test_that("create_rt_data handles custom rt_opts correctly", { use_breakpoints = FALSE, future = "project", gp_on = "R0", - pop = 1000000 + pop = Normal(mean = 1000000, sd = 100) ) result <- create_rt_data(rt = custom_rt, horizon = 7) expect_equal(result$estimate_r, 0) - expect_equal(result$pop, 1000000) + expect_equal(result$use_pop, 1) expect_equal(result$stationary, 1) expect_equal(result$future_time, 7) }) diff --git a/tests/testthat/test-rt_opts.R b/tests/testthat/test-rt_opts.R index 69fb1183c..d76f0571b 100644 --- a/tests/testthat/test-rt_opts.R +++ b/tests/testthat/test-rt_opts.R @@ -7,7 +7,7 @@ test_that("rt_opts returns expected default values", { expect_equal(result$rw, 0) expect_true(result$use_breakpoints) expect_equal(result$future, "latest") - expect_equal(result$pop, 0) + expect_equal(result$pop, Fixed(0)) expect_equal(result$gp_on, "R_t-1") }) @@ -19,7 +19,7 @@ test_that("rt_opts handles custom inputs correctly", { use_breakpoints = FALSE, future = "project", gp_on = "R0", - pop = 1000000 + pop = Normal(mean = 1000000, sd = 100) )) expect_null(result$prior) @@ -27,10 +27,17 @@ test_that("rt_opts handles custom inputs correctly", { expect_equal(result$rw, 7) expect_true(result$use_breakpoints) # Should be TRUE when rw > 0 expect_equal(result$future, "project") - expect_equal(result$pop, 1000000) + expect_equal(result$pop, Normal(mean = 1000000, sd = 100)) expect_equal(result$gp_on, "R0") }) +test_that("rt_opts warns when pop is passed as numeric", { + expect_warning( + rt_opts(pop = 1000), + "The `pop` argument of `rt_opts()` must be a `` as of EpiNow2 1.7.0." + ) +}) + test_that("rt_opts sets use_breakpoints to TRUE when rw > 0", { result <- rt_opts(rw = 3, use_breakpoints = FALSE) expect_true(result$use_breakpoints) @@ -59,8 +66,7 @@ test_that("rt_opts returns object of correct class", { }) test_that("rt_opts handles edge cases correctly", { - result <- rt_opts(rw = 0.1, pop = -1) + result <- rt_opts(rw = 0.1) expect_equal(result$rw, 0.1) - expect_equal(result$pop, -1) expect_true(result$use_breakpoints) }) diff --git a/tests/testthat/test-stan-infections.R b/tests/testthat/test-stan-infections.R index d08e06c01..9d88a858a 100644 --- a/tests/testthat/test-stan-infections.R +++ b/tests/testthat/test-stan-infections.R @@ -25,35 +25,35 @@ gt_rev_pmf <- get_delay_rev_pmf( # test generate infections test_that("generate_infections works as expected", { expect_equal( - round(generate_infections(c(1, rep(1, 9)), 10, gt_rev_pmf, log(1000), 0, 0, 0, 0, 0), 0), + round(generate_infections(c(1, rep(1, 9)), 10, gt_rev_pmf, log(1000), 0, 0, 0, 0, 0, 0), 0), c(rep(1000, 10), 995, 996, rep(997, 8)) ) expect_equal( - round(generate_infections(c(1, rep(1.1, 9)), 10, gt_rev_pmf, log(20), 0.03, 0, 0, 0, 0), 0), + round(generate_infections(c(1, rep(1.1, 9)), 10, gt_rev_pmf, log(20), 0.03, 0, 0, 0, 0, 0), 0), c(20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 24, 27, 28, 29, 30, 30, 31, 32, 33, 34) ) expect_equal( - round(generate_infections(c(1, rep(1.1, 9)), 10, gt_rev_pmf, log(100), 0, 0, 0, 0, 0), 0), + round(generate_infections(c(1, rep(1.1, 9)), 10, gt_rev_pmf, log(100), 0, 0, 0, 0, 0, 0), 0), c(rep(100, 10), 99, 110, 112, 115, 119, 122, 126, 130, 134, 138) ) expect_equal( - round(generate_infections(c(1, rep(1, 9)), 4, gt_rev_pmf, log(500), -0.02, 0, 0, 0, 0), 0), + round(generate_infections(c(1, rep(1, 9)), 4, gt_rev_pmf, log(500), -0.02, 0, 0, 0, 0, 0), 0), c(500, 490, 480, 471, 382, 403, 408, rep(409, 7)) ) expect_equal( - round(generate_infections(c(1, rep(1.1, 9)), 4, gt_rev_pmf, log(500), 0, 0, 0, 0, 0), 0), + round(generate_infections(c(1, rep(1.1, 9)), 4, gt_rev_pmf, log(500), 0, 0, 0, 0, 0, 0), 0), c(rep(500, 4), 394, 460, 475, 489, 505, 520, 536, 553, 570, 588) ) expect_equal( - round(generate_infections(c(1, rep(1, 9)), 1, gt_rev_pmf, log(40), numeric(0), 0, 0, 0, 0), 0), + round(generate_infections(c(1, rep(1, 9)), 1, gt_rev_pmf, log(40), numeric(0), 0, 0, 0, 0, 0), 0), c(40, 8, 11, 12, 12, rep(13, 6)) ) expect_equal( - round(generate_infections(c(1, rep(1.1, 9)), 1, gt_rev_pmf, log(100), 0.01, 0, 0, 0, 0), 0), + round(generate_infections(c(1, rep(1.1, 9)), 1, gt_rev_pmf, log(100), 0.01, 0, 0, 0, 0, 0), 0), c(100, 20, 31, 35, 36, 37, 38, 39, 41, 42, 43) ) expect_equal( - round(generate_infections(c(1, rep(1, 9)), 10, gt_rev_pmf, log(1000), 0, 100000, 4, 0, 0), 0), + round(generate_infections(c(1, rep(1, 9)), 10, gt_rev_pmf, log(1000), 0, 100000, 2, 0, 0, 0), 0), c(rep(1000, 10), 995, 996, rep(997, 4), 980, 965, 947, 926) ) }) diff --git a/vignettes/estimate_infections_options.Rmd.orig b/vignettes/estimate_infections_options.Rmd.orig index 0cd532013..622e47aa2 100644 --- a/vignettes/estimate_infections_options.Rmd.orig +++ b/vignettes/estimate_infections_options.Rmd.orig @@ -154,7 +154,7 @@ dep <- estimate_infections(reported_cases, delays = delay_opts(delay), rt = rt_opts( prior = rt_prior, - pop = 1000000, future = "latest" + pop = Normal(mean = 1000000, sd = 1000), future = "latest" ) ) # summarise results