SIRInducedMortality2: SIR model with disease induced mortality: frequency-dependent...

Description Usage Arguments Details Value References See Also Examples

View source: R/SIRInducedMortality2.R

Description

Solves a SIR model with a probability of mortality, and unequal births and deaths

Usage

1
SIRInducedMortality2(pars = NULL, init = NULL, time = NULL, ...)

Arguments

pars

vector with 5 values: the probability than an infected individual dies from the disease before recovering, the per capita death rate from natural causes, the population level birth rate, the transmission rate, and the recovery rate. The names of these values must be "rho", "mu", "nu", "beta", and "gamma", respectively. All parameters must be positive.

init

vector with 3 values: the initial number of susceptibles, infectious and recovered. The names of these values must be "X", "Y" and "Z", respectively.

time

time sequence for which output is wanted; the first value of times must be the initial time.

...

further arguments passed to ode function.

Details

This is the R version of program 2.4 from page 36 of "Modeling Infectious Disease in humans and animals" by Keeling & Rohani.

Value

list. The first element, *$model, is the model function. The second, third and fourth elements are the vectors (*$pars, *$init, *$time, containing the pars, init and time arguments of the function. The fifth element *$results is a data.frame with up to as many rows as elements in time. First column contains the time. Second, third and fourth columns contain the number of susceptibles, infectious and recovered.

References

Keeling, Matt J., and Pejman Rohani. Modeling infectious diseases in humans and animals. Princeton University Press, 2008.

See Also

ode.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Parameters and initial conditions.
parameters<- c(rho = 0.5,mu = 1 / (70 * 365.0),nu= 1 / (70 * 365.0),
                      beta = 520 / 365.0, gamma = 1 / 7)
initials <- c(X = 0.2, Y = 1e-4, Z = 1 - 0.2 - 1e-4)

# Solve and plot.
sir.induced.mortality2 <- SIRInducedMortality2(pars = parameters, 
                                 init = initials, 
                                 time = 0:1e4)
PlotMods(sir.induced.mortality2)

Example output



EpiDynamics documentation built on March 26, 2020, 6:33 p.m.