estimate_Re_from_noisy_delayed_incidence.Rd
This pipe function combines a smoothing step using (to remove noise from the original observations),
a deconvolution step (to retrieve infection events from the observed delays),
and an Re estimation step wrapping around estimate_R
.
estimate_Re_from_noisy_delayed_incidence( incidence_data, smoothing_method = "LOESS", deconvolution_method = "Richardson-Lucy delay distribution", estimation_method = "EpiEstim sliding window", delay, import_incidence_data = NULL, ref_date = NULL, time_step = "day", output_Re_only = TRUE, ... )
incidence_data | An object containing incidence data through time. It can either be:
|
---|---|
smoothing_method | string. Method used to smooth the original incidence data. Available options are:
|
deconvolution_method | string. Method used to infer timings of infection events from the original incidence data (aka deconvolution step). Available options are:
|
estimation_method | string. Method used to estimate reproductive number values through time from the reconstructed infection timings. Available options are:
|
delay | Single delay or list of delays. Each delay can be one of:
|
import_incidence_data | NULL or argument with the same requirements as |
ref_date | Date. Optional. Date of the first data entry in |
time_step | string. Time between two consecutive incidence datapoints.
"day", "2 days", "week", "year"... (see |
output_Re_only | boolean. Should the output only contain Re estimates? (as opposed to containing results for each intermediate step) |
... | Arguments passed on to
|
Time series of effective reproductive number estimates through time.
If ref_date
is provided then a date column is included with the output.
The smoothing step
uses the LOESS method by default.
The deconvolution step
uses the Richardson-Lucy algorithm by default.
The Re estimation
uses the Cori method with a sliding window by default.
## Basic usage of estimate_Re_from_noisy_delayed_incidence shape_incubation = 3.2 scale_incubation = 1.3 delay_incubation <- list(name="gamma", shape = shape_incubation, scale = scale_incubation) shape_onset_to_report = 2.7 scale_onset_to_report = 1.6 delay_onset_to_report <- list(name="gamma", shape = shape_onset_to_report, scale = scale_onset_to_report) Re_estimate_1 <- estimate_Re_from_noisy_delayed_incidence( incidence_data = HK_incidence_data$case_incidence, delay = list(delay_incubation, delay_onset_to_report) ) ## Advanced usage of estimate_Re_from_noisy_delayed_incidence # Incorporating prior knowledge over Re. Here, Re is assumed constant over a time # frame of one week, with a prior mean of 1.25. Re_estimate_2 <- estimate_Re_from_noisy_delayed_incidence( incidence_data = HK_incidence_data$case_incidence, delay = list(delay_incubation, delay_onset_to_report), estimation_method = "EpiEstim piecewise constant", interval_length = 7, mean_Re_prior = 1.25 ) # Incorporating prior knowledge over the disease. Here, the mean of the serial # interval is assumed to be 5 days, and the standard deviation is assumed to be # 2.5 days. Re_estimate_3 <- estimate_Re_from_noisy_delayed_incidence( incidence_data = HK_incidence_data$case_incidence, delay = list(delay_incubation, delay_onset_to_report), mean_serial_interval = 5, std_serial_interval = 1.25 ) # Incorporating prior knowledge over the epidemic. Here, it is assumed that Re # changes values 4 times during the epidemic, so the intervals over which Re is # assumed to be constant are passed as a parameter. last_interval_index <- length(HK_incidence_data$case_incidence) Re_estimate_4 <- estimate_Re_from_noisy_delayed_incidence( incidence_data = HK_incidence_data$case_incidence, delay = list(delay_incubation, delay_onset_to_report), estimation_method = "EpiEstim piecewise constant", interval_ends = c(50, 75, 100, 160, last_interval_index) )