In the joint nowcasting session we modelled each cell of the reporting triangle as
\[ n_{t,d} \mid \lambda_{t}, p_{t,d} \sim \text{Poisson}\left(\lambda_{t} \times p_{t,d}\right) \]
Ideal for learning, and fine when the reporting process is simple.
A single, fixed delay cannot capture:
To add a day-of-week effect and a time-varying delay by hand:
meanlog[t], sdlog[t]) with priorstransformed parameters, slower gradients, more to testPossible, but this is where a tested framework earns its place.
epinowcast: one flexible toolepinowcast is a Bayesian framework for real-time surveillance.
Tip
If you understand the joint nowcasting session, you already understand what epinowcast is doing, just with more flexible components.
Each piece mirrors something we built by hand; adding a feature is a one-line formula change.
| Bespoke model | epinowcast module |
|---|---|
| \(\lambda_{t}\) random walk | enw_expectation(~ rw(day)) |
| \(p_{t,d}\) delay distribution | enw_reference(~ 1) |
| report-date effects | enw_report(~ ...) |
| Poisson likelihood | enw_obs(family = "poisson") |
The course model is just these modules; everything else is an extension of one of them.
Two different weekly patterns, on different dates:
Delays may lengthen under strain and shorten with spare capacity.
Warning
We simulate a roughly linear drift, but fitting a matching linear trend would be cheating: in reality we do not know the functional form. Choose a flexible model (a random walk) instead of baking in what you simulated.
Data are often reported weekly even though events happen daily.
Each is a change to one formula, not a new model:
enw_reference(~ (1 | age_group)) — own delay per stratum, partial pooling across strataenw_missing() moduleNote
epinowcast is one tool among several. Bespoke Stan models, baselinenowcast benchmarks, and other frameworks all have their place; the right choice depends on the problem.
epinowcastModelling complex reporting processes