Package 'daedalus'

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

Help Index


Represent countries and territories for DAEDALUS

Description

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.

Usage

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, ...)

Arguments

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 ⁠<daedalus_country>⁠ class.

...

Other parameters passed to print().

Value

  • 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.

Examples

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

Create and work with ⁠<daedalus_output>⁠ objects

Description

Create 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

Usage

as_daedalus_output(x)

validate_daedalus_output(x)

is_daedalus_output(x)

## S3 method for class 'daedalus_output'
print(x, ...)

Arguments

x

An object of the ⁠<daedalus_output>⁠ class.

...

Not used; added for compatibility with the generic.

Value

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.


Represent infection parameters for DAEDALUS

Description

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.

Usage

daedalus_infection(name, ...)

is_daedalus_infection(x)

## S3 method for class 'daedalus_infection'
print(x, ...)

Arguments

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 daedalus::infection_data. Default infection parameters for epidemics can be over-ridden by passing them as a named list to ....

...

Other parameters passed to print().

x

An object of the ⁠<daedalus_infection>⁠ class.

Details

Included epidemics

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).

Infection parameters

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 R0R_0.

  • 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 [0.0,1.0][0.0, 1.0] 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.

Value

  • 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.

Examples

# 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)

Represent vaccine investment scenarios for DAEDALUS

Description

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.

Usage

daedalus_vaccination(name, ...)

is_daedalus_vaccination(x)

## S3 method for class 'daedalus_vaccination'
print(x, ...)

Arguments

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 daedalus::vaccination_scenario_data. Default vaccination parameters can be over-ridden by passing them as a named list to ....

...

Other parameters passed to print().

x

An object of the ⁠<daedalus_vaccination>⁠ class.

Vaccination parameters

  • 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.


Pandemic response strategy data for DAEDALUS

Description

Coefficients of openness of economic sectors under different pandemic response strategies. There are four strategies (including no response, identified as "none").

Usage

closure_data

Format

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.

none

All economic sectors are fully open and there is no pandemic response.

elimination

Openness coefficients for an elimination strategy.

economic_closures

Openness coefficients for a strategy of mostly economic closures.

school_closures

Openness coefficients for a strategy of mostly school closures.

Source

Multiple sources; to be updated shortly. See processing details in 'data-raw/closure_data.R


Country demographic data for DAEDALUS

Description

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.

Usage

country_data

Format

country_data

A list with 197 elements, each corresponding to a recognised country or territory.

demography

A four value named vector for the number of individuals in each demographic group.

contact_matrix

A 16-element square matrix giving the mean number of social contacts between individuals of the four age groups.

workers

A 45-element vector giving the number of individuals in each economic sector included in the model.

gva

A 45-element vector giving the daily gross value added of each economic sector in the model, in million dollars.

Source

doi:10.1126/science.abc0035 and OECD; see processing details in 'data-raw/country_data.R


Country names and ISO codes for DAEDALUS

Description

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;

Usage

country_names

country_codes_iso3c

country_codes_iso2c

Format

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.

Source

Country codes are taken from the ISO 3166 specification and generated from country names using countrycode::countrycode().

Examples

country_names

country_codes_iso3c

country_codes_iso2c

DAEDALUS model for health, social and economic costs of a pandemic

Description

Run the DAEDALUS model from R. This is a work in progress.

Usage

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,
  ...
)

Arguments

country

A country or territory object of class ⁠<daedalus_country>⁠, or a country or territory name from those included in the package; see country_names, or a country ISO2 or ISO3 code; see country_codes_iso2c and country_codes_iso3c . Country-specific data such as the community and workplace contacts, the demography, and the distribution of the workforce into economic sectors is automatically accessed from package data for the relevant country name if it is passed as a string. To override package defaults for country characteristics, pass a ⁠<daedalus_country>⁠ object instead. See daedalus_country() for more.

infection

An infection parameter object of the class ⁠<infection>⁠, or an epidemic name for which data are provided in the package; see epidemic_names for parameters from a historical epidemic or epidemic wave. Passing the name as a string automatically accesses the default parameters of an infection. Create an pass a ⁠<daedalus_infection>⁠ to tweak infection parameters.

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 response_threshold.

While the response strategy is active, economic contacts are scaled using the package data object daedalus::closure_data.

vaccine_investment

Either a single string or a ⁠<daedalus_vaccination>⁠ object specifying the vaccination parameters associated with an advance vaccine-investment scenario. Defaults to "none", for no advance vaccine investment. In this case, vaccination begins 365 days (1 year) after the simulation begins, at a low rate across all age groups. Other accepted values are "low", "medium" and "high". See daedalus_vaccination() for more information.

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 response_strategy) to be triggered, if it has not already been triggered via response_time. Currently defaults to NULL, and a country-specific spare hospital capacity value is used from country_data. Pass a number to override the default country-specific threshold value.

initial_state_manual

An optional named list with the names p_infectious and p_asymptomatic for the proportion of infectious and symptomatic individuals in each age group and economic sector. Defaults to 1e-6 and 0.0 respectively.

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 deSolve::ode().

Details

Initial state

Users can pass the following initial state parameters to initial_state_manual:

  • p_infectious: A single numeric value in the range [0.0,1.0][0.0, 1.0] 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 [0.0,1.0][0.0, 1.0] for the proportion of initially infectious individuals who are considered to be asymptomatic. Defaults to 0.0.

Value

A ⁠<deSolve>⁠ object.

Examples

# 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

Description

Economic constants used in DAEDALUS

Usage

edu_effectiveness_remote

edu_annual_ror

work_expected_years

earnings_loss_discount

Format

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.

Details

The Daedalus model uses these constants for economic value calculations:

  1. edu_effectiveness_remote: The effectiveness of remote education.

  2. edu_annual_ror: The rate of return on a year of education.

  3. work_expected_years: The expected number of years of work for school-age children.

  4. earnings_loss_discount: The discounting rate used in the calculation of lost earnings.


Economic sector contacts data for DAEDALUS

Description

Data on the per-capita social contacts within and between each economic sector of the DAEDALUS model.

Usage

economic_contacts

Format

economic_contacts

A list with two elements:

contacts_workplace

A numeric vector with N_ECON_SECTORS (45) elements, giving the per-capita contacts between workers within the same economic sector.

contacts_between_sectors

A square matrix with values set to 10610^{-6}, and with its diagonal set to zero, for the number of contacts between workers across economic sectors.

Source

Adapted from doi:10.1016/j.epidem.2024.100778; see processing details in 'data-raw/economic_contacts.R


Epidemiological compartments and indices

Description

Names and indices for the epidemiological compartments used in DAEDALUS, for reuse in model code.

Usage

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

Format

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.

Details

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).

Value

COMPARTMENTS returns a character vector of the epidemiological compartment names.

All other constants return integer values.


Calculate daily incidences and summarise epidemic measures

Description

Functions to quickly summarise timeseries data from daedalus() to provide daily values for infections, hospitalisations, deaths, and vaccinations, while allowing grouping by different strata.

Usage

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)

Arguments

data

Either a ⁠<data.frame>⁠ from a call to get_daedalus() on a ⁠<daedalus_output>⁠ object, or such an object directly.

measures

A character vector of one or more of the following, passed to get_incidence() and get_epidemic_summary(): "infections", "hospitalisations" or "deaths" for the measure to return. Defaults to returning all three in long format.

get_daily_vaccinations() does not accept a measures argument and only provides the number of daily vaccinations.

groups

An optional character vector of grouping variables that correspond to model strata. Defaults to NULL which gives incidence across the whole population. Allowed groups correspond to modelled strata: "age_group", "vaccine_group", and "econ_sector".

get_daily_vaccinations() only accepts "age_group" and "econ_sector".

Value

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.

Examples

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 characteristics for model epidemics

Description

Infection parameters used in DAEDALUS to simulate epidemics of interest.

epidemic_names provides the tags by which epidemics are known for users' convenience.

Usage

infection_data

infection_parameter_names

epidemic_names

Format

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 R0R_0.

  • 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 (0.0,1.0)(0.0, 1.0) 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.

Details

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).

Source

See processing details in 'data-raw/infection_data.R

Examples

# check available epidemics
epidemic_names

Get epidemic costs from a DAEDALUS model run

Description

Get epidemic costs from a DAEDALUS model run

Usage

get_costs(x, summarise_as = c("none", "total", "domain"))

Arguments

x

A ⁠<daedalus_output>⁠ object from a call to daedalus().

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'.

Details

The total cost in million dollars is returned as total_cost. This is comprised of the following costs.

Economic 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).

Educational costs

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).

Life-years lost

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.

Value

A list of different cost values, including the total cost. See Details for more information.

Examples

output <- daedalus("Canada", "influenza_1918")

get_costs(output)

Get parameters from DAEDALUS classes

Description

Generic and methods for S3 classes for safely getting class parameters.

Usage

## 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, ...)

Arguments

x

An S3 class object from the daedalus package of the ⁠<daedalus_country>⁠ or ⁠<infection>⁠ class.

to_get

A string giving the name of the element of x to return.

...

<dynamic-dots> Other arguments to class methods. Class methods do not currently support any other arguments.

Value

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.

Examples

# 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 of statistical lives lost

Description

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.

Usage

life_value

country_gni

Format

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.

Source

Multiple sources; see processing details in 'data-raw/life_value.R.

Multiple sources; see processing details in 'data-raw/life_value.R.


DAEDALUS model constants

Description

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.

Usage

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

Format

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.

Details

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.

Value

Values for the model constants.


Set parameters in DAEDALUS classes

Description

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.

Usage

## 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, ...)

Arguments

x

An S3 class object from the daedalus package of the ⁠<daedalus_country>⁠ or ⁠<infection>⁠ class.

...

<dynamic-dots> Named optional arguments for parameters to be changed, with their new values. The only values allowed for ⁠<daedalus_country>⁠ objects are "contact_matrix", "contacts_workplace", and "contacts_consumer_worker".

Value

An S3 object of the same class as input x.

Examples

# 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

Description

Model output measures and groups for summaries and derived time-series

Usage

SUMMARY_MEASURES

SUMMARY_GROUPS

Format

An object of class character of length 3.

An object of class character of length 3.


Vaccine investment scenario parameters

Description

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.

Usage

vaccination_scenario_data

vaccination_scenario_names

vaccination_parameter_names

Format

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.

Details

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.

Source

See processing details in 'data-raw/vaccination_data.R

Examples

# check vaccination scenarios
vaccination_scenario_names

vaccination_scenario_data