R0 {epigrowthfit}R Documentation

Compute the Basic Reproduction Number

Description

Computes the basic reproduction number as a function of the initial exponential growth rate, conditional on a binned generation interval distribution.

Usage

R0(r, breaks, probs)

Arguments

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 r.

probs

a numeric vector of length length(breaks)-1. probs[i] is the probability that the generation interval is between breaks[i] and breaks[i+1]. It is sufficient to supply probability weights, as internally the vector is divided by its sum.

Value

A numeric vector listing basic reproduction numbers.

Computation

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).

References

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. doi:10.1098/rspb.2006.3754

See Also

timescale, finalsize.

Examples

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")

[Package epigrowthfit version 0.15.3 Index]