Drag to see every result as it would have looked on that day. Play steps the cut-off forward a week at a time.
Weekly confirmed cases by onset week
Ink is the truth: in real time with the nowcast on, all onsets that will eventually be reported. Each method is corrected for right truncation with the true delay. Grey is cases by report week.
Relative error in weekly counts
Imputed ÷ true − 1. The axis fits the errors shown, at least ±2%. Values beyond the range are marked at the edge with their value.
Error in Rt
Imputed − true. Circles mark weeks on the wrong side of 1. The axis fits the errors shown, at least ±0.02. Values beyond the range are marked at the edge.
Rt from weekly counts
From the 3-week growth rate, generation interval mean 15 days (SD 9). "True onsets" is Rt estimated from the true weekly counts. "Input" is the Rt implied by the drawn growth curve; it is hidden at first, so click it in the legend to show it.
Summary by method
How the methods work
Uses the scenario set above, with the data as of the chosen report day. Pick a method and a report day, then step through or press Run.
- Back-sampling. We assume each missing onset is drawn from the raw empirical delays of cases with both dates, pooled over the whole data vintage, with no correction for right truncation and no stratification by time or place. This follows the description in issue #61 but is not confirmed. If the delays were corrected for truncation, the method would behave like the forward draw.
- The target. By default the data are cut at the last day and every method is corrected for right truncation using the true delay, as if the hub had done this correctly. Truth is all onsets that will eventually be reported. With the nowcast off, truth is the onsets of cases reported by the cut-off, so recent weeks are incomplete for the truth and every method alike. In real data the delay used for the correction would itself have to be estimated.
- Missingness. Onsets are missing at random given the report day, unless "Extra missingness with long delays" is set above 0.
- Delays. Double interval censored daily Gamma. The mean can change with onset day; the CV is fixed. Real delays have heavier tails: in the BDBV data the 99th centile is about 33 days.
- The generative method. It is given the true delay and noise-free expected counts, so it is a best case.
- Outputs. Expected values unless replicates are switched on. Counts are summed to onset weeks. Rt uses a Gamma generation interval with mean 15 days and SD 9.
Notation: a case reported on day t has unknown onset day s. C(s) is expected confirmed onsets, f(d) the forward onset-to-report delay, F its CDF, π(t, d) the chance an onset is missing, and T the data cut-off.
| Method | Where a missing onset goes | In words |
|---|---|---|
| Truth | P(s | t) ∝ C(s) f(t−s) π(t, t−s) | Depends on how many onsets there were on each earlier day. |
| Back-sampling | P(s | t) = g(t−s), g(d) ∝ f(d) Σu ≤ T−d C(u)(1−π) | Pooled delays of complete cases reported by T. The same for every t. |
| Mean shift | s = t − round(Σd d g(d)) | Every missing case moves back by the same amount. |
| Forward draw | P(s | t) = f(t−s) | The delay from onset, ignoring how many onsets there were. |
| Generative | P(s | t) ∝ λ(s) f(t−s), λ(s) = [ncomplete(s) + nallocated(s)] / F(T−s) | EM back-projection: share missing cases by the current onset curve, re-estimate the curve, repeat. |
Steady growth. If C(s) ∝ ers and π is constant, the truth is ∝ f(d) e−rd. The sum in g is also ∝ e−rd, so the back-sampling draw matches the truth. When growth changes, the two differ.
Delays. f is a double interval censored daily Gamma (primarycensored form): f(d) = G(d+1) − 2G(d) + G(d−1), with G(x) = ∫0x F(u) du.
Rt. From the weekly growth rate r with a Gamma generation interval (shape k, scale θ): R = (1 + rθ)k.
What each method is compared with
- Retrospective. Every case has been reported. Only the missing onsets are imputed, and each method is compared with C(s), the true onsets.
- Real time with the correction (the default). The data are cut at T. Each method's onsets n̂(s) are scaled up for cases not yet reported: Ĉ(s) = n̂(s) / Fs(T − s), using the true delay. Days with less than 5% reported are dropped. Ĉ is compared with all onsets that will eventually be reported.
- Real time without the correction. Untick the nowcast. Each method is compared with the onsets of cases reported by T, so recent weeks are incomplete for the truth and every method alike.
Why the correction cannot rescue a misplacement. It rescales each onset day by its own factor 1 / Fs(T − s). A case put on the wrong day is scaled by the wrong day's factor and stays on the wrong day. Near the cut-off the factors are large, so the error grows. The mean shift shows this most clearly at the cut-off.
The generative method. Its λ(s) already divides by Fs(T − s), so the correction is built in. Correcting its output again gives λ(s).
The mean shift near the cut-off. It moves every missing case back by m days, so no missing case can land after T − m. In real time those days are left out of its errors and charts, as they would be in practice.
A proper model. Here the generative method is given the true delay, and that is fine for this demonstration. A full model would estimate a time-varying delay jointly with a smoothed onset curve (for example a renewal process) and could model ascertainment, as epinowcast does.
Notes
- Cases reported on day t need the backward delay, ∝ C(t−d) f(d). The pooled empirical delay matches it only when growth is steady.
- Generative = EM back-projection, a partial deconvolution. Complete cases keep their onsets. Each missing case reported on day t is shared over onset days s in proportion to λ(s) f(t−s). λ is re-estimated from complete and shared cases, divided by F(T−s) for right truncation, until it settles. This is EM for the likelihood with the missing onsets as latent, as in Becker's HIV back-projection and Richardson–Lucy deconvolution.
- Here it gets the true delay and expected counts, and assumes onsets are missing at random given report day. That makes it a best case. With noisy counts it needs smoothing or a model (e.g. a renewal process or epinowcast), and the delay has to be estimated. The Python cross-check estimates the delay jointly and stays close to unbiased.
- Delays are double interval censored daily Gamma pmfs (primarycensored form, uniform primary event), so the daily mean equals the Gamma mean. Back-sampling draws observed whole-day delays, which need no correction. A fitted forward delay would need this correction and a right-truncation adjustment, as in primarycensored or epidist.
- Growth r(t), mean delay, fraction missing and ascertainment are linear between points every 15 days. Growth has optional mean-reverting noise. Beyond day 360 each holds its last value.
- Ebola settings: BVD 2026 early r 0.03–0.09/day, Rt about 1.8 falling to 1.0. Onset-to-sample delay mean 7.4 days. Isiro 2012 r about 0.008/day.
- Expected values. Turn on replicates to compare with noise. Weeks under 80% reported by the cut-off are shaded and excluded from growth and peak metrics.
- Cross-checked against an independent Python simulation. Source and tests: seabbs/EpidemicDates.