SIS2RiskGroups: SIS model with 2 risk groups (P 3.1).

Description Usage Arguments Details Value References See Also Examples

View source: R/SIS2RiskGroups.R

Description

Solves a SIS model with high-risk (H) and low-risk (L).

Usage

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

Arguments

pars

vector with 6 values: 4 transmission rates, 1 recovery rate and the proportion of the population that are in the high-risk group. The names of these values must be "betaHH","betaHL","betaLL", "betaLH", "gamma" and "nH", respectively. The letters after the word "beta" denote transmission to any group from any group, e.g., "betaHL" represent transmission to high-risk group from low-risk group. All parameters must be positive.

init

vector with 2 values: the initial proportion of infectious in the high-risk group and the intial proportion of infectious in the low-risk group. The names of these values must be "IH" and "IL", 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 3.1 from page 58 of "Modeling Infectious Disease in humans and animals" by Keeling & Rohani.

All parameters must be positive and nH <= 1, IH(0) <= nH, IL(0) <= 1-nH.

Value

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

References

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

See Also

ode.

Examples

1
2
3
4
5
6
7
8
9
# Parameters and initial conditions.
parameters <- c(betaHH = 10.0, betaHL = 0.1, betaLH = 0.1,
                betaLL = 1.0, gamma = 1, nH = 0.2)
initials <- c(IH = 0.00001, IL = 0.001)

# Solve and plot.
sis2risk.groups<- SIS2RiskGroups(pars = parameters,
                                 init = initials, time = 0:15)
PlotMods(sis2risk.groups, variables = c('IL', 'IH'), grid = FALSE)

oswaldosantos/EpiDynamics documentation built on May 24, 2019, 4:59 p.m.