EpiSewer
estimates the effective reproduction number Rt and
other parameters of interest from wastewater measurements over time. This
function combines data, assumptions and modeling details to fit a Bayesian
hierarchical model to the measurements. The resulting posterior estimates
of Rt and other parameters can be plotted and further analyzed.
The inputs to this function can be specified using various
helper functions (see below). It is best to define the inputs in advance as
separate variables and then pass them to EpiSewer
.
Usage
EpiSewer(
data = sewer_data(),
assumptions = sewer_assumptions(),
measurements = model_measurements(),
sampling = model_sampling(),
sewage = model_sewage(),
shedding = model_shedding(),
infections = model_infections(),
forecast = model_forecast(),
fit_opts = set_fit_opts(),
results_opts = set_results_opts(),
run_fit = TRUE
)
Arguments
- data
Observations such as concentration measurements and flows, specified via
sewer_data()
. The data can also be directly supplied to the relevant model components, in which casedata
can be left empty.- assumptions
Assumptions about infections, shedding, or the sewage system, specified via
sewer_assumptions()
. The assumptions can also be directly supplied to the relevant model components, in which caseassumptions
can be left empty.- measurements
The
measurements
module, seemodel_measurements()
.- sampling
The
sampling
module, seemodel_sampling()
.- sewage
The
sewage
module, seemodel_sewage()
.- shedding
The
shedding
module, seemodel_shedding()
.- infections
The
infections
module, seemodel_infections()
.- fit_opts
Settings for model fitting, see
set_fit_opts()
.- results_opts
Settings for results to be returned, see
set_results_opts()
.- run_fit
If
TRUE
(the default), the model is fitted immediately. IfFALSE
, the EpiSewerJob object is returned without fitting the model (it can be fitted later or even on a different machine).
Value
If the model fitting was successful, a list
with the following
elements is returned:
job
: theEpiSewerJob
that was runsummary
: a summary of parameter estimates of interestfitted
: the fitted model (ifresults_opts(fitted = TRUE)
)
If the model fitting fails, a list
with the following elements is
returned:
error
: information about the errors and warnings that were thrownsampler_output
: potential outputs printed by the sampler