This function estimates the time-varying reproduction number (R_t) using the method proposed by Wallinga and Teunis (AJE 2004). The function takes as input a data frame with incidence data and requires the specification of the serial interval distribution. The user must input the mean and standard deviation of the serial interval distribution and select the functional form: Normal or Gamma.
Arguments
- inc_dat
data frame; data frame with incidence data. The data frame should have two columns: inc (daily incidence) and onset_date. Onset_date does not have to be in date format, it can be a column of days, such as c(1,2,3,4, ... ),
- mean_si
numeric; mean of serial interval distribution
- sd_si
numeric; standard deviation of serial interval distribution
- dist_si
string; distribution to be assumed for serial interval. Accepts "normal" or "gamma".
- n_bootstrap
integer; number of bootstrap samples of the serial interval distribution