« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Survival Analysis
Estimate Distribution Parameters from Survival Data
Use maximum likelihood methods with
EstimatedDistribution
to obtain the best-fitting
WeibullDistribution
for some censored data and compare to the Kaplan-Meier estimate.
In[1]:=
X
x = 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}];
Fit a
WeibullDistribution
to the censored data.
In[2]:=
X
dist = EstimatedDistribution[x, WeibullDistribution[\[Alpha], \[Beta]]]
Out[2]=
Create a nonparametric survival model.
In[3]:=
X
model = SurvivalModelFit[x]
Out[3]=