Description Usage Arguments Value References Examples
Simulates an ideal population using the reference model from Tokars (2018).
1 2 3 4 5 6 7 8 9 | sim_reference(
init_pop_size,
vaccinations,
cases_novac,
ve,
lag,
deterministic,
seed = sample.int(.Machine$integer.max, 1)
)
|
init_pop_size |
Integer initial population size |
vaccinations |
Integer vector number of vaccinations at every timepoint |
cases_novac |
Integer vector number of cases at every timepoint |
ve |
Vaccine effectiveness (proportion) |
lag |
Integer lag period measured in timepoints |
deterministic |
Boolean whether to make the simulation deterministic |
seed |
Integer seed to use |
A tibble with the following columns:
timepoint |
Index of timepoint |
vaccinations |
Expected number of vaccinations |
cases_novac |
Expected number of cases in absence of vaccination |
ve |
Expected vaccine effectiveness |
pflu |
Flu incidence |
cases |
Actual number of cases |
popn |
Non-cases in absence of vaccination |
pvac |
Proportion of starting population vaccinated |
b |
Number vaccinated at that time |
A |
Non-vaccinated non-cases |
B |
Vaccinated non-cases lagging |
E |
Non-vaccinated cases |
Tokars JI, Rolfes MA, Foppa IM, Reed C. An evaluation and update of methods for estimating the number of influenza cases averted by vaccination in the United States. Vaccine. 2018;36(48):7331–7337. doi:10.1016/j.vaccine.2018.10.026
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Population from Tokars (2018)
nsam <- 1e6L
ndays <- 304L
pop_tok <- sim_reference(
init_pop_size = nsam,
vaccinations = generate_counts(nsam, ndays, 0.55, mean = 100, sd = 50),
cases_novac = generate_counts(nsam, ndays, 0.12, mean = 190, sd = 35),
ve = 0.48,
lag = 14,
deterministic = TRUE
)
head(pop_tok)
sum(pop_tok$avert)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.