-
Notifications
You must be signed in to change notification settings - Fork 0
Survival parametricmodel
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
Which of lifelines' parametric univariate models ParametricSurvival fits.
public enum ParametricModel { Exponential, Weibull, LogNormal, LogLogistic, PiecewiseExponential, GeneralizedGamma }Members — each with its parameters in ParametricFit.ParameterNames' order:
-
Exponential,H(t) = t / λ:lambda_. lifelines'ExponentialFitter. -
Weibull,H(t) = (t / λ)^ρ:lambda_,rho_.WeibullFitter. -
LogNormal,log Tnormal with meanμand deviationσ:mu_,sigma_.LogNormalFitter. -
LogLogistic,S(t) = 1 / (1 + (t / α)^β):alpha_,beta_.LogLogisticFitter. -
PiecewiseExponential, a constant hazard1 / λᵢbetween consecutive breakpoints:lambda_0_,lambda_1_and so on, one more than there are breakpoints.PiecewiseExponentialFitter. -
GeneralizedGamma, in(μ, log σ, λ):mu_,ln_sigma_,lambda_.GeneralizedGammaFitter.
Example — the same ten patients under three models, by AIC.
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];
double exponential = Math.Round(ParametricSurvival.Fit(ParametricModel.Exponential, months, died).Aic, 4); // => 53.6435
double weibull = Math.Round(ParametricSurvival.Fit(ParametricModel.Weibull, months, died).Aic, 4); // => 53.4005
double logNormal = Math.Round(ParametricSurvival.Fit(ParametricModel.LogNormal, months, died).Aic, 4); // => 52.3648Remarks — the exponential is a Weibull with ρ = 1, and both are generalized gammas, as the
log-normal is at λ = 0: the generalized gamma nests them, and its fit is the check that a simpler
one is not forcing its shape on the data. A difference of one in AIC, as above, is no evidence either
way on ten subjects.
The piecewise exponential needs its breakpoints in
ParametricOptions.Breakpoints, and is refused without them.
Applies to — net10.0, netstandard2.0.
See also — ParametricSurvival, AftModel.