The popim_population object is a dataframe that models an age-structured population through time, tracking population size and vaccine-induced immunity in the population. The population may be spatially disaggregated into several regions.

popim_population(
  region = character(),
  year_min = integer(),
  year_max = integer(),
  age_min = 0,
  age_max = 100
)

Arguments

region

character vector, list of regions considered.

year_min

integer, first year to be considered.

year_max

integer, last year to be considered.

age_min

integer, youngest age to be considered, defaults to 0. Must be non-negative.

age_max

integer, oldest age to be considered, defaults to 100. Must be non-negative, and >= age_min.

Value

An object of class popim_population. This is a dataframe with columns region, year, age, cohort, immunity and pop_size. The first three cover the ranges given by the input parameters. cohort gives the year of birth. It is reduntant as it is calculated as cohort = year - age. It is included for ease of handling. Immunity and pop_size are initialised as 0 and NA, respectively, throughout the whole population.

Details

An object of S3 class popim_population is a dataframe that contains the columns

  • region: character.

  • year: integer.

  • age: integer, non-negative.

  • cohort: integer. This is redundant, equals year - age, and only included for ease of handling.

  • immunity: numeric, between 0 and 1 (inclusive). Proportion of the cohort that is immune due to vaccination. Initialised to 0 by the constructor popim_population().

  • pop_size: numeric, non-negative. Size of the cohort. Initialised to NA_real by the constructor popim_population().

This constructor sets up the population as fully susceptible (i.e., immunity = 0), with missing population size (i.e., pop_size = NA_real_) throughout. The parameters passed to the constructor are retained as attributes to the dataframe object.

A population with non-missing population size can be read in from a suitable file using read_popim_pop(), while vaccine induced immunity can be generated through applying vaccination activities to the population with apply_vacc().

Author

Tini Garske

Examples

pop <- popim_population(region = "UK", year_min = 2000, year_max = 2010)

pop <- popim_population(region = c("FRA", "UK"),
                      year_min = 2000, year_max = 2010,
                      age_min = 0, age_max = 80)