When you estimate a delay in real time, the naive estimate is biased. The headline problem is right truncation: at the moment you look, long delays simply haven't had time to be observed, so the delays you can see are systematically too short — and the mean delay comes out under-estimated. This page builds that bias from the ground up, then previews the knock-on effect on epidemic curves and a note on interval censoring.
A primary event, a delay, then a secondary event — observed only once it has happened
Most epidemiological delays connect two events: a primary event (say a symptom onset) and a secondary event a little later (a hospital admission). The delay d between them is what we want to estimate. In this session we model it as a lognormal distribution with mean m and standard deviation s:
where φ and Φ are the standard Normal density and CDF. The crucial real-time twist: a secondary event at time t+d only enters your data once it has actually happened. If you look at the world at time "now" = T, every pair with t+d > T is invisible. The longer delays are the ones still in flight.
Look too early, and the delays you can see are the short ones
Primary events arrive over calendar time with an intensity that follows the epidemic. Take exponential dynamics with growth rate r: the rate of primary events at time t is ∝ e rt (growing if r > 0, declining if r < 0). Each primary event at time t carries a delay d ~ lognormal(m, s) and produces its secondary event at t+d. We look at the world at "now" = T, and we observe a pair only if its secondary event has already happened: t+d ≤ T, equivalently d ≤ T−t. Everything else is right-truncated — still in flight, invisible.
The picture on the left is the raw process: one dot per individual, plotted by its primary event time t and its delay d. The descending line d = T−t is the truncation boundary. Dots below it are observed; dots in the shaded wedge above it are not yet seen. The picture on the right collapses the observed dots onto the delay axis as a density and compares it with the true lognormal.
Crank r up and the dots pile toward the right edge (recent primaries); for those, only short delays clear the boundary, so the observed cloud is squashed downward and the observed mean delay falls below the true mean m. Push the observation time T earlier and the boundary line drops, cutting off more long delays. Slow the epidemic or wait longer, and older primaries with their full range of delays re-enter the observed set.
Left: each dot is one individual at (primary time t, delay d); the red line is the boundary d = T−t and the shaded wedge above it is not yet observed. Right: the observed delays (orange histogram) sit left of the true lognormal (blue), and the observed mean falls short of the true mean.
The bars make the gap between the true and observed mean delay impossible to miss. With a growing epidemic and an early look it can be severe; with a declining epidemic and a late look it nearly vanishes — most primary events are old enough to have completed.
Right truncation doesn't just bias the delay — it bends the recent epidemic curve
The same incompleteness distorts the secondary-event curve itself. Build the expected number of secondary events on day τ by spreading each day's primary events forward through the delay distribution:
That is the final curve — what you would see once everything has reported. But near "now", the most recent days are still filling in: a secondary event due on day τ is only counted if it has happened, and the cohorts that feed those recent days are dominated by short delays. The observed-so-far curve therefore dips below the truth in the last few days before T, then is blank afterwards. Mistake that dip for a real downturn and you call a peak that isn't there.
The shaded wedge near T is the secondary events that will occur on those days but haven't been observed yet. This is exactly the gap a nowcast sets out to fill.
Dates, not times — every event is only known to the day it fell on
Real line lists record dates, not exact times. An onset "on 20 June" could have been at 00:01 or 23:59; an admission "on 22 June" likewise. The recorded delay is the difference of two floored days, so a true delay of 2.0 days might be logged as anything from 1 to 3. Because both events are censored, the course calls this double interval censoring.
Below, a continuous lognormal delay (blue line) is rounded the naive way — flooring the delay — versus the proper double-censored process that floors both event times. Watch the discrete pmf shift relative to the truth, especially when the delay is short relative to the one-day grid.
The flooring drops every delay by up to one interval on average, so the censored mean tends to fall below the truth, and the effect is largest when the interval is big relative to the delay — exactly why the session switches to short delays to make censoring visible. A wider interval (try weekly reporting) magnifies it.
censored-delay-model and truncated-delay-model Stan models; the primarycensored and epidist packages handle both together with analytical solutions.