calc_pop_immunity.Rd
Calculate the overall population immunity (aggregating over age)
from the supplied popim_population
object.
calc_pop_immunity(pop)
A dataframe containing the popim_population
aggregated by age.
## set up population and vaccination activities:
pop <- popim_population(region = "UK", year_min = 2000, year_max = 2005,
age_min = 0, age_max = 10)
vacc <- popim_vacc_activities(region = "UK", year = c(2001, 2002),
age_first = 0, age_last = 0,
coverage = 0.8, doses = NA,
targeting = "random")
## update the population immunity based on the vaccination activities:
pop <- apply_vacc(pop, vacc)
## calculate the population immunity aggregated across ages:
pop_aggregated <- calc_pop_immunity(pop)