Run the explicit SEEIR model

run_explicit_SEEIR_model(
  country = NULL,
  population = NULL,
  tt_contact_matrix = 0,
  contact_matrix_set = NULL,
  R0 = 3,
  tt_R0 = 0,
  beta_set = NULL,
  time_period = 365,
  dt = 0.1,
  day_return = FALSE,
  replicates = 10,
  init = NULL,
  seed = stats::runif(1, 0, 1e+08),
  prob_hosp = NULL,
  prob_severe = NULL,
  prob_non_severe_death_treatment = NULL,
  prob_non_severe_death_no_treatment = NULL,
  prob_severe_death_treatment = NULL,
  prob_severe_death_no_treatment = NULL,
  p_dist = probs$p_dist,
  walker_params = FALSE,
  dur_E = NULL,
  dur_IMild = NULL,
  dur_ICase = NULL,
  dur_get_ox_survive = NULL,
  tt_dur_get_ox_survive = 0,
  dur_get_ox_die = NULL,
  tt_dur_get_ox_die = 0,
  dur_not_get_ox_survive = NULL,
  dur_not_get_ox_die = NULL,
  dur_get_mv_survive = NULL,
  tt_dur_get_mv_survive = 0,
  dur_get_mv_die = NULL,
  tt_dur_get_mv_die = 0,
  dur_not_get_mv_survive = NULL,
  dur_not_get_mv_die = NULL,
  dur_rec = NULL,
  dur_R = NULL,
  hosp_bed_capacity = NULL,
  ICU_bed_capacity = NULL,
  tt_hosp_beds = 0,
  tt_ICU_beds = 0,
  seeding_cases = NULL
)

Arguments

country

Character for country beign simulated. WIll be used to generate population and contact_matrix_set if unprovided. Either country or population and contact_matrix_set must be provided.

population

Population vector (for each age group). Default = NULL, which will cause population to be sourced from country

tt_contact_matrix

Time change points for matrix change. Default = 0

contact_matrix_set

Contact matrices used in simulation. Default = NULL, which will generate this based on the country.

R0

Basic Reproduction Number. Default = 3

tt_R0

Change time points for R0. Default = 0

beta_set

Alternative parameterisation via beta rather than R0. Default = NULL, which causes beta to be estimated from R0

time_period

Length of simulation. Default = 365

dt

Time Step. Default = 0.1

day_return

Logical, do we want to return outut after each day rather than each dt. Default = FALSE

replicates

Number of replicates

init

Data.frame of initial conditions. Default = NULL

seed

Random Number Seed.

prob_hosp

Probability of hospitalisation by age. Default, NULL, will use c(0.000840764, 0.001182411, 0.001662887, 0.002338607, 0.003288907, 0.004625365, 0.006504897, 0.009148183, 0.012865577, 0.018093546, 0.025445917, 0.035785947, 0.050327683, 0.0707785, 0.099539573, 0.1399878, 0.233470395)

prob_severe

Probability of developing severe symptoms by age. Default, NULL, will use c(0.000840764, 0.001182411, 0.001662887, 0.002338607, 0.003288907, 0.004625365, 0.006504897, 0.009148183, 0.012865577, 0.018093546, 0.025445917, 0.035785947, 0.050327683, 0.0707785, 0.099539573, 0.1399878, 0.233470395)

prob_non_severe_death_treatment

Probability of death from non severe treated infection. Default, NULL, will use c(0.181354223, 0.181354223, 0.181354223, 0.137454906, 0.121938236, 0.122775613, 0.136057441, 0.160922182, 0.196987378, 0.242011054, 0.289368845, 0.326537862, 0.337229819, 0.309082553, 0.243794865, 0.160480254, 0.057084366)

prob_non_severe_death_no_treatment

Probability of death in non severe hospital inections that aren't treated. Default, NULL, will use rep(0.5, 17)

prob_severe_death_treatment

Probability of death from severe infection that is treated. Default, NULL, will use c(0.226668959, 0.252420241, 0.281097009, 0.413005389, 0.518451493, 0.573413613, 0.576222065, 0.54253573, 0.493557696, 0.447376527, 0.416666608, 0.411186639, 0.443382594, 0.538718871, 0.570434076, 0.643352843, 0.992620047)

prob_severe_death_no_treatment

Probability of death from severe infection that is not treated. Default, NULL, will use rep(0.95, 17)

p_dist

Preferentiality of age group receiving treatment relative to other age groups when demand exceeds healthcare capacity.

walker_params

Boolean for using parameters in Walker et al. Default = FALSE, which uses parameter update as of November 2020. For full information see parameters vignette

dur_E

Mean duration of incubation period (days). Default = 4.6

dur_IMild

Mean duration of mild infection (days). Default = 2.1

dur_ICase

Mean duration from symptom onset to hospitil admission (days). Default = 4.5

dur_get_ox_survive

Mean duration of oxygen given survive. Default = 9

tt_dur_get_ox_survive

Times at which dur_get_ox_survive changes (Default = 0 = doesn't change)

dur_get_ox_die

Mean duration of oxygen given death. Default = 9

tt_dur_get_ox_die

Times at which dur_get_ox_die changes (Default = 0 = doesn't change)

dur_not_get_ox_survive

Mean duration without oxygen given survive. Default = 4.5

dur_not_get_ox_die

Mean duration without oxygen given death. Default = 4.5

dur_get_mv_survive

Mean duration of ventilation given survive. Default = 14.8

tt_dur_get_mv_survive

Times at which dur_get_mv_survive changes (Default = 0 = doesn't change)

dur_get_mv_die

Mean duration of ventilation given death. Default = 11.1

tt_dur_get_mv_die

Times at which dur_get_mv_die changes (Default = 0 = doesn't change)

dur_not_get_mv_survive

Mean duration without ventilation given survive. Default = 7.4

dur_not_get_mv_die

Mean duration without ventilation given death. Default = 1

dur_rec

Duration of recovery after coming off ventilation. Default = 3

dur_R

Mean duration of immunity (days). Default = Inf

hosp_bed_capacity

General bed capacity. Can be single number or vector if capacity time-varies.

ICU_bed_capacity

ICU bed capacity. Can be single number or vector if capacity time-varies.

tt_hosp_beds

Times at which hospital bed capacity changes (Default = 0 = doesn't change)

tt_ICU_beds

Times at which ICU bed capacity changes (Default = 0 = doesn't change)

seeding_cases

Initial number of cases seeding the epidemic

Value

Simulation output

Details

All durations are in days.

Parameter Updates

Parameters detailing the age-dependent probability of disease severity and durations of hospital durations have been updated in v0.5.0 of squire to reflect the changing understanding of COVID-19 transmission. Parameter arguments are by default equal to NULL, which causes the new updated parameters specified in default_probs and default_durations to be used. If any provided parameters are not NULL, these will be used. In order to ease previous fits and code, function argument walker_params will use the parameters described in Walker et al. Science. 2020 which can be viewed within the function parse_country_severity

Examples

if (FALSE) {
pop <- get_population("Afghanistan")
m1 <- run_explicit_SEEIR_model(R0 = 2,
population = pop$n, dt = 1,
contact_matrix_set=contact_matrices[[1]])
}