# r2R0: Transform a growth rate into a reproduction number In epitrix: Small Helpers and Tricks for Epidemics Analysis

## Description

The function `r2R0` can be used to transform a growth rate into a reproduction number estimate, given a generation time distribution. This uses the approach described in Wallinga and Lipsitch (2007, Proc Roy Soc B 274:599–604) for empirical distributions. The function `lm2R0_sample` generates a sample of R0 values from a log-linear regression of incidence data stored in a `lm` object.

## Usage

 ```1 2 3``` ```r2R0(r, w, trunc = 1000) lm2R0_sample(x, w, n = 100, trunc = 1000) ```

## Arguments

 `r` A vector of growth rate values. `w` The serial interval distribution, either provided as a `distcrete` object, or as a `numeric` vector containing probabilities of the mass functions. `trunc` The number of time units (most often, days), used for truncating `w`, whenever a `distcrete` object is provided. Defaults to 1000. `x` A `lm` object storing a a linear regression of log-incidence over time. `n` The number of draws of R0 values, defaulting to 100.

## Details

It is assumed that the growth rate ('r') is measured in the same time unit as the serial interval ('w' is the SI distribution, starting at time 0).

## Author(s)

Code by Anne Cori [email protected], packaging by Thibaut Jombart [email protected]

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30``` ```## Ebola estimates of the SI distribution from the first 9 months of ## West-African Ebola oubtreak mu <- 15.3 # days sigma <- 9.3 # days param <- gamma_mucv2shapescale(mu, sigma / mu) if (require(distcrete)) { w <- distcrete("gamma", interval = 1, shape = param\$shape, scale = param\$scale, w = 0) r2R0(c(-1, -0.001, 0, 0.001, 1), w) ## Use simulated Ebola outbreak and 'incidence' to get a log-linear ## model of daily incidence. if (require(outbreaks) && require(incidence)) { i <- incidence(ebola_sim\$linelist\$date_of_onset) plot(i) f <- fit(i[1:100]) f plot(i[1:150], fit = f) R0 <- lm2R0_sample(f\$model, w) hist(R0, col = "grey", border = "white", main = "Distribution of R0") summary(R0) } } ```

epitrix documentation built on May 2, 2019, 6:35 a.m.