McGough 2020 - NobBS Model and Priors
Summary
NobBS models each reporting-triangle cell as Poisson or negative-binomial with mean , a geometric random walk on and a Dirichlet prior on the delay vector . Priors are weak by default but can encode a known delay shape; the total nowcast is including unobserved cells drawn from the posterior predictive.
Overview
The model is a multiplicative (log-additive) decomposition: a time signal times a delay profile. It is “hierarchical” in the sense that all weeks share and the random-walk variance (see Hierarchical Models), and a state-space model in the sense that is a latent random walk (Linear-Gaussian State-Space Models).
Main Content
Observation model
Poisson (dengue): . Negative binomial (ILI, extra-Poisson variation): with , so the mean is and the variance exceeds it.
Mean structure
, i.e. . is the true epidemiologic signal for week (so is the expected total ); is the probability of reporting at delay , .
Priors
- Delay vector: . Default (weak, equal weight per delay). In the paper’s analyses encodes a pseudo-count of hypothetical cases spread by the empirical delay pattern in the training period; an equal-weight prior made no material difference. can represent “delay “.
- Signal: first-order random walk, , for . Because is on the log scale this is a geometric random walk.
- Random-walk precision: (default). A stronger prior such as Ga(10, 0.1) forces small week-to-week changes and a smoother curve.
- NB dispersion: , mildly informative (moderate departure from Poisson).
Nowcast quantity
At nowcast time the posterior of is obtained by drawing the unobserved cells () from their predictive distribution given the posterior of ; observed cells enter as known. For the latest week only is known, and the nowcast is driven by shrunk toward by the random walk.
Implementation: JAGS in R with 10,000 posterior samples; trace plots checked visually. The CRAN NobBS package accepts one record per case (onset date, report date), default Poisson with no moving window, series length , and customisable priors. A prior such as expresses “3% same week, 30% after one week, …” (paper’s dengue example).
Examples
Why the random walk helps
Suppose delay-0 reports jump from 13 to 29 in one week with . A pure scale-up gives . The random walk on says last week’s total was near and pulls the new estimate toward it in proportion to the learned step variance, so the nowcast lands between 45 and 100. The paper documents exactly this behaviour on 3 Aug 1998 and 16 Aug 2010: an outlier at drove an overestimate corrected the following week.
import numpy as np
rng=np.random.default_rng(0)
T,D=60,6; beta=np.array([.05,.3,.3,.2,.1,.04,.01])
alpha=np.cumsum(rng.normal(0,.1,T))+4
lam=np.exp(alpha)[:,None]*beta[None,:]
n=rng.poisson(lam)
obs=np.add.outer(np.arange(T),np.arange(D+1))<=T-1 # observed cells
nowcast_naive=np.where(obs,n,0).sum(1)
print(nowcast_naive[-3:], n.sum(1)[-3:]) # truncated vs truthConnections
McGough 2020 - Reporting Triangle and Chain-Ladder Setup defines the cells; results in McGough 2020 - Evaluation Design and Results; limitations (delay assumed constant inside the window) in McGough 2020 - Delay Dynamics, Moving Windows and Limitations. The delay-hazard alternative for E38 is in Nowcasting Concepts - Delay Hazard Models and the Renewal Equation.
See Also
McGough 2020 - Nowcasting by Bayesian Smoothing - Overview · Bayesian Structural Time-Series Model