Title: | Model health, social, and economic costs of a pandemic using DAEDALUS |
---|---|
Description: | Model the health, education, and economic costs of directly transmitted respiratory virus pandemics, under different scenarios of prior vaccine investment and reactive interventions, using the _DAEDALUS_ integrated health-economics model adapted from Haw et al. (2022) <doi.org/10.1038/s43588-022-00233-0>. |
Authors: | Pratik Gupte [aut, cre] , Patrick Doohan [aut] , Robert Johnson [aut] , Rich FitzJohn [aut] , Emma Russell [aut], David Mears [aut], Katharina Hauck [aut] , Abdul Latif Jameel Institute for Disease and Emergency Analytics [fnd], Imperial College of Science, Technology and Medicine [cph, fnd] |
Maintainer: | Pratik Gupte <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-11 12:52:30 UTC |
Source: | https://github.com/jameel-institute/daedalus |
Helper functions to create and work with S3 class
<daedalus_country>
objects for use with daedalus()
.
These objects store country parameters for reuse and have methods for easy
parameter access and editing, as well as processing raw country
characteristics for the DAEDALUS model.
daedalus_country( country, parameters = list(contact_matrix = NULL, contacts_workplace = NULL, contacts_consumer_worker = NULL) ) is_daedalus_country(x) ## S3 method for class 'daedalus_country' print(x, ...)
daedalus_country( country, parameters = list(contact_matrix = NULL, contacts_workplace = NULL, contacts_consumer_worker = NULL) ) is_daedalus_country(x) ## S3 method for class 'daedalus_country' print(x, ...)
country |
A string giving the country or territory name, or ISO2 or ISO3 code; must be from among country_codes_iso2c or country_codes_iso3c or country_names. |
parameters |
An optional named list of country parameters that are allowed to be modified. Currently, users may only pass their own contact matrix, workplace contacts, and consumer-worker contact matrix. If these are not passed, default values are accessed from stored package data. |
x |
An object of the |
... |
Other parameters passed to |
daedalus_country()
returns an object of the S3 class <daedalus_country>
is_daedalus_country()
returns a logical for whether an object is a
<daedalus_country>
.
print.daedalus_country()
invisibly returns the <daedalus_country>
object x
. Called for printing side-effects.
x <- daedalus_country("Canada") x daedalus_country( "United Kingdom", parameters = list(contact_matrix = matrix(1, 4, 4)) ) # check whether `x` is a <country> object is_daedalus_country(x) # assign class members # using set_data() set_data(x, contact_matrix = matrix(99, 4, 4)) # using assignment operators x$contact_matrix <- matrix(99, 4, 4) x
x <- daedalus_country("Canada") x daedalus_country( "United Kingdom", parameters = list(contact_matrix = matrix(1, 4, 4)) ) # check whether `x` is a <country> object is_daedalus_country(x) # assign class members # using set_data() set_data(x, contact_matrix = matrix(99, 4, 4)) # using assignment operators x$contact_matrix <- matrix(99, 4, 4) x
<daedalus_output>
objectsCreate and work with <daedalus_output>
objects
Validate a potential <daedalus_output>
class object
Check if an object is of the <daedalus_output>
class
Print <daedalus_output>
class objects
as_daedalus_output(x) validate_daedalus_output(x) is_daedalus_output(x) ## S3 method for class 'daedalus_output' print(x, ...)
as_daedalus_output(x) validate_daedalus_output(x) is_daedalus_output(x) ## S3 method for class 'daedalus_output' print(x, ...)
x |
An object of the |
... |
Not used; added for compatibility with the generic. |
An object of the <daedalus_output>
class.
Invisibly returns x
; called primarily for its side effects of
erroring when the object does not satisfy the <daedalus_output>
class
requirements.
A logical for whether x
is of the <daedalus_output>
class.
None; called for its printing side effects.
Helper functions to create and work with S3 class
<daedalus_infection>
objects for use with daedalus()
.
These objects store infection parameters for reuse and have methods for easy
parameter access and editing, as well as processing raw infection
characteristics for the DAEDALUS model.
daedalus_infection(name, ...) is_daedalus_infection(x) ## S3 method for class 'daedalus_infection' print(x, ...)
daedalus_infection(name, ...) is_daedalus_infection(x) ## S3 method for class 'daedalus_infection' print(x, ...)
name |
An epidemic name from among epidemic_names.
Selecting an epidemic automatically pulls in infection parameters
associated with the epidemic; these are stored as packaged data in
|
... |
Other parameters passed to |
x |
An object of the |
Epidemics for which data are available are given below (pathogen in
parentheses). The string indicates the name that must be passed to the name
argument.
"sars_cov_1"
: SARS 2004 (SARS-CoV-1),
"influenza_2009"
: influenza 2009 (influenza A H1N1),
"influenza_1957"
: influenza 1957 (influenza A H2N2),
"influenza_1918"
: influenza 1918 (influenza A H1N1),
"sars_cov_2_pre_alpha"
: Covid-19 wild type (SARS-Cov-2 wild type),
"sars_cov_2_omicron"
: Covid-19 Omicron (SARS-CoV-2 omicron),
"sars_cov_2_pre_delta"
: (SARS-CoV-2 delta).
All infections have the following parameters, which take default values
stored in the package under infection_data. Users can pass
custom values for these parameters as arguments via ...
.
r0
: A single numeric value for the basic reproduction value of the
infection .
sigma
: A single numeric value > 0.0 for the rate of transition from the
exposed compartment to one of two infectious compartments.
p_sigma
: A single numeric value in the range for the
proportion of infectious individuals who are also symptomatic. Asymptomatic
individuals can have a different contribution to the force of infection from
symptomatic individuals.
epsilon
: A single numeric value for the relative contribution of
asymptomatic infectious individuals to the force of infection (compared to
symptomatic individuals).
gamma_Is
: A single numeric value for the recovery rate of infectious
individuals who are not hospitalised.
gamma_Ia
: A single numeric value for the recovery rate from asymptomatic
infection.
ifr
: A numeric vector of length N_AGE_GROUPS
(4) for the
age-specific infection fatality risk.
gamma_H
: A numeric vector of length N_AGE_GROUPS
(4) for the
age-specific recovery rate for individuals who are hospitalised.
eta
: A numeric vector of length N_AGE_GROUPS
(4) for the age-specific
hospitalisation rate for individuals who are infectious and symptomatic.
omega
: A numeric vector of length N_AGE_GROUPS
(4) for the age-specific
mortality rate for individuals who are hospitalised.
rho
: A single numeric value for the rate at which infection-derived
immunity wanes, returning individuals in the 'recovered' compartment to the
'susceptible' compartment.
daedalus_infection()
returns an object of the S3 class
<daedalus_infection>
.
is_daedalus_infection()
returns a logical for whether an object is a
<daedalus_infection>
.
print.daedalus_infection()
invisibly returns the <daedalus_infection>
object x
. Called for printing side-effects.
# make a <daedalus_infection> object with default parameter values daedalus_infection("sars_cov_1") # modify infection parameters R0 and immunity waning rate daedalus_infection("influenza_1918", r0 = 2.5, rho = 0.01)
# make a <daedalus_infection> object with default parameter values daedalus_infection("sars_cov_1") # modify infection parameters R0 and immunity waning rate daedalus_infection("influenza_1918", r0 = 2.5, rho = 0.01)
Helper functions to create and work with S3 class
<daedalus_vaccination>
objects for use with daedalus()
.
These objects store vaccination parameters for reuse and have methods for
easy parameter access and editing, as well as processing raw vaccination
characteristics for the DAEDALUS model.
daedalus_vaccination(name, ...) is_daedalus_vaccination(x) ## S3 method for class 'daedalus_vaccination' print(x, ...)
daedalus_vaccination(name, ...) is_daedalus_vaccination(x) ## S3 method for class 'daedalus_vaccination' print(x, ...)
name |
A vaccination investment scenario name from among
vaccination_scenario_names.
Selecting an epidemic automatically pulls in vaccination parameters
associated with the epidemic; these are stored as packaged data in
|
... |
Other parameters passed to |
x |
An object of the |
vax_start_time
: The number of days after the start of the epidemic that
vaccination begins. Must be a single number.
nu
: A single number for the percentage of the total population that can
be vaccinated each day. This is converted into a proportion automatically
within daedalus()
.
vax_uptake_limit
: A single number giving the upper limit for the
percentage of the population that can be vaccinated. When this limit is
reached, the vaccination rate nu
is set to zero.
Coefficients of openness of economic sectors under different
pandemic response strategies. There are four strategies (including no
response, identified as "none"
).
closure_data
closure_data
closure_data
A list with 4 elements, each corresponding to a pandemic response strategy,
each a vector N_ECONOMIC_SECTORS
(45) giving the coefficients of
sector openness.
All economic sectors are fully open and there is no pandemic response.
Openness coefficients for an elimination strategy.
Openness coefficients for a strategy of mostly economic closures.
Openness coefficients for a strategy of mostly school closures.
Multiple sources; to be updated shortly. See processing details in 'data-raw/closure_data.R
Country-wise data on demography, social contacts, workforce
participation in economic sectors, and gross value added (GVA) per economic
sector.
Demography and social contacts are presented in four bins: [0, 4]
,
[5, 19]
, [20, 64]
, and [65, ]
(combining all individuals aged 65 and higher).
Workforce participation is presented as counts which are assumed to be a
subset of the [20, 64]
age-bin.
GVA data is presented in terms of million dollars per day.
Note that some zero values in worker participation data may reflect missing data for a particular sector.
country_data
country_data
country_data
A list with 197 elements, each corresponding to a recognised country or territory.
A four value named vector for the number of individuals in each demographic group.
A 16-element square matrix giving the mean number of social contacts between individuals of the four age groups.
A 45-element vector giving the number of individuals in each economic sector included in the model.
A 45-element vector giving the daily gross value added of each economic sector in the model, in million dollars.
doi:10.1126/science.abc0035 and OECD; see processing details in 'data-raw/country_data.R
Names and character codes for countries provided with the package. Note that country names are commonly used names and may not be official names.
country_names
: Country names;
country_codes_iso3c
: ISO 3166 alpha 3 (3 character) codes;
country_codes_iso2c
: ISO 3166 alpha 2 (2 character) codes;
country_names country_codes_iso3c country_codes_iso2c
country_names country_codes_iso3c country_codes_iso2c
Character vectors of recognised country names, and 3-character or 2-character codes.
An object of class character
of length 67.
An object of class character
of length 67.
Country codes are taken from the
ISO 3166 specification and
generated from country names using countrycode::countrycode()
.
country_names country_codes_iso3c country_codes_iso2c
country_names country_codes_iso3c country_codes_iso2c
Run the DAEDALUS model from R. This is a work in progress.
daedalus( country, infection, response_strategy = c("none", "elimination", "economic_closures", "school_closures"), vaccine_investment = c("none", "low", "medium", "high"), response_time = 30, response_threshold = NULL, initial_state_manual = list(), time_end = 600, ... )
daedalus( country, infection, response_strategy = c("none", "elimination", "economic_closures", "school_closures"), vaccine_investment = c("none", "low", "medium", "high"), response_time = 30, response_threshold = NULL, initial_state_manual = list(), time_end = 600, ... )
country |
A country or territory object of class |
infection |
An infection parameter object of the class |
response_strategy |
A string for the name of response strategy followed;
defaults to "none". The response strategy determines the country-specific
response threshold following which the response is activated. See
While the response strategy is active, economic contacts are scaled using the
package data object |
vaccine_investment |
Either a single string or a
|
response_time |
A single numeric value for the time in days at which the selected response is activated. This is ignored if the response has already been activated by the hospitalisation threshold being reached. Defaults to 30 days. |
response_threshold |
A single numeric value for the total number of
hospitalisations that causes an epidemic response
(specified by |
initial_state_manual |
An optional named list with the names
|
time_end |
An integer-like value for the number of timesteps at which to return data. This is treated as the number of days with data returned for each day. Defaults to 300 days. |
... |
Other arguments to be passed to the ODE solver; these are passed
to |
Users can pass the following initial state parameters to
initial_state_manual
:
p_infectious
: A single numeric value in the range giving
the proportion of individuals in each age group and economic sector that are
to be initialised as infectious. Defaults to
1e-6
, or one in every one
million as infectious.
p_asymptomatic
: A single numeric value in the range for
the proportion of initially infectious individuals who are considered to be
asymptomatic. Defaults to 0.0.
A <deSolve>
object.
# country and infection specified by strings using default characteristics output <- daedalus( "Canada", "influenza_1918" ) # country passed as <daedalus_country> with some characteristics modified country_x <- daedalus_country( "Canada", parameters = list(contact_matrix = matrix(5, 4, 4)) # uniform contacts ) output <- daedalus(country_x, "influenza_1918") # with some infection parameters over-ridden by the user output <- daedalus( "United Kingdom", daedalus_infection("influenza_1918", r0 = 1.3) ) # with default initial conditions over-ridden by the user output <- daedalus( "United Kingdom", "influenza_1918", initial_state_manual = list(p_infectious = 1e-3) )
# country and infection specified by strings using default characteristics output <- daedalus( "Canada", "influenza_1918" ) # country passed as <daedalus_country> with some characteristics modified country_x <- daedalus_country( "Canada", parameters = list(contact_matrix = matrix(5, 4, 4)) # uniform contacts ) output <- daedalus(country_x, "influenza_1918") # with some infection parameters over-ridden by the user output <- daedalus( "United Kingdom", daedalus_infection("influenza_1918", r0 = 1.3) ) # with default initial conditions over-ridden by the user output <- daedalus( "United Kingdom", "influenza_1918", initial_state_manual = list(p_infectious = 1e-3) )
Economic constants used in DAEDALUS
edu_effectiveness_remote edu_annual_ror work_expected_years earnings_loss_discount
edu_effectiveness_remote edu_annual_ror work_expected_years earnings_loss_discount
An object of class numeric
of length 1.
An object of class numeric
of length 1.
An object of class numeric
of length 1.
An object of class numeric
of length 1.
The Daedalus model uses these constants for economic value calculations:
edu_effectiveness_remote
: The effectiveness of remote education.
edu_annual_ror
: The rate of return on a year of education.
work_expected_years
: The expected number of years of work for school-age
children.
earnings_loss_discount
: The discounting rate used in the calculation of
lost earnings.
Data on the per-capita social contacts within and between each economic sector of the DAEDALUS model.
economic_contacts
economic_contacts
economic_contacts
A list with two elements:
A numeric vector with N_ECON_SECTORS
(45)
elements, giving the per-capita contacts between workers within the same
economic sector.
A square matrix with values set to
, and with its diagonal set to zero, for the number of contacts
between workers across economic sectors.
Adapted from doi:10.1016/j.epidem.2024.100778; see processing details in 'data-raw/economic_contacts.R
Names and indices for the epidemiological compartments used in DAEDALUS, for reuse in model code.
COMPARTMENTS N_MODEL_COMPARTMENTS N_EPI_COMPARTMENTS N_DATA_COMPARTMENTS i_EPI_COMPARTMENTS i_DATA_COMPARTMENTS i_S i_E i_Is i_Ia i_H i_R i_D i_dE i_dH i_dD N_INFECTION_SUBSYSTEM
COMPARTMENTS N_MODEL_COMPARTMENTS N_EPI_COMPARTMENTS N_DATA_COMPARTMENTS i_EPI_COMPARTMENTS i_DATA_COMPARTMENTS i_S i_E i_Is i_Ia i_H i_R i_D i_dE i_dH i_dD N_INFECTION_SUBSYSTEM
An object of class character
of length 9.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 7.
An object of class integer
of length 2.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
DAEDALUS has 7 epidemiological compartments: susceptible, exposed, infectious and symptomatic ("infect_symp"), infectious and asymptomatic ("infect_asymp") , hospitalised, recovered, and dead.
There are 3 additional compartments that track the number of new infections,
new hospitalisations, and new deaths (i_dE
, i_dH
, and i_dD
).
COMPARTMENTS
returns a character vector of the epidemiological
compartment names.
All other constants return integer values.
Functions to quickly summarise timeseries data from daedalus()
to provide daily values for infections, hospitalisations, deaths, and
vaccinations, while allowing grouping by different strata.
get_incidence( data, measures = c("infections", "hospitalisations", "deaths"), groups = NULL ) get_epidemic_summary( data, measures = c("infections", "hospitalisations", "deaths"), groups = NULL ) get_new_vaccinations(data, groups = NULL)
get_incidence( data, measures = c("infections", "hospitalisations", "deaths"), groups = NULL ) get_epidemic_summary( data, measures = c("infections", "hospitalisations", "deaths"), groups = NULL ) get_new_vaccinations(data, groups = NULL)
data |
Either a |
measures |
A character vector of one or more of the following, passed to
|
groups |
An optional character vector of grouping variables that
correspond to model strata. Defaults to
|
A <data.frame>
in long format, with one entry per
model timestep, measure, and group chosen.
get_incidence()
returns a data frame with the number of daily new
infections, new hospitalisations, and/or new deaths in each of the groups
specified by groups
.
get_epidemic_summary()
returns a data frame with the total number of the
value specified in measure
for each of the groups specified by groups
.
get_daily_vaccinations()
returns a data frame with columns for the
number of new daily vaccination in each combination of groups
if provided.
Columns for the groups
are added when groups
are specified.
data <- daedalus("Canada", "sars_cov_1") # new infections new_infections <- get_incidence(data, "infections") # epidemic summary get_epidemic_summary( data, groups = "age_group" ) # get daily vaccinations daily_vaccinations <- get_new_vaccinations(data)
data <- daedalus("Canada", "sars_cov_1") # new infections new_infections <- get_incidence(data, "infections") # epidemic summary get_epidemic_summary( data, groups = "age_group" ) # get daily vaccinations daily_vaccinations <- get_new_vaccinations(data)
Infection parameters used in DAEDALUS to simulate epidemics of interest.
epidemic_names
provides the tags by which epidemics are known for users'
convenience.
infection_data infection_parameter_names epidemic_names
infection_data infection_parameter_names epidemic_names
infection_data
A list with 7 elements, each corresponding to an epidemic (see Details), and providing 10 infection parameters:
r0
: A single numeric value for the basic reproduction value of the
infection .
sigma
: A single numeric value > 0.0 for the rate of transition from the
exposed compartment to one of two infectious compartments.
p_sigma
: A single numeric value in the range for the
proportion of infectious individuals who are also symptomatic. Asymptomatic
individuals can have a different contribution to the force of infection from
symptomatic individuals.
epsilon
: A single numeric value for the relative contribution of
asymptomatic infectious individuals to the force of infection (compared to
symptomatic individuals).
gamma_Is
: A single numeric value for the recovery rate of infectious
individuals who are not hospitalised.
gamma_Ia
: A single numeric value for the recovery rate from asymptomatic
infection.
gamma_H
: A numeric vector of length 4 for the age-specific recovery rate
for individuals who are hospitalised.
eta
: A numeric vector of length N_AGE_GROUPS
(4) for the age-specific
hospitalisation rate for individuals who are infectious and symptomatic.
omega
: A numeric vector of length N_AGE_GROUPS
(4) for the age-specific
mortality rate for individuals who are hospitalised.
rho
: A single numeric value for the rate at which infection-derived
immunity wanes, returning individuals in the 'recovered' compartment to the
'susceptible' compartment.
infection_parameter_names
A character vector with 10 names for the infection parameters in
infection_data
. Mainly for internal use.
epidemic_names
A character vector with 7 elements.
Epidemics for which data are available are (pathogen in parentheses):
SARS 2004 (SARS-CoV-1)
Influenza 2009 (influenza A H1N1)
Influenza 1957 (influenza A H2N2)
Influenza 1918 (influenza A H1N1)
Covid-19 wild type (SARS-Cov-2 wild type)
Covid-19 Omicron (SARS-CoV-2 omicron)
Covid-19 Delta (SARS-CoV-2 delta).
See processing details in 'data-raw/infection_data.R
# check available epidemics epidemic_names
# check available epidemics epidemic_names
Get epidemic costs from a DAEDALUS model run
get_costs(x, summarise_as = c("none", "total", "domain"))
get_costs(x, summarise_as = c("none", "total", "domain"))
x |
A |
summarise_as |
A string from among "none", "total", or "domain", for how the costs should be returned. Select "none", the default, for the raw costs along with overall and domain-specific totals; "total" for the overall cost, and "domain" for the total costs per domain; the domains are 'economic', 'education', and 'life years'. |
The total cost in million dollars is returned as total_cost
. This is
comprised of the following costs.
A three element list of economic_cost_total
, the total costs from pandemic
impacts on economic sectors, including both costs of lost gross value added
(GVA) due to pandemic-control restrictions or closures
(economic_cost_closures
), and pandemic-related absences due to illness and
death (economic_cost_absences
).
A three element list of education_cost_total
, the total costs from pandemic
impacts on education due to pandemic-control restrictions or closures
(education_cost_closures
), and pandemic-related absences due to illness and
death (education_cost_absences
).
A four-element vector (for the number of age groups) giving the value of life-years lost per age group. This is calculated as the life-expectancy of each age group times the value of a statistical life, with all years assumed to have the same value.
A list of different cost values, including the total cost. See Details for more information.
output <- daedalus("Canada", "influenza_1918") get_costs(output)
output <- daedalus("Canada", "influenza_1918") get_costs(output)
Generic and methods for S3 classes for safely getting class parameters.
## S3 method for class 'daedalus_country' get_data(x, to_get, ...) ## S3 method for class 'daedalus_infection' get_data(x, to_get, ...) ## S3 method for class 'daedalus_output' get_data(x, to_get = NULL, ...) ## S3 method for class 'daedalus_vaccination' get_data(x, to_get, ...) get_data(x, ...)
## S3 method for class 'daedalus_country' get_data(x, to_get, ...) ## S3 method for class 'daedalus_infection' get_data(x, to_get, ...) ## S3 method for class 'daedalus_output' get_data(x, to_get = NULL, ...) ## S3 method for class 'daedalus_vaccination' get_data(x, to_get, ...) get_data(x, ...)
x |
An S3 class object from the daedalus package of the
|
to_get |
A string giving the name of the element of |
... |
< |
Returns a member of x
, with the class preserved
(e.g. numeric vector for a country "demography"
).
For <daedalus_output>
objects, returns the model timeseries data when no
element is specified.
# simple example of getting data country_A <- daedalus_country("United Kingdom") get_data(country_A, "demography") get_data(country_A, "contact_matrix") disease_x <- daedalus_infection("sars_cov_1", r0 = 1.9) get_data(disease_x, "r0") # get model data output <- daedalus("Canada", "influenza_1918") head( get_data(output) )
# simple example of getting data country_A <- daedalus_country("United Kingdom") get_data(country_A, "demography") get_data(country_A, "contact_matrix") disease_x <- daedalus_infection("sars_cov_1", r0 = 1.9) get_data(disease_x, "r0") # get model data output <- daedalus("Canada", "influenza_1918") head( get_data(output) )
Values in dollars (scaled by purchasing power parity) of a statistical life lost in each of the four DAEDALUS age groups, accounting for life expectancy.
life_value country_gni
life_value country_gni
life_value
A list with 67 elements, each corresponding to a country or territory, and giving the age-group-specific value of a statistical life lost. Each list element is a numeric vector of four values giving the value per age group, in the following order: 0-4, 5-19, 20-65, 65+.
country_gni
A list with 67 elements, each corresponding to a country or territory, and giving the GNI (gross national income) in international dollars.
Multiple sources; see processing details in 'data-raw/life_value.R.
Multiple sources; see processing details in 'data-raw/life_value.R.
Frequently used values for the DAEDALUS model related to the model population and structure. See also epi_constants for constants specific to the epidemiological model.
N_AGE_GROUPS i_AGE_GROUPS N_VACCINE_STRATA N_VACCINE_DATA_GROUPS AGE_GROUPS i_WORKING_AGE i_SCHOOL_AGE N_ECON_SECTORS i_ECON_SECTORS i_EDUCATION_SECTOR N_ECON_STRATA i_NOT_WORKING DIM_AGE_GROUPS DIM_EPI_COMPARTMENTS DIM_ECON_SECTORS DIM_VACCINE_STRATA i_UNVACCINATED_STRATUM i_VACCINATED_STRATUM i_NEW_VAX_STRATUM VACCINE_GROUPS N_OUTPUT_COLS
N_AGE_GROUPS i_AGE_GROUPS N_VACCINE_STRATA N_VACCINE_DATA_GROUPS AGE_GROUPS i_WORKING_AGE i_SCHOOL_AGE N_ECON_SECTORS i_ECON_SECTORS i_EDUCATION_SECTOR N_ECON_STRATA i_NOT_WORKING DIM_AGE_GROUPS DIM_EPI_COMPARTMENTS DIM_ECON_SECTORS DIM_VACCINE_STRATA i_UNVACCINATED_STRATUM i_VACCINATED_STRATUM i_NEW_VAX_STRATUM VACCINE_GROUPS N_OUTPUT_COLS
An object of class integer
of length 1.
An object of class integer
of length 4.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class character
of length 4.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 45.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class character
of length 3.
An object of class integer
of length 1.
The DAEDALUS model requires the following values to be fixed.
Number of age groups: 4
Number of vaccination strata: 2
Age group bins: 0-4 years, 5-19 years, 20-65 years (working age), 65+ years
Index of the working-age age groups: 3; see AGE_GROUPS
Number of economic sectors: 45
Index of individuals not working as a layer in the 3D state tensor: 1
Number of economic strata: 46; note that this is always one more than the number of economic sectors, with the additional stratum for those not in work which includes all individuals not of working age, and a proportion of working age individuals.
Array dimension of age groups: 1
Array dimension of epidemiological compartments: 2
Array dimension of economic sectors: 3
Array dimension of vaccination strata: 4
Indices and numbers of key groups.
Values for the model constants.
Generic and methods for S3 classes for safely setting class
parameters. Only parameters considered safe to change – mostly contact data
in the <country>
, but all parameters in <infection>
– can be changed in
this way.
## S3 method for class 'daedalus_country' set_data(x, ...) ## S3 method for class 'daedalus_infection' set_data(x, ...) ## S3 method for class 'daedalus_vaccination' set_data(x, ...) set_data(x, ...)
## S3 method for class 'daedalus_country' set_data(x, ...) ## S3 method for class 'daedalus_infection' set_data(x, ...) ## S3 method for class 'daedalus_vaccination' set_data(x, ...) set_data(x, ...)
x |
An S3 class object from the daedalus package of the
|
... |
< |
An S3 object of the same class as input x
.
# simple example of setting all contacts to 1 country_A <- daedalus_country("United Kingdom") country_A country_A <- set_data(country_A, contact_matrix = matrix(1, 4, 4)) country_A disease_x <- daedalus_infection("sars_cov_1") disease_x <- set_data(disease_x, r0 = 3.0) disease_x
# simple example of setting all contacts to 1 country_A <- daedalus_country("United Kingdom") country_A country_A <- set_data(country_A, contact_matrix = matrix(1, 4, 4)) country_A disease_x <- daedalus_infection("sars_cov_1") disease_x <- set_data(disease_x, r0 = 3.0) disease_x
Model output measures and groups for summaries and derived time-series
SUMMARY_MEASURES SUMMARY_GROUPS
SUMMARY_MEASURES SUMMARY_GROUPS
An object of class character
of length 3.
An object of class character
of length 3.
Vaccination parameters for four main pre-pandemic scenarios of pre-pandemic investments in vaccine development and delivery.
vaccination_scenario_names
provides the names by which the advance vaccine
investment scenarios are known.
vaccination_scenario_data vaccination_scenario_names vaccination_parameter_names
vaccination_scenario_data vaccination_scenario_names vaccination_parameter_names
vaccination_scenario_data
A list with 4 elements, each corresponding to an advance vaccine investment strategy. Each element is a list of three values (see Details).
vax_start_time
: A single number for the vaccination start time in days.
nu
: A single number for the daily vaccination rate as a percentage
of the population vaccinated.
vax_uptake_limit
: A single number for the percentage of the population
that is willing to be vaccinated.
vaccination_scenario_names
A character vector of four elements giving the identifier for each scenario.
vaccination_parameter_names
A character vector of three elements giving the identifier for vaccination parameters.
An object of class character
of length 4.
An object of class character
of length 3.
Each scenario has three parameters; parameters do not differ across age or other groups.
Vaccination start time: The time in days at which vaccination begins.
Vaccination rate: The rate, as a percentage of the population vaccinated per day.
Vaccination uptake limit: The percentage of the population that is willing to accept vaccination.
See processing details in 'data-raw/vaccination_data.R
# check vaccination scenarios vaccination_scenario_names vaccination_scenario_data
# check vaccination scenarios vaccination_scenario_names vaccination_scenario_data