This is a work in progress. Please consider submitting a PR to improve it.
This model is based on a discrete convolution of primary cases, scaled based on the fraction (here described as the secondary fraction but depending on application potentially being the case fatality ratio, case hospitalisation ratio, or the hospitalisation fatality ratio), and a delay distribution that is assumed to follow a discretised daily log normal distribution. This model can be thought of as a discrete time ordinary differential equation approximation generalised to log normal, rather than exponential, delay distributions.
We generalise this simple model beyond the incidence cases to also include prevalence indicators (for example hospital admissions and occupancy) where the secondary notifications can be thought of as depending on secondary notifications from the previous timestep, scaled current primary notifications, and minus scaled historic primary notifications weighted by some delay distribution.
This model can be defined as follows,
where St and Pt are observed primary and secondary notifications, Ŝt are expected secondary notifications, δp = 1 and δc = −1 when St is a prevalence measure, deltap = 0 and δc = 1 when it is an incidence based measure. α and ξ are defined as the secondary fraction and delay from primary to secondary notification (or delay from secondary notification to recovery etc in the prevalence case) with α typically being of most interest to those interpreting the models posterior estimates. We further assume that ξ follows a discretised log normal distribution described by its mean μ and standard deviation σ on the log scale (where we take the cumulative mass function for time t minus the cumulative mass function for t − 1) normalised by the maximum allowed delay D such that $\sum^D_{\tau=0}{ \xi(\tau | \mu, \sigma)} = 1$.
The above definition captures our mechanistic assumptions for the expectation of secondary notifications but does not account for potential observation noise or reporting patterns. Here we assume a negative binomial observation model (though our implementation also supports a Poisson observation model) in order to capture potential reporting overdispersion ϕ and adjust expected counts using an optional day of the week effect based on a simplex ω(t mod 7) (such that $\sum^6_{t=0}{w_t} = 7$ so the total effect over a week is balanced). This gives the following observation process,