Survival survivalcurve - CyrilB1531/lodestar GitHub Wiki
Development build. This page describes
main, not a released package. The latest published Lodestar.Survival is 0.2.0 โ read its documentation.
Home โบ Survival โบ Survival estimators
SurvivalCurve
A survival curve with its confidence bounds, one value per step: what the Breslow-Fleming-Harrington estimator returns.
public sealed record SurvivalCurve(SurvivalStep[] Steps, double[] Survival, double[] Lower, double[] Upper, double ConfidenceLevel)
Parameters โ Steps are the curve's steps, ascending in time and starting at zero. Survival,
Lower and Upper hold the estimate and its two bounds, one entry per step, Lower the smaller.
ConfidenceLevel is the level the bounds were built at.
Example โ the four arrays share one index.
using Lodestar.Survival;
SurvivalCurve curve = BreslowFlemingHarrington.Estimate([1, 2, 3], [true, true, true]);
int steps = curve.Steps.Length; // => 4
double level = curve.ConfidenceLevel; // => 0.95
double lastSurvival = Math.Round(curve.Survival[3], 6); // => 0.15988
Remarks โ the shape of KaplanMeierCurve, the bounds excepted: these are
the Nelson-Aalen hazard's interval on the log scale, carried through exp(โยท), where Kaplan-Meier's
are Greenwood's. A separate type keeps one curve from being passed where the other's variance is
assumed, as KaplanMeier.CompareAt assumes Greenwood's.
The four arrays are taken and exposed as they are, not copied: writing to one
changes this record and what it equals, and every holder of the same array, a with copy included
(#1305).
Applies to โ net10.0, netstandard2.0.
See also โ BreslowFlemingHarrington.Estimate,
SurvivalStep.
Members
| member | what it does |
|---|---|
SurvivalCurve.Equals |
Value equality over the steps and the three curves. |
SurvivalCurve.GetHashCode |
A hash consistent with it. |