View source: R/estimate_R_ww.R
estimate_R_ww | R Documentation |
Estimate the effective reproduction from wastewater concentration data.
estimate_R_ww(
ww.conc,
dist.fec,
dist.gi,
scaling.factor = 1,
prm.smooth = list(window = 14, align = "center", method = "loess", span = 0.2),
prm.R = list(iter = 10, CI = 0.95, window = 7, config.EpiEstim = NULL),
silent = FALSE,
RL.max.iter = 9
)
ww.conc |
Data frame. Must have variables:
|
dist.fec |
List. Parameters for the fecal shedding distribution in the same format as returned by |
dist.gi |
List. Parameters for the generation interval distribution in the same format as returned by |
scaling.factor |
Numeric. Scaling from wastewater concentration to prevalence. This value may be assumed or independently calibrated to data. |
prm.smooth |
List. list of smoothing parameters. Parameters should be specified as followed:
Set this entire list to |
prm.R |
List. Settings for the ensemble when calculating Rt. Elements include:
|
silent |
Logical. Flag to suppress all output messages, warnings, and progress bars. |
RL.max.iter |
Integer. Maximum of iterations for the Richardson-Lucy deconvolution algorithm. |
List. Elements include:
ww.conc
: original wastewater signal
ww.smooth
: smoothed wastewater signal
inc
: inferred incidence
R
: the effective reproduction number estimate
plot_diagnostic_ww()
estimate_R_cl()
# Load data of viral concentration in wastewater
data("ww.data")
# Run the estimation of Rt based on the wastewater data
x = estimate_R_ww(
ww.conc = ww.data,
dist.fec = ern::def_dist(
dist = "gamma",
mean = 12.90215,
mean_sd = 1.136829,
shape = 1.759937,
shape_sd = 0.2665988,
max = 33
),
dist.gi = ern::def_dist(
dist = "gamma",
mean = 6.84,
mean_sd = 0.7486,
shape = 2.39,
shape_sd = 0.3573,
max = 15
),
silent = TRUE
)
# Rt estimates
head(x$R)
# inferred daily incidence
head(x$inc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.