SIRmod: The S-I-R Epidemilogical Disease Model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The S-I-R epidemiological disease model with births and deaths (population dynamics), for use with ode in the deSolve package. This model uses scaled transmission, where z controls the degree of density- and frequency-dependence.

Usage

1
SIRmod(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

Details

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

Value

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

Author(s)

Hank Stevens <Hank.Stevens@miamioh.edu>

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, SIRd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(deSolve)
N <- 10^6; R <- 0; I <- 1; S <- N - I - R
g <- 1/(13/365); b <- 1/50; z <- 0;
age <- 5; R0 <- 1 + 1/(b*age)
B <- R0 * (g + b) / N
parms <- c(B = B, g = g, b = b, mu=b)
years <- seq(0,30, by=.1)
SIR.out <- data.frame(ode(c(S=S,I=I,R=R), years, SIRmod, parms, hmax=.01))
matplot(SIR.out[,1], sqrt(SIR.out[,-1]), type='l',
        lty=1:3, ylab="sqrt(No. of Individuals)", xlab='Years')
legend('right', c('S','I','R'), lty=1:3, col=1:3, bty='n')

primer documentation built on Jan. 7, 2021, 1:07 a.m.