« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Survival Analysis
Compute Descriptive Statistics from Censored and Truncated Data
Create
EventData
representing censored event times.
In[1]:=
X
\[ScriptCapitalD] = EventData[{10, 7, 32, 23, 22, 6, 16, 34, 32, 25, 11, 20, 19, 6, 17, 35, 6, 13, 9, 6, 10}, {0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1}];
Right-censored events are only known to have occurred on an interval
.
In[2]:=
X
SurvivalModelFit[\[ScriptCapitalD]]["EventMatrixPlot"]
Out[2]=
The median survival time based on this data.
In[3]:=
X
Median[\[ScriptCapitalD]]
Out[3]=
The probability an individual dies before
, given that he or she survives to
.
In[4]:=
X
Probability[t < 20 \[Conditioned] t >= 10, t \[Distributed] \[ScriptCapitalD]]
Out[4]=
A collection of descriptive statistics computed directly from the same
EventData
.