Background
The package currently supports interval censoring on the exposure end only (type 5 data). The event time (e.g. symptom onset) is assumed to be observed exactly. For delays other than the incubation period, such as the serial interval, generation time, or time to recovery, both endpoints may be interval-censored.
Mathematical formulation
Let $E \in [E_L, E_R]$ be the exposure window and $O \in [O_L, O_R]$ be the event window. Assuming each is uniformly distributed within its window, the likelihood contribution for a single observation reduces to a 1D integral:
$$L \propto \int_{E_L}^{E_R} \bigl[F_D(O_R - e) - F_D(O_L - e)\bigr], de$$
The existing type 5 likelihood ( $F_D(o - E_L) - F_D(o - E_R)$ ) is recovered as the special case $O_L = O_R = o$.
Naive approximation and its bias
A naive approach would use the outer delay bounds directly: $F_D(O_R - E_L) - F_D(O_L - E_R)$. This is equivalent to assigning uniform
weight to all delays in the outer interval $[O_L - E_R,, O_R - E_L]$, whereas the correct weight function is trapezoidal. The bias grows with the censoring window width relative to the mean delay.
Proposed implementation
-
New data type (type 6) accepting four columns per observation:
expo_lower, expo_upper, event_lower, event_upper
-
Stan likelihood: Gauss-Legendre quadrature ( $K \approx 7$ - $15$ points over $[E_L, E_R]$, evaluating CDF differences — fast and accurate without requiring
integrate_1d
-
R interface: new input format branch in
prepare_stan_data_from_datasets()
Special cases handled
| Observation type |
Likelihood |
| Both endpoints point-observed |
$f_D(o_0 - e_0)$ |
| Exposure interval, event exact (current type 5) |
$F_D(o - E_L) - F_D(o - E_R)$ |
| Exposure exact, event interval |
$F_D(O_R - e_0) - F_D(O_L - e_0)$ |
| Both interval-censored (proposed type 6) |
$\int_{E_L}^{E_R} [F_D(O_R-e) - F_D(O_L-e)],de$ |
Background
The package currently supports interval censoring on the exposure end only (type 5 data). The event time (e.g. symptom onset) is assumed to be observed exactly. For delays other than the incubation period, such as the serial interval, generation time, or time to recovery, both endpoints may be interval-censored.
Mathematical formulation
Let$E \in [E_L, E_R]$ be the exposure window and $O \in [O_L, O_R]$ be the event window. Assuming each is uniformly distributed within its window, the likelihood contribution for a single observation reduces to a 1D integral:
The existing type 5 likelihood ($F_D(o - E_L) - F_D(o - E_R)$ ) is recovered as the special case $O_L = O_R = o$ .
Naive approximation and its bias
A naive approach would use the outer delay bounds directly:$F_D(O_R - E_L) - F_D(O_L - E_R)$ . This is equivalent to assigning uniform$[O_L - E_R,, O_R - E_L]$ , whereas the correct weight function is trapezoidal. The bias grows with the censoring window width relative to the mean delay.
weight to all delays in the outer interval
Proposed implementation
expo_lower,expo_upper,event_lower,event_upperintegrate_1dprepare_stan_data_from_datasets()Special cases handled