Download S-PLUS 8 for Windows User's Guide

Transcript
Survival
Figure 6.58: The Parametric Survival dialog.
Example
The capacitor data set contains measurements from a simulated
accelerated life testing of capacitors. It includes time to failure (days),
indicator of failure or censoring (event), and the voltage at which the
test was run (voltage). We use a parametric survival model to
examine how voltage influences the probability of failure.
1. Open the Parametric Survival dialog.
2. Type capacitor in the Data Set field.
3. Enter the Formula Surv(days,event)~voltage or click the
Create Formula button to construct the formula. The Surv
function creates a survival object, which is the appropriate
response variable for a survival formula.
To use the Formula builder, click the Create Formula
button. In the dialog that appears, highlight the days variable
and click the Time 1 button. Highlight the event variable,
click the Censor Codes button, and then click Add
Response. Finally, highlight the voltage variable and click
Main Effect. This generates the formula
Surv(days, event, type="right") ~ voltage
321