Skip to contents

simple_sirs is written to work alongside the deSolve::ode() function, and it will return an object with the proportion of individuals found in each of the SIR compartments at each of the specified time points.

Usage

simple_sirs(time, state, parameters)

Arguments

time

vector of values for which to generate the projection (length in days).

state

initial state for compartment populations. This should be a named vector for starting values of S_wild, I_wild, R_wild, S_captive, I_captive, R_captive.

parameters

list of parameters to generate projection. The parameters should include transmission parameters, immunity and recovery rates, and proportion of infected humans.

Value

when used with the deSolve::ode() function, it will return a dataframe with the proportion of individuals in each of the SIR compartments at each time point.

Details

Use simple_sirs to calculate persistence (via rootSolve::run_steady()), along with how compartment sizes change through a projection. If cumulative infections are desired, use simple_sir_with_cumulative instead. The parameter boost is included in the ODE equations for captive deer to allow implementation of applying vaccine boosters to captive deer herds as a potential management alternative to influence outbreak dynamics. See the vignette Management_Alternative_Systems.Rmd to see an example of its use. In all other cases where boosters would not be applied, boost should be set to 0.

Examples

if (FALSE) {
# prepare the input parameters:
example_inits <- 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, 500, 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 the ode function:

deSolve::ode(y = example_inits, times = example_times,
parms = example_params, func = whitetailedSIRS::simple_sirs)
}