nextgenR0 {epimdr2} | R Documentation |
Next generation matrix R0 calculator
Description
Calculates R0 for arbitrarily complex compartmental flows using the method of Diekmann et al. (1990).
Usage
nextgenR0(Istates, Flist, Vlist, parameters, dfe)
Arguments
Istates |
a vector naming all Infected classes |
Flist |
a list that contains equations (as quotes) for completely new infections entering each infected compartment for each class |
Vlist |
a list that contains the equations (as quotes) for losses out of each infected compartment minus the equations (as quotes) for all gains into each infected compartment that does not represent new infections but transfers among infectious classes |
parameters |
a labeled vector of parameters |
dfe |
a labeled vector of all states at the disease-free equilibrium |
Value
The next generation matrix estimate of R0
Source
Diekmann, O., Heesterbeek, J. A. P. and Metz, J. A. J. 1990. On the Definition and the Computation of the Basic Reproduction Ratio R0 in Models for Infectious-Diseases in Heterogeneous Populations. Journal of Mathematical Biology 28: 365-382.
Examples
#The SEIR model
#Infected classes are $E$ and $I$
istates=c("E", "I")
flist=c(dEdt=quote(beta * S * I / N), dIdt=quote(0))
Vm1=quote(mu * E + sigma * E)
Vm2=quote(mu * I + alpha * I + gamma * I)
Vp1=0
Vp2=quote(sigma * E)
V1=substitute(a-b, list(a=Vm1, b=Vp1))
V2=substitute(a-b, list(a=Vm2, b=Vp2))
vlist = c(V1,V2)
para = list(mu = 0, alpha = 0, beta = 5, gamma = .8, sigma = 1.2, N = 1)
df = list(S = 1, E = 0, I = 0, R = 0)
nextgenR0(Istates=istates, Flist=flist, Vlist=vlist, parameters=para, dfe=df)