Description Usage Arguments Value References Examples
Method 1 was said to be as current. Method 3 was determined to be the least biased.
1 2 3 |
init_pop_size |
Integer initial population size |
vaccinations |
Integer vector counts of vaccinations |
cases |
Integer vector counts of cases |
ve |
Vector vaccine effectiveness. If length 1, assumed to not vary with time. |
A tibble with the following columns (method-dependent):
cases |
Observed cases |
vaccinations |
Observed vaccinations |
ve |
Assumed vaccine effectiveness |
pvac |
Proportion of the starting population vaccinated |
vc_lag |
Vaccine coverage lagged |
pops |
Susceptible population |
pflu |
Infection risk |
popn |
Non-cases is absence of vaccination |
cases_novac |
Cases in absence of vaccination |
avert |
Expected number of vaccinations |
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 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | library(dplyr)
# Simulate a population
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
)
# Summarise by month
pop_tok_month <- pop_tok %>%
mutate(
datestamp = generate_dates(
timepoint, lubridate::ymd("2017-08-01"), "day"
),
year = lubridate::year(datestamp),
month = lubridate::month(datestamp)
) %>%
group_by(year, month) %>%
summarise(
vaccinations = sum(vaccinations), cases = sum(cases), ve = mean(ve)
) %>%
ungroup()
# Estimate averted cases using the two different methods
m1 <- method1(
nsam, pop_tok_month$vaccinations, pop_tok_month$cases, pop_tok_month$ve
)
m3 <- method3(
nsam, pop_tok_month$vaccinations, pop_tok_month$cases, pop_tok_month$ve
)
sum(m1$avert)
sum(m3$avert)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.