SEIR: SEIR model (2.6).

Description Usage Arguments Details Value References See Also Examples

View source: R/SEIR.R

Description

Solves a SEIR model with equal births and deaths.

Usage

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

Arguments

pars

vector with 4 values: the per capita death rate (and the population level birth rate), the transmission rate, the movement form exposed to infectious and the recovery rate. The names of these values must be "mu", "beta", "sigma" and "gamma", respectively.

init

vector with 3 values: the initial proportion of proportion of susceptibles, exposed, infectious and recovered. The names of these values must be "S", "E", "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.

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

Details

This is the R version of program 2.6 from page 41 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 to fifth column contain the proportion of susceptibles, exposed, 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
# Parameters and initial conditions.
parameters <- c(mu = 1 / (70 * 365), beta = 520 / 365,
                    sigma = 1 / 14, gamma = 1 / 7)
initials <- c(S = 0.1, E = 1e-04, I = 1e-04, R = 1 - 0.1 - 1e-4 - 1e-4)

# Solve and plot.
seir <- SEIR(pars = parameters, init = initials, time = 0:(60 * 365))
PlotMods(seir)

Example output



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