Risk-set-adjusted relative survivor estimator (source code)

= Risk-set-adjusted relative survivor estimator
{title2=$\widehat F_E(t)=\exp[\int_0^t\overline h_B(u)\,du]\prod_{t_j\leq t}(1-d_j/r_j)$}

With a common <excess hazard>, let $\overline h_B=\sum_iY_i h_B^{(i)}/\sum_iY_i$ be the known <background hazard> averaged over the current <risk set>. Estimate the excess <cumulative hazard> by subtracting $\int\overline h_B$ from the <Nelson–Aalen estimator>. Applying the product-limit construction gives the displayed estimator: the continuous background correction multiplies the ordinary <Kaplan–Meier estimator>. Its event jump is $1-d_j/r_j$, while between events it grows at rate $\overline h_B\widehat F_E$. Hence the unconstrained curve can increase, even if the true <excess hazard> is nonnegative. Replacing its jump factor by $\exp(-d_j/r_j)$ gives the alternative exponential cumulative-hazard estimator; these versions are close for small event fractions but are not identical.