R0 | R Documentation |
Computes the basic reproduction number as a function of the initial exponential growth rate, conditional on a binned generation interval distribution.
R0(r, breaks, probs)
r |
a non-negative numeric vector listing initial exponential growth rates. |
breaks |
an increasing numeric vector of length 2 or greater listing break
points in the support of the generation interval distribution,
in reciprocal units of |
probs |
a numeric vector of length |
A numeric vector listing basic reproduction numbers.
For an initial exponential growth rate r
,
the basic reproduction number is computed as
r / sum(probs * (exp(-r * breaks[-n]) - exp(-r * breaks[-1L])) / (breaks[-1L] - breaks[-n])) ,
where n = length(breaks)
.
Wallinga, J. & Lipsitch M. (2007). How generation intervals shape the relationship between growth rates and reproductive numbers. Proceedings of the Royal Society B: Biological Sciences, 274(1609), 599-604. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1098/rspb.2006.3754")}
timescale
, finalsize
.
r <- seq(0, 1, 0.02)
breaks <- seq(0, 20, 1)
probs <- diff(pgamma(breaks, shape = 1, scale = 2.5))
plot(r, R0(r, breaks, probs), las = 1,
xlab = "initial exponential growth rate",
ylab = "basic reproduction number")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.