The DiseasyPopulation module is responsible for handling the population included in the model.
See vignette("diseasy-population").
Value
A new instance of the DiseasyPopulation R6 class.
Super class
DiseasyBaseModule -> DiseasyPopulation
Active bindings
age_cuts_lower(
integer())
vector of ages defining the lower bound for each age group. IfNULL, age groups of contact_basis is used. Read only.
Methods
Inherited methods
DiseasyPopulation$new()
Creates a new instance of the DiseasyPopulation R6 class.
Usage
DiseasyPopulation$new(age_cuts_lower = 0L, ...)DiseasyPopulation$stratify_age()
Sets the age stratification of the model population.
Arguments
age_cuts_lower(
integer())
vector of ages defining the lower bound for each age group. IfNULL, age groups of contact_basis is used.
Examples
# Create population module
population <- DiseasyPopulation$new()
# By default a single, non-stratified population is used in the models.
population
#> # DiseasyPopulation ##########################################
#> No age stratification has been configured
# Stratification can be added via methods
# Stratifying by age
population$stratify_age(age_cuts_lower = c(0, 60)) # 2 age groups
# NB: Age cuts must be available in demography and disease data.
population
#> # DiseasyPopulation ##########################################
#> Stratified by age: 00-59, 60+
rm(population)
