SISPairwiseApprox: Pairwise SIS approximation model (P 7.8).

Description Usage Arguments Details Value References See Also Examples

View source: R/SISPairwiseApprox.R

Description

Solves a pairwise approximation to the SIS model on a random network of N individuals, each with n contacts.

Usage

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

Arguments

pars

vector with 4 values: the transmission rate across a contact, the recovery rate for infectious individuals, the number of connections per individual in the population and the number of individuals in the population. The names of these values must be "tau", "gamma", "n" and "N" respectively.

init

vector with 3 values: the initial number of of susceptibles, infectious and susceptible-infectious pairs. The names of these values must be "X", "Y" and "XY", 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.

Details

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

All parameters must be positive.

Value

list. The first element, *$model, is the model function. The second, third and fourth elements are the vectors *$pars, *$init and *$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, third and fourth columns contain the number of susceptibles, infectious and susceptible-infectious pairs.

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
9
# Parameters and initial conditions.
n <- 4; N <- 1e4; Y <- 1; X <- N - Y
parameters <- c(tau = 0.1, gamma = 0.05, n = n, N = N)
initials <- c(X = X, Y = Y, XY = n * Y * X / N)

# Solve and plot.
sis.pairwise.approx <- SISPairwiseApprox(pars = parameters,
                                         init = initials, time = 0:100)
PlotMods(sis.pairwise.approx)

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