Skip to contents

Builds 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.

Usage

delay_only_ltotal(data, delay_only)

Arguments

data

Output from enw_preprocess_data().

delay_only

Logical; if FALSE an empty (g by 0) matrix is returned so the model carries no delay-only totals.

Value

A g by t matrix of log totals (or g by 0 when not in delay-only mode).