Skip to contents

This is a work in progress. Please consider submitting a PR to improve it.

This model deals with the problem of nowcasting, or adjusting for right-truncation in reported count data. This occurs when the quantity being observed, for example cases, hospitalisations or deaths, is reported with a delay, resulting in an underestimation of recent counts. The estimate_truncation() model attempts to infer parameters of the underlying delay distributions from multiple snapshots of past data. It is designed to be a simple model that can integrate with the other models in the package and therefore may not be ideal for all uses. For a more principled approach to nowcasting please consider using the epinowcast package.

Given snapshots CtiC^{i}_{t} reflecting reported counts for time tt where i=1Si=1\ldots S is in order of recency (earliest snapshots first) and SS is the number of past snapshots used for estimation, we try to infer the parameters of a discrete truncation distribution ζ(τ|μζ,σζ)\zeta(\tau | \mu_{\zeta}, \sigma_{\zeta}) with corresponding probability mass function Z(τ|μζZ(\tau | \mu_{\zeta}).

The model assumes that final counts DtD_{t} are related to observed snapshots via the truncation distribution such that

$$\begin{equation} C^{i < S)_{t}_\sim \mathcal{NegBinom}\left(Z (T_i - t | \mu_{Z}, \sigma_{Z}) D(t) + \sigma, \varphi\right) \end{equation}$$

where TiT_i is the date of the final observation in snapshot ii, Z(τ)Z(\tau) is defined to be zero for negative values of τ\tau and σ\sigma is an additional error term.

The final counts DtD_{t} are estimated from the most recent snapshot as

Dt=CSZ(TSt|μZ,σZ)\begin{equation} D_t = \frac{C^{S}}{Z (T_\mathrm{S} - t | \mu_{Z}, \sigma_{Z})} \end{equation}

Relevant priors are:

μζNormal(0,1)σζHalfNormal(0,1)φHalfNormal(0,1)σHalfNormal(0,1)\begin{align} \mu_\zeta &\sim \mathrm{Normal}(0, 1)\\ \sigma_\zeta &\sim \mathrm{HalfNormal}(0, 1)\\ \varphi &\sim \mathrm{HalfNormal}(0, 1)\\ \sigma &\sim \mathrm{HalfNormal}(0, 1) \end{align}