conduct_replicate: Handles simulating replicates within 'projections'

View source: R/projections.R

conduct_replicateR Documentation

Handles simulating replicates within projections

Description

Handles simulating replicates within projections

Usage

conduct_replicate(
  x,
  r = NULL,
  t_steps = NULL,
  R0 = NULL,
  R0_change = NULL,
  tt_R0 = NULL,
  contact_matrix_set = NULL,
  contact_matrix_set_change = NULL,
  tt_contact_matrix = NULL,
  hosp_bed_capacity = NULL,
  hosp_bed_capacity_change = NULL,
  tt_hosp_beds = NULL,
  ICU_bed_capacity = NULL,
  ICU_bed_capacity_change = NULL,
  tt_ICU_beds = NULL,
  model_user_args = NULL
)

Arguments

x

Simulation replicate number

r

Output of pmcmc or calibrate

t_steps

List of time steps to be run for each replicate

R0

Numeric vector for R0 from t = 0 in the calibration. E.g. R0 = c(2, 1). Default = NULL, which will use R0_change to alter R0 if provided.

R0_change

Numeric vector for relative changes in R0 relative to the final R0 used in the calibration (i.e. at t = 0 in the calibration) E.g. R0 = c(0.8, 0.5). Default = NULL, which will use R0 to parameterise changes in R0 if provided.

tt_R0

Change time points for R0

contact_matrix_set

Contact matrices used in simulation. Default = NULL, which will use contact_matrix_set_change to alter the contact matrix if provided.

contact_matrix_set_change

Numeric vector for relative changes in the contact matrix realtive to the final contact matrix used in the calibration (i.e. at t = 0 in the calibration). E.g. contact_matrix_set_change = c(0.8, 0.5). Default = NULL, which will use contact_matrix_set to parameterise changes in contact matrices if if provided.

tt_contact_matrix

Time change points for matrix change. Default = 0

hosp_bed_capacity

Numeric vector for hospital bed capacity from t = 0 in the calibration. Default = NULL, which will use hosp_bed_capacity_change to alter hosp_bed_capacity if provided.

hosp_bed_capacity_change

Numeric vector for relative changes in hospital bed capacity relative to the final hospital bed capacity used in the calibration (i.e. at t = 0 in the calibration). E.g. hosp_bed_capacity_change = c(0.8, 0.5). Default = NULL, which will use hosp_bed_capacity to parameterise changes in hospital bed capacity if provided.

tt_hosp_beds

Change time points for hosp_bed_capacity

ICU_bed_capacity

Numeric vector for ICU bed capacity from t = 0 in the calibration. Default = NULL, which will use ICU_bed_capacity_change to alter ICU_bed_capacity if provided.

ICU_bed_capacity_change

Numeric vector for relative changes in ICU bed capacity relative to the final ICU bed capacity used in the calibration (i.e. at t = 0 in the calibration). E.g. ICU_bed_capacity_change = c(0.8, 0.5). Default = NULL, which will use ICU_bed_capacity to parameterise changes in ICU bed capacity if provided.

tt_ICU_beds

Change time points for ICU_bed_capacity

model_user_args

List of other parameters to be passed to the model to be run. Default = NULL. An example would be:

list( list( "prob_severe" = runif(17), "tt_dur_get_ox_survive" = c(0, 10), "gamma_get_ox_survive" = 0.2), list( "prob_severe" = runif(17), "tt_dur_get_mv_survive" = c(0, 5), "gamma_get_mv_survive" = 0.1) )

The list should be the same length as the number of replicates in the simulations. Each list element should then be a list with elements named to match the arguments expected by the odin model with r. Above would be suitable to set the model parameters for a simulation with 2 replicates. You do not have to have the same arguments in each list.


mrc-ide/squire documentation built on Sept. 10, 2022, 1:11 a.m.