Skip to contents

This vignette describes the parametric delay distributions that are currently available in epinowcast and explains how they are internally discretised.

Available distributions

The currently available parametric delay distributions are continuous probability distributions with (up to) two parameters μg,t\mu_{g,t} and υg,t\upsilon_{g,t}. The table below provides a link to the definition of each distribution, specifies how the parameters μg,t\mu_{g,t} and υg,t\upsilon_{g,t} are mapped to the parameters of the distribution (according to the referenced definition), and states the resulting mean of the distribution (before discretization and adjustment for the assumed maximum delay).

Distribution Parametrization Mean
Log-normal μ=μg,t\mu=\mu_{g,t}, σ=υg,t\sigma = \upsilon_{g,t} exp(μg,t+υg,t22)\exp(\mu_{g,t}+\frac{\upsilon_{g,t}^2}{2})
Exponential β=exp(μg,t)\beta = \exp(-\mu_{g,t}) exp(μg,t)\exp(\mu_{g,t})
Gamma α=exp(μg,t)\alpha = \exp(\mu_{g,t}), β=υg,t\beta = \upsilon_{g,t} exp(μg,t)/υg,t\exp(\mu_{g,t})/\upsilon_{g,t}
Log-logistic α=exp(μg,t)\alpha = \exp(\mu_{g,t}), β=υg,t\beta = \upsilon_{g,t} exp(μg,t)π/υg,tsin(π/υg,t)\frac{\exp(\mu_{g,t})\,\pi/\upsilon_{g,t}}{\sin(\pi/\upsilon_{g,t})}

Discretisation and adjustment for maximum delay

In epinowcast, delays are modeled in discrete time and with an assumed maximum delay (specified via the max_delay argument). Therefore, the continuous delay distributions must be discretised and adjusted for the maximum delay.

The exact form of this discretisation is complex due to the interaction between primary and secondary events. Rather than modelling this explicitly, we approximate it by assuming a uniform censoring interval of 2 days for each delay. This comes from assuming daily censoring of both the primary and secondary events, which together define the delay distribution, and ignoring potential interactions between primary and secondary events. As a result, the probability of reporting a delay of dd days equals the probability of reporting a delay of d+1d+1 days or less, minus the probability of reporting a delay of d1d-1 days or less. This is then normalised by the overall probability of reporting any delay up to some maximum observed delay, DD.

More formally, we define this in terms of the cumulative distribution function of the delay distribution. Let Fμg,t,υg,tF^{\mu_{g,t}, \upsilon_{g,t}} be the cumulative distribution function of a continuous probability distribution of delays with parameters μg,t\mu_{g,t} and υg,t\upsilon_{g,t}. Then, the probability of reporting a delay of dd days is pg,t,d=Fμg,t,υg,t(d+1)Fμg,t,υg,t(d1)Fμg,t,υg,t(D+1)+Fμg,t,υg,t(D).p_{g,t,d} = \frac{F^{\mu_{g,t}, \upsilon_{g,t}}(d+1) - F^{\mu_{g,t}, \upsilon_{g,t}}(d-1)}{F^{\mu_{g,t}, \upsilon_{g,t}}(D + 1 ) + F^{\mu_{g,t}, \upsilon_{g,t}}(D)}.

Unless d=0d = 0 then we instead have

pg,t,0=Fμg,t,υg,t(1)Fμg,t,υg,t(D+1)+Fμg,t,υg,t(D).p_{g,t,0} = \frac{F^{\mu_{g,t}, \upsilon_{g,t}}(1)}{F^{\mu_{g,t}, \upsilon_{g,t}}(D + 1 ) + F^{\mu_{g,t}, \upsilon_{g,t}}(D)}.

Normalising by Fμg,t,υg,t(D+1)+Fμg,t,υg,t(D)F^{\mu_{g,t}, \upsilon_{g,t}}(D+1) + F^{\mu_{g,t}, \upsilon_{g,t}}(D), ensures that the pg,t,dp^{\prime}_{g,t,d} sum to 1. Since Fμg,t,υg,t(D)F^{\mu_{g,t}, \upsilon_{g,t}}(D) is the probability of reporting before the maximum delay, this can also be interpreted as conditioning our distribution on the maximum delay.

Note that because of the discretisation and normalization, the discrete delay distribution we obtain only approximates the original continuous distribution, and the approximation is worse for shorter delays.