Estimate Expected Survival with Incomplete Data
Estimate Expected Survival with Incomplete Data
The following right-censored data produce a Kaplan–Meier estimate that never reaches zero because the last observation is censored. In order to estimate the expected lifetime, you must choose a model for the remaining probability in the tail. This can easily be accomplished with SurvivalModelFit.
data = {10, 7, {32, ∞}, 23, 22, 6, 16, {34, ∞}, {32, ∞}, {6, ∞}, {10, ∞}};
𝒮 = SurvivalModelFit[data];
Plot[𝒮[t], {t, 0, 50}, Exclusions -> None, PlotRange -> {0, 1}]tailMods = {ExponentialDistribution[λ], WeibullDistribution[α, β], LogNormalDistribution[μ, σ], GompertzMakehamDistribution[λ, ρ]};
models = Table[SurvivalModelFit[data, Method -> "TailModel" -> i], {i, tailMods}];
colors = ColorData[32, "ColorList"][[-4 ;; -1]];Grid[Partition[MapThread[Labeled[Plot[#1[t], {t, 0, 70}, ImageSize -> 250, Background -> White, FillingStyle -> Lighter@#3, Exclusions -> None, Frame -> True, FrameTicks -> None, GridLines -> Automatic, GridLinesStyle -> Dotted, PlotRange -> {0, 1}, Filling -> Axis], Column[{Style[#2, Bold, FontSize -> 12, FontFamily -> "Helvetica"], Style[Row[{"Mean Survival: ", #1["MeanSurvival"]}], Bold, FontSize -> 10, FontColor -> Gray, FontFamily -> "Helvetica"]}]]&, {models, tailMods, colors}], 2]]