Convenience function to convert a growth rate (little r) to a reproduction number (R) given a particular generation time.

Usage,
r2R(r, mu_gamma = 4.7, sd_gamma = 2.9)

Arguments

r

a double representing the growth rate

mu_gamma

a double representing mean of the gamma function characterizing the generation time.

sd_gamma

a double representing standard deviation of the gamma function characterizing the generation time.

Examples


cases <- rpois(10,2.5)
t <- 1:10
fit <- glm(cases ~ t, family = "poisson")

r2R(coef(fit)[2])
#>        t 
#> 0.759288