Learn R Programming

primer (version 1.2.0)

SIRd: The S-I-R Epidemilogical Disease Model

Description

The S-I-R epidemilogical disease model with density-dependent transmission, for use with ode in the deSolve package.

Usage

SIRd(t, y, p)

Arguments

t

times points for which values will be returned

y

the vector of disease states of hosts (S, I, R)

p

a vector of parameters

Value

Returns of list of one component (required by ode).

Details

The user does not put these directly into this function, but rather uses ode in the deSolve package.

References

Ellner, S.P. and Guckenheimer, J. (2006) Dynamic Models in Biology, Princeton University Press.

Kermack, W.O. and McCormick, W.G. (1927) A contribution to the mathematical theory of epidemics. Proceedings of the Royal Society, Series A, 115, 700--721.

Stevens, M.H.H. (2009) A Primer of Ecology with R, Use R! Series. Springer.

See Also

ross, SIRf, SIRbd

Examples

Run this code
# NOT RUN {
N <- 10^3; I <- R <- 1; S <- N - I - R
parms <- c(B=.01, g=4)
months <- seq(0, 3, by=0.01)
require(deSolve)
SIR.out <- data.frame( ode(c(S,I,R), months, SIRd, parms) )
matplot(months, SIR.out[,-1], type='l')
legend('right', c('R', 'I', 'S'), lty=3:1, col=3:1, bty='n')

# }

Run the code above in your browser using DataLab