SurvivalDistribution
SurvivalDistribution[{e_{1},e_{2},…}]
represents a survival distribution with event times e_{i}.
SurvivalDistribution[{cw_{1},cw_{2},…}{e_{1},e_{2},…}]
represents a survival distribution where events e_{i} occur with censor weights cw_{i}.
Details and Options
 SurvivalDistribution is used in survival, reliability, and duration analysis.
 SurvivalDistribution produces a DataDistribution object representing the EmpiricalDistribution of censored lifetime data.
 The following individual event specifications can be used for e_{i}:

t_{i} no censoring; event happens at tt_{i} {t_{i},∞} right censoring; event happens at some t where t_{i}≤t {∞,t_{i}} left censoring; event happens at some t where t<t_{i} {t_{i,min},t_{i,max}} interval censoring; event happens at some t where t_{i,min}<t≤t_{i,max}  The following individual censor weight specifications can be used for cw_{i}:

c_{i} c_{i} events at e_{i} {c_{i},r_{i}} c_{i} events and r_{i} rightcensored events at e_{i} {c_{i},r_{i},l_{i}} c_{i} events, r_{i} rightcensored, and l_{i} leftcensored events at e_{i}  In SurvivalDistribution, the lists of event times and weights must be the same length.
 EventData[{t_{1},…},{i_{1},…}] can be used to transform event times {t_{1},…} with censoring vector {i_{1},…} to the form {{t_{1,min},t_{1,max}},…}.
 The following options can be given:

Method Automatic method to use WorkingPrecision Automatic precision to use in internal computations  SurvivalDistribution automatically chooses the method most appropriate to the data. The Kaplan–Meier estimator is used for rightcensored data. For other types of censoring, the estimate is constructed using a selfconsistency approach. Different methods may only support some types of censoring.
 Possible settings for Method include:

Automatic automatically select the most appropriate method "Turnbull" Turnbull algorithm for intervalcensored data "KaplanMeier" product limit estimator for rightcensored data "NelsonAalen" based on the Nelson–Aalen cumulative hazard estimator "Noncensored" censoring is ignored and interval midpoints are used "SelfConsistency" Turnbull algorithm for doubly censored data  SurvivalDistribution can be used with such functions as Mean, CDF, and RandomVariate.
Examples
open allclose allBasic Examples (1)
Scope (24)
Basic Uses (4)
Create an empirical model for some rightcensored survival data:
Use like any other distribution:
Compute probabilities and expectations:
Create a nonparametric maximum likelihood estimate for doubly censored data:
Use EventData to convert status indicators:
Visualize the survival and cumulative hazard functions:
Estimate the distribution for intervalcensored data:
The empirical distribution function:
Specify weights to easily input frequency data:
Distribution Properties (5)
Censoring (7)
Uncensored data can be represented on intervals (no censoring):
The survival functions are equivalent:
Estimate the distribution with rightcensored data (right censoring):
The jump at 16 has been removed and the survival function has been rescaled beyond 16:
A single leftcensored observation (left censoring):
The jump at 16 is removed and the probability is redistributed over the estimate:
Observations can be censored on an interval (interval censoring):
The third observation occurred somewhere on the interval :
Any combination of left and rightcensored observations is possible (double censoring):
The second observation is left censored and the fourth is right censored:
Any type of censoring can be present in the data simultaneously (mixed censoring):
The second, third, and fourth observations are left, interval, and right censored, respectively:
Use EventData with status indicators to indicate censored observations:
Truncation (2)
Censor Weights (6)
Provide a list of observation censor weights:
The second value was observed twice, causing a greater decline in the survival function at 15:
Specify right censoring with a list of censor weights:
There was one rightcensored observation at 15:
Leftcensored observations can also be specified in a list of censor weights:
There were three leftcensored observations at 15:
Uncensored, rightcensored, and leftcensored observations can be specified simultaneously:
There were two uncensored, one rightcensored, and three leftcensored observations at 15:
The censor weight list can be used with intervalcensored observations:
The second observation is interval censored and occurred twice:
The censor weight list can be used to drop unwanted observations:
Options (6)
Method (5)
By default, the method used is based on the types of censoring present in the data:
Set the maximum number of iterations for iterative algorithms:
The default maximum number of iterations is 10000:
Iterations are not necessary in the absence of left or interval censoring:
The algorithm converges immediately:
Control convergence of Turnbull algorithms:
Mean estimates with increasing PrecisionGoal:
WorkingPrecision (1)
Estimate the SurvivalFunction using 30digitprecision arithmetic:
Applications (7)
Compare the survival rates of breast cancer patients with different immunohistochemical responses, given the following data and that followup times were 116 and 87 weeks for groups one and two, respectively:
Estimate the distributions of each group:
Visually compare the survival functions:
Find the average number of weeks a breast cancer patient survives in the two groups:
Ignoring censoring causes an underestimate in the survival function:
A group of 191 highschool boys was asked the exact age at which they started using marijuana. Responses were "I used it first at age ", "I never used it", and "I have used it but cannot recall when the first time was". Estimate the survival function for time to first marijuana use given the following data:
The probability of a person not having used marijuana at a certain age:
Find the probability of a person having used marijuana at age 15 or earlier:
Estimate the survival of children with acute leukemia treated with the drug 6mercaptopurine using the Nelson–Aalen and Kaplan–Meier estimators:
The estimates are quite similar:
Plot the Nelson–Aalen estimate of the cumulative hazard function:
Compare survival curves for patients with acute myelogenous leukemia given extended maintenance of chemotherapy (M) versus nonmaintained (NM) chemotherapy using the following data:
Show markers at the occurrence of censored observations:
It appears that survival is longer when chemotherapy is maintained:
Estimate the cumulative hazard function for time to retraction for breast cancer patients treated by radiotherapy given the following data:
Show the resulting cumulative hazard function:
Compute the expected time to retraction given the absence of retraction by week 20:
A set of manufactured cords was placed under stress until breakage. Some of the cords were damaged in some way during the study and so their true reliability is right censored. Given the data, estimate the reliability function:
The reliability function is the probability a cord will hold beyond a particular stress:
Determine the expected breaking point, given a cord has not broken at 45 lbs of stress:
The breakpoint data for 17 ropes is given where the maximum stress applied was 100 lbs of force. Compare the empirical estimate to a Weibull model:
Model the survival function with a censored Weibull distribution:
An empirical model using SurvivalDistribution:
Compute the probability a rope will break beyond 60 lbs of force using the two models:
Properties & Relations (9)
Probabilities for each observation are distributed in the direction of censoring:
The impact of adding three observations each for three censoring types:
Rightcensored observations are truncated at the largest finite endpoint:
If the last observation is right censored, the distribution is truncated:
The survival function is truncated at the last finite endpoint at 25:
This endpoint can be set arbitrarily, using a list of weights:
The value 30 was added to the domain of the distribution without adding any observations:
Agreement with the uncensored case diverges with an increased proportion of censoring:
The PDF and hazard function are discrete:
For comparison to continuous distributions, the cumulative hazard function can be used:
CensoredDistribution applies censoring to a distribution, not individual observations:
Treat all observations outside of the window as right censored:
Using Clip on data is equivalent to CensoredDistribution over the same window:
With no censoring, SurvivalDistribution is equivalent to EmpiricalDistribution:
Using SurvivalDistribution with TruncatedDistribution is not equivalent to applying truncation to the data if censoring is present:
Possible Issues (5)
The weight list takes precedence over event specifications:
The weight list causes observations at to be added while dropping :
Unspecified positions in the weight list are assumed to be zero:
The leftcensored observation was dropped. Place a value in the third position to avoid this:
The weight list can drop data from the analysis but not from the distribution domain:
The value at 30 was dropped from the analysis:
The distribution domain was unaffected:
Decreasing MaxIterations may result in failed convergence:
Try increasing MaxIterations to avoid this:
Setting the Method option may cause SurvivalDistribution to ignore features of the data:
A warning is issued when features are ignored:
Finite endpoints and interval midpoints are treated as known event times using the "Noncensored" method:
Interval midpoints and right endpoints in leftcensored observations are treated as known for "KaplanMeier" or "NelsonAalen" methods:
The midpoints of intervals are treated as known using the "SelfConsistency" method: