This option fits the EpiSewer model to pathogen concentrations
measured in wastewater samples. It is suitable for different quantification
methods such as qPCR or dPCR. By default, the measured concentrations are
modeled via a gamma likelihood.
Usage
concentrations_observe(
measurements = NULL,
composite_window = 1,
date_col = "date",
concentration_col = "concentration",
replicate_col = NULL,
n_averaged = 1,
n_averaged_col = NULL,
total_partitions_col = NULL,
modeldata = modeldata_init()
)Arguments
- measurements
A
data.framewith each row representing one measurement. Must have at least a column with dates and a column with concentration measurements.- composite_window
Over how many days has each measured sample been collected? If 1 (default), samples represent single days. If larger than 1, samples are assumed to be equivolumetric composites over several dates. In this case, the supplied dates represent the last day included in each sample.
- date_col
Name of the column containing the dates.
- concentration_col
Name of the column containing the measured concentrations.
- replicate_col
Name of the column containing the replicate ID of each measurement. This is used to identify multiple measurements made of a sample from the same date. Should be
NULLif only one measurement per date was made.- n_averaged
The number of technical replicates (i.e. repeated PCR runs) used for each sample or biological replicate. The concentration provided in the
measurementsdata.frameis assumed to be the average or pooled estimate from several technical replicates. Can be either a single number (it is then assumed that the number of averaged replicates is the same for each observation) or a vector (one value for each observation).- n_averaged_col
Name of the column in the
measurementsdata.frame containing the number of technical replicates over which the measurements have been averaged/pooled. This is an alternative to specifyingn_averaged.- total_partitions_col
Name of the column in the
measurementsdata.frame containing the number of total partitions (e.g. droplets for ddPCR) in the dPCR reaction of each measurement. If several technical replicates are used, this should be the AVERAGE number of valid partitions per replicate. Only applies when modeling concentration measurements via the dPCR-specific noise model. Can be used by thenoise_estimate_dPCR()andLOD_estimate_dPCR()modeling components. Note that this is really the number of valid partitions, not the number of positive partitions.- modeldata
A
modeldataobject to which the above model specifications should be added. Default is an empty model given bymodeldata_init(). Can also be an already partly specified model returned by otherEpiSewermodeling functions.
Value
A modeldata object containing data and specifications of the model
to be fitted. Can be passed on to other EpiSewer modeling functions to
add further data and model specifications.
The modeldata object also includes information about parameter
initialization (.init), meta data (.metainfo), and checks to be
performed before model fitting (.checks).
See also
Other observation types:
concentrations_observe_partitions()