
Known per-reference-date totals for the delay-only model
Source:R/model-module-helpers.R
delay_only_ltotal.RdBuilds the dlo_ltotal data entry for the delay-only model. The known
totals are the latest available confirm per reference date and group,
supplied to Stan on the log scale as a g by t matrix (cmdstanr's layout
for array[g] vector[t]). The log total is only an offset on the expected
cells and cancels in the multinomial likelihood, so reference dates with no
observed cells (a non-positive or missing latest total, e.g. the most recent
dates under an observation indicator) are floored to 1 (log 0); such dates
contribute nothing to the likelihood.
Arguments
- data
Output from
enw_preprocess_data().- delay_only
Logical; if
FALSEan empty (gby0) matrix is returned so the model carries no delay-only totals.
See also
Helper functions for model modules
add_max_observed_delay(),
add_pmfs(),
convolution_matrix(),
delay_only_total(),
enw_dayofweek_structural_reporting(),
enw_reference_by_report(),
enw_reps_with_complete_refs(),
enw_structural_reporting_metadata(),
extract_obs_metadata(),
extract_sparse_matrix(),
latest_obs_as_matrix()