EpidemicDates EpidemicDates Docs

Comparing methods for imputing missing symptom onsets

Disclaimer. This is an exploratory demonstration, not an evaluation of any hub's data pipeline. The code was generated by an LLM and only this interactive page has been checked by Sam Abbott. The scenarios are simulated, and the assumptions are listed under "How the methods work".

An interactive exploration of potential biases.

The BDBV hub imputes missing onset dates by subtracting a random delay drawn from the pooled empirical delays (issue #61). Are there potential issues with that or similar approaches?

Drag to see every result as it would have looked on that day. Play steps the cut-off forward a week at a time.

Drag across any time chart to zoom. Double-click to reset. Click a legend entry to show or hide that series on every chart.

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.

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.