SIRf: The S-I-R Epidemilogical Disease Model with Frequency...

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

Description

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

Usage

1
SIRf(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 <HStevens@muohio.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, SIR, SIRbd, ode

Examples

1
2
3
4
5
6
R <- 0; S <- 1000;  I <- 1000; N <- S+I+R
parmsf <- c(B=1, g=1)
Months <- seq(0, 8, by=0.1)
outf <- ode(c(S,I,R), Months, SIRf, parmsf)
matplot(Months, outf[,-1], type='l', ylab="Prevalence (I/N)")
legend('right', legend=c('S','I','R'), lty=1:3, col=1:3, bty='n')


Search within the primer package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.