Run ODE Solver for SIRS model
Usage
run(
  iter = NULL,
  initial_compartments = NULL,
  initial_compartments_steady = NULL,
  params = NULL,
  times = NULL,
  name = NULL
)Arguments
- iter
 Number of iterations, often referred to as 'nsamples' in package examples
- initial_compartments
 Initial compartment sizes, including (proportions, stored as list)
- initial_compartments_steady
 Initial compartment sizes for steady state calculation (proportions, stored as list)
- params
 SIRS parameters, stored as a list
- times
 Length of projection (days)
- name
 Name of context being simulated
Value
List containing iteration details, including initial compartment sizes for ODE solver and steady state calculation, parameters, context name, and daily, proportional sizes of each SIRS compartment and cumulative infections during the 120 day projection, and whether the SARS-CoV-2 persists at equilibrium.
Examples
if (FALSE) {
nsamples = 10
example_inits <- c(S_wild = 1, I_wild = 0,
                   R_wild = 0, I_wild_cumulative = 0,
                   S_captive = 1, I_captive = 0,
                   R_captive = 0, I_captive_cumulative = 0)
example_inits_steady <- c(S_wild = 1, I_wild = 0,
                   R_wild = 0, S_captive = 1,
                   I_captive = 0, R_captive = 0)
# set the time to run
example_times <-  seq(0, 365, by = 1)
# Set parameters of transmission, immunity, recovery
example_params <- c(alpha_immunity = 0.03,
                    beta_aero_ww = 0.01,
                    beta_aero_cw = 0.01,
                    beta_aero_cc = 0.02,
                    beta_aero_hw = 0.01,
                    beta_aero_hc = 0.2,
                    beta_dc_ww = 0.01,
                    beta_dc_cw = 0.01,
                    beta_dc_cc = 0.01,
                    gamma_recov = 0.01,
                    I_human = 0.05,
                    boost = 0)
run(iter = nsamples,
initial_compartments = example_inits,
initial_compartments_steady = example_inits_steady,
params = example_params,
times = example_times,
name = Test)}