Calculate a reproduction number estimate from growth rate using the methods described in the vignette "Estimating the reproduction number from modelled incidence" and using an empirical generation time distribution.
Arguments
- df
Count data
A dataframe containing the following columns:
time (as.time_period + group_unique) - A (usually complete) set of singular observations per unit time as a `time_period`
incidence.fit (double) - an estimate of the incidence rate on a log scale
incidence.se.fit (double) - the standard error of the incidence rate estimate on a log scale
incidence.0.025 (positive_double) - lower confidence limit of the incidence rate (true scale)
incidence.0.5 (positive_double) - median estimate of the incidence rate (true scale)
incidence.0.975 (positive_double) - upper confidence limit of the incidence rate (true scale)
No mandatory groupings.
No default value.
- ip
Infectivity profile
A dataframe containing the following columns:
boot (anything) - a bootstrap identifier
time (positive_double) - the end of the time period (in days)
probability (proportion) - the probability of infection between previous time period until `time`
Must be grouped by: boot (exactly).
A default value is defined.
Value
A dataframe containing the following columns:
time (as.time_period + group_unique) - A (usually complete) set of singular observations per unit time as a
time_period
rt.fit (double) - an estimate of the reproduction number
rt.se.fit (double) - the standard error of the reproduction number
rt.0.025 (double) - lower confidence limit of the reproduction number
rt.0.5 (double) - median estimate of the reproduction number
rt.0.975 (double) - upper confidence limit of the reproduction number
No mandatory groupings.
No default value.
Examples
df = growthrates::england_covid %>%
time_aggregate(count=sum(count)) %>%
poisson_locfit_model()
if (FALSE) {
# not run
tmp2 = df %>% rt_from_incidence()
}