Survival 0.1.0 nelsonaalencurve - CyrilB1531/lodestar GitHub Wiki
Lodestar.Survival 0.1.0. This page is frozen at that release. Read the current documentation for what
mainsays now. A link to a decision or a migration page followsmain, and leaves the archive.
NelsonAalenCurve
A Nelson-Aalen cumulative-hazard curve.
public sealed record NelsonAalenCurve(SurvivalStep[] Steps, double[] CumulativeHazard)
Parameters — Steps are the curve's steps, ascending in time and starting at zero.
CumulativeHazard holds the accumulated hazard, one entry per step.
Example — the hazard keeps rising where survival cannot fall further.
using Lodestar.Survival;
NelsonAalenCurve curve = NelsonAalen.Estimate([1, 2, 3], [true, true, true]);
double atStart = curve.CumulativeHazard[0]; // => 0
double atEnd = curve.CumulativeHazard[3]; // => 1.833…
Remarks — Steps is the same table KaplanMeierCurve carries, because
both estimators are built on one risk table. Comparing the two on the same sample is therefore an
index-by-index comparison with no alignment step.
The last value above is 1/3 + 1/2 + 1/1. Kaplan-Meier on that sample ends at zero; this ends at
1.833, and the difference is the information a curve pinned to zero has lost.
Applies to — net10.0, netstandard2.0.
See also — NelsonAalen.Estimate, SurvivalStep.