Learn R Programming

EpiDynamics (version 0.3.1)

SIRVector: SIR model for mosquito vectors (P 4.4).

Description

Solves a simple SIR model for mosquito vectors.

Usage

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

Arguments

pars

vector with 8 values: the human mortality rate (muH), the mosquito mortality rate (muM), the human birth rate (vH), the mosquito birth rate (vM), the transmission probability from humans to mosquitos following a bite (betaHM), the transmission probability from mosquitos to humans, following a bite (betaMH), the human recovery rate (gamma) and the rate at which humans are bitten (r). Abbreviations in parenthesis indicate the names which must be given to the values.

init

vector with 4 values: the initial numbers of susceptible humans, susceptible mosquitos, infectious humans and infectious mosquitos. The names of this values must be "XH", "XM", "YH" and "YM", 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.

Value

list. The first element, *$model, is the model function. The second, third and fourth elements are vectors (*$pars, *$init, *$time, respectively) 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.

Details

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

References

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

See Also

ode.

Examples

Run this code
# NOT RUN {
# Parameters and initial conditions.
parameters <- c(muH = 5.5e-5, muM = 0.143,
                vH = 5.5e-2, vM = 1.443e3, 
                betaHM = 0.5, betaMH = 0.8, 
                gamma = 0.033, r = 0.5 / 1e3)

initials <- c(XH = 1e3, XM = 1e4, YH = 1, YM = 1)

# Solve and plot.
sir.vector <- SIRVector(pars = parameters,
                        init = initials,
                        time = 0:1000)                                 
PlotMods(sir.vector)

# }

Run the code above in your browser using DataLab