Computes the proportion of a population expected to be infected over the course of an epidemic, as a function of the basic reproduction number.
finalsize(R0, S0, I0)
Arguments
R0: a numeric vector listing non-negative values for the basic reproduction number.
S0, I0: numeric vectors listing values in the interval [0,1] for the proportions of the population that are susceptible and infected, respectively, at the start of the epidemic. Hence S0 + I0
must be less than or equal to 1.
Returns
A numeric vector listing values in the interval [0,1] for the expected epidemic final size.
Details
At least one of S0 and I0 must be supplied. If S0 (I0) is supplied but not I0 (S0), then the latter is assigned the value of one minus the former.
R0, S0, and I0 are recycled to a common length (the maximum of their lengths).
Computation
The basic reproduction number R0 defines the expected epidemic final size Z through an implicit equation,
Here, W denotes the
c("\n", " Lambert ", "list(list("W"))", " function").
finalsize computes this solution, relying on function
lambertWfrom package emdbook.
See Also
timescale, R0.
References
Ma, J. & Earn, D. J. D. (2006). Generality of the final size formula for an epidemic of a newly invading infectious disease. Bulletin of Mathetmatical Biology, 68(3), 679-702. tools:::Rd_expr_doi("10.1007/s11538-005-9047-7")
Examples
R0 <-10^seq(-3,1, length.out =151L)plot(R0, finalsize(R0, S0 =1, I0 =0), type ="l", las =1, xlab ="basic reproduction number", ylab ="final size")