Estimate Confidence Limits and Bands
Estimate Confidence Limits and Bands
Use SurvivalModelFit to compute pointwise, equal-precision, and Hall–Wellner 95% confidence bands for the survival curve for some censored data.
𝒟 = EventData[{{2081, ∞}, {1602, ∞}, {1496, ∞}, {1462, ∞}, {1433, ∞}, {1377, ∞}, {1330, ∞}, {996, ∞}, {226, ∞}, {1199, ∞}, {1111, ∞}, {530, ∞}, {1182, ∞}, {1167, ∞}, 418, 383, 276, 104, 609, 172, 487, 662, 194, 230, 526, 122, 129, 74, 122, 86, 466, 192, 109, 55, 1, 107, 110, 332}];model = SurvivalModelFit[𝒟, ConfidenceRange -> {100, 600}]model["PointwiseBands", "SF"][300]Labeled[Plot[{model[x], model["HallWellnerBands"][x], model["EqualPrecisionBands"][x], model["PointwiseBands"][x]}, {x, 100, 600}, ImageSize -> 450, Exclusions -> None, GridLines -> Automatic, GridLinesStyle -> Dotted, PlotStyle -> Thick, PlotLegends -> Placed[Style[#, Bold, FontFamily -> "Helvetica"]& /@ {"Kaplan-Meier", "Hall-Wellner", "Equal-Precision", "Pointwise"}, Bottom]], Column[{Style["Survival Probability", Bold, FontSize -> 18, FontFamily -> "Helvetica"], Style["Confidence Level: 95%", Bold, FontColor -> Gray, FontSize -> 14, FontFamily -> "Helvetica"]}], {{Top, Left}}]