Survival parametricfit survivalbounds - 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 delta-method interval of the survival function: lifelines'
confidence_interval_survival_function_.
public (double[] Lower, double[] Upper) SurvivalBounds(ReadOnlySpan<double> times)Parameters â times are the positive times to read at.
Returns â the lower and upper bounds at ConfidenceLevel, one of each per time, not clipped to
[0, 1].
Example â inside the data the interval is a probability; far past it, it is not.
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[] lower, double[] upper) = fit.SurvivalBounds([10.0, 40.0]);
double atTen = Math.Round(lower[0], 6); // => 0.297678
double pastTheData = Math.Round(lower[1], 6); // => -0.015345Remarks â the interval is symmetric about the estimate on the survival scale, S Âą z¡Ď, with
Ď² the gradient of S in the parameters through their covariance. That is lifelines' reading, and
it is why a bound can leave [0, 1], as the one at forty months does; lifelines does not clip it,
and neither does this. CumulativeHazardBounds is the
same interval on the hazard.
Applies to â net10.0, netstandard2.0.
See also â ParametricFit, ParametricFit.Survival.