popim_population
classpopim_population.Rd
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.
character vector, list of regions considered.
integer, first year to be considered.
integer, last year to be considered.
integer, youngest age to be considered, defaults to 0. Must be non-negative.
integer, oldest age to be considered, defaults to 100. Must be non-negative, and >= age_min.
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.
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()
.
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)