Survival parametricfit cumulativehazard - 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
The fitted cumulative hazard at given times: lifelines' cumulative_hazard_at_times.
public double[] CumulativeHazard(ReadOnlySpan<double> times)Parameters — times are the positive times to read at.
Returns — one cumulative hazard per time.
Example — for the Weibull, (t / λ)^ρ.
using Lodestar.Survival;
double[] months = [5, 8, 12, 3, 15, 9, 20, 6, 11, 14];
bool[] died = [true, true, false, true, true, true, false, true, true, false];
ParametricFit fit = ParametricSurvival.Fit(ParametricModel.Weibull, months, died);
double atTen = Math.Round(fit.CumulativeHazard([10.0])[0], 6); // => 0.586406Remarks — Survival is its exp(−H), so the two carry the same
information; the hazard is the scale on which models are written, and on which
CumulativeHazardBounds stays positive where the survival
interval would not.
Applies to — net10.0, netstandard2.0.
See also — ParametricFit, ParametricFit.Hazard.