Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

THE LIFEHAZ MACRO

THE LIFEHAZ MACRO

The LIFEHAZ macro produces parametric plots of hazard functions based on models fitted by PROC LIFEREG. In the LIFEREG procedure, you must specify OUTEST=name1 in the PROC LIFEREG statement. You must also use the OUTPUT statement with OUT=name2 and XBETA=name3. By default, the hazard is plotted for the mean value of the XBETA option (the linear predictor). If you want a plot for a specific observation, you must specify the observation number (OBSNO) when you invoke the macro. The macro requires SAS/GRAPH software.

To use the macro, you must first read it into your SAS session. This can be done by simply copying the text of the macro into the editor window and then running it. Alternatively, you can use the %INCLUDE statement to specify the name and location of the file containing the macro (which must have a .sas extension). Once the macro has been read in to SAS, you can use it repeatedly during your SAS session. For an example using the LIFEHAZ macro, see the section Generating Predictions and Hazard Functions in Chapter 4, "Estimating Parametric Regression Models with PROC LIFEREG."


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial