This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

SurvivalDistribution

SurvivalDistribution
represents a survival distribution with event times .
SurvivalDistribution
represents a survival distribution where events occur with weights .
  • The following individual event specifications can be used for :
tino censoring; event happens at
{ti,∞}right censoring; event happens at some t where
{-∞,ti}left censoring; event happens at some t where
{ti,min,ti,max}interval censoring; event happens at some t where
  • The following individual weight specifications can be used for :
ci events at
{ci,ri} events and right-censored events at
{ci,ri,li} events, right-censored, and left-censored events at
  • The given weights are normalized by dividing by their total. If weights are not given, equal weights are assumed.
  • Censoring can be used to transform event times with censoring vector to the form .
  • The following options can be given:
MaxIterationsAutomaticmaximum number of iterations
MethodAutomaticmethod to use
  • SurvivalDistribution automatically chooses the method most appropriate to the data. The Kaplan-Meier estimator is used for right-censored data. For other types of censoring, the estimate is constructed using a self-consistency approach. Different methods may only support some types of censoring.
  • Possible settings for Method include:
Automaticautomatically select the most appropriate method
"IntervalSelfConsistency"Turnbull algorithm for interval-censored data
"KaplanMeier"product limit estimator for right-censored data
"NelsonAalen"based on the Nelson-Aalen cumulative hazard estimator
"Noncensored"censoring is ignored and interval midpoints are used
"SelfConsistency"self-consistency algorithm for doubly censored data
  • For Automatic and methods, the suboption can be used to set the locations at which the estimate is computed by Method, where is any real number.
Create a survival distribution from some right-censored survival data:
Visualize the survival function:
Compute moments and quantiles:
Create a survival distribution from some right-censored survival data:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Visualize the survival function:
In[4]:=
Click for copyable input
Out[4]=
Compute moments and quantiles:
In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=
Create an empirical model for some right-censored survival data:
Use like any other distribution:
Compute probabilities and expectations:
Create a nonparametric maximum likelihood estimate for doubly censored data:
Use Censoring to convert status indicators:
Visualize the survival and cumulative hazard functions:
Estimate the distribution for interval-censored data:
The empirical distribution function:
Sample from the distribution:
Specify weights to easily input frequency data:
These weights indicate double censoring:
The estimated survival function:
Estimate distribution functions:
The PDF and hazard function are discrete:
The CDF and survival function are piecewise constant:
Compute moments of the distribution:
Special moments:
General moments:
Quantile function:
Special quantile values:
Generate random numbers:
Only values in the distribution domain are possible:
Compute probabilities and expectations:
Uncensored data can be represented on intervals (no censoring):
The survival functions are equivalent:
Estimate the distribution with right-censored data (right censoring):
The jump at 16 has been removed and the survival function has been rescaled beyond 16:
A single left-censored 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 right-censored 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 Censoring with status indicators to indicate censored observations:
Create distributions for the different censoring schemes:
The survival functions:
Provide a list of observation weights:
The second value was observed twice, causing a greater decline in the survival function at 15:
Setting the weight argument to Automatic is equivalent to using constant weights:
The estimates are equivalent:
Specify right censoring with a list of weights:
There was one right-censored observation at 15:
Left-censored observations can also be specified in a list of weights:
There were three left-censored observations at 15:
Uncensored, right-censored, and left-censored observations can be specified simultaneously:
There were two uncensored, one right-censored, and three left-censored observations at 15:
The weight list can be used with interval-censored observations:
The second observation is interval censored and occurred twice:
The weight list can be used to drop unwanted observations:
The second observation was dropped:
The default maximum number of iterations is 10000:
The algorithm typically converges very rapidly:
Iterations are not necessary in the absence of left or interval censoring:
The algorithm converges immediately:
By default, the method used is based on the types of censoring present in the data:
No censoring:
Right censoring only:
Double censoring:
Interval censoring:
The suboption can be used with Automatic and methods:
The choice of estimation points affects the resulting estimate:
Two common choices for estimation points are interval midpoints and interval endpoints:
The resulting estimates differ slightly:
Interval endpoints are used by default:
Compare the survival rates of breast cancer patients with different immuno-histochemical responses, given the following data and that follow-up 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 high school 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 6-mercaptopurine 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 non-maintained (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 break-point 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:
Probabilities for each observation are distributed in the direction of censoring:
The impact of adding three observations each for three censoring types:
Right-censored observations are truncated at the largest finite endpoint:
The estimates are equivalent:
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:
The estimates are equivalent:
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:
In the absence of censoring, these are equivalent:
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 left-censored observation was dropped. Place a value in the third position to avoid this:
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 method:
Interval midpoints and right endpoints in left-censored observations are treated as known for or methods:
The midpoints of intervals are treated as known using the method:
New in 8