Generating Predictions and Hazard Functions

After fitting a model with PROC LIFEREG, it’s sometimes desirable to generate predicted survival times for the observations in the data set. If you want a single point estimate for each individual, the predicted median survival time is probably the best. You can get this easily with the OUTPUT statement, as shown in the following example:

proc lifereg data=recid;
   model week*arrest(0)=fin age race wexp mar paro prio
         / dist=weibull;
   output out=a p=median std=s;
run;
proc print data=a;
   var week arrest _prob_ median s;
run;

The P= keyword in the OUTPUT statement requests percentiles. By default, PROC LIFEREG calculates the 50th percentile, that is, the median. (The word median in the OUTPUT statement is ...

Get Survival Analysis Using SAS®: A Practical Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.