« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Survival Analysis
Quantify Relative Risk Using a Cox-Proportional Hazards Model
Compare survival rates for different stages of cancer of the larynx for 50-year-old patients using
CoxModelFit
.
In[1]:=
X
larynx = ExampleData[{"Statistics", "LarynxCancer"}]; \[Xi] = larynx[[All, {1, 3}]]; e = EventData[larynx[[All, 2]], larynx[[All, 5]]]; cox = CoxModelFit[{\[Xi], e}, {stage, age}, {stage, age}, NominalVariables -> stage];
The parameter table suggests those with stage 4 cancer have about 5.4 times the risk of dying as those with stage 1.
In[2]:=
X
cox["ParameterTable"]
Out[2]=