SIRBirthDeath {EpiDynamics}R Documentation

SIR model with births and deaths (P 2.2).

Description

Solves a simple SIR model with equal births and deaths.

Usage

SIRBirthDeath(pars = NULL, init = NULL, time = NULL, ...)

Arguments

pars

vector with 3 values: the per capita death rate (equal to the population level birth rate), the transmission rate, and the recovery rate. The names of these values must be "mu", "beta", and "gamma", respectively.

init

vector with 3 values: the initial proportion of proportion of susceptibles, infectious and recovered. The names of these values must be "S", "I" and "R", 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.2 from page 27 of "Modeling Infectious Disease in humans and animals" by Keeling & Rohani.

All parameters must be positive and S + I + R <= 1.

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 proportion 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

# Parameters and initial conditions.
parameters <- c(mu = 1 / (70 * 365),
                       beta = 520 / 365, gamma = 1 / 7)
initials <- c(S = 0.1, I = 1e-4, R = 1 - 0.1 - 1e-4)

# Solve and plot.
sir.birth.death <- SIRBirthDeath(pars = parameters, init = initials, 
                                 time = 0:(60 * 365))
PlotMods(sir.birth.death)


[Package EpiDynamics version 0.3.1 Index]