Skip to contents

Calculate the reproduction number from a growth rate estimate and an infectivity profile

Usage

wallinga_lipsitch(r, y, a = 1:length(y))

Arguments

r

a growth rate (may be a vector)

y

an empirical infectivity profile as a probability vector, starting at P(0<t,a[1])

a

the end time of the estimate (defaults to single days).

Value

a reproduction number estimate based on r

Examples

wallinga_lipsitch(r=seq(-0.1,0.1,length.out=9), y=dgamma(1:50, 5,2))
#> [1] 0.8140287 0.8581458 0.9038343 0.9511131 1.0000000 1.0505120 1.1026647
#> [8] 1.1564727 1.2119494