07-18-2012 09:35 PM
I am a beginner in SAS.
I am trying to fit a parametric regression model. But while running this code, I am getting largest values in the categorical variables are being omitted. How do I set the lowest number as the reference category.
Also is it possible to get the hazard ratios from this procedure
proc lifereg data = v3 ;
class sex costct cpm mt;
model deadtime* dead(0) = age sex ac6 costct mt cpm /dist=weibull ;
07-19-2012 07:02 AM
Hi, and welcome to SAS (and the discussion forums),
The CLASS statement for the LIFEREG procedure does not use a reference parameterization, it uses what is called a GLM (or "singular") parameterization. Parameterization of classification variables are explained here: http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_introcom_a00...
Some SAS procedures do support reference prameterizations (they are listed in the previous link).
Although the parameterization is fixed, you can change the order in which the class levels are sorted by using the ORDER= option on the PROC statement: http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_lifereg_sect...
One important thing to remember: The SAS default is to determine levels by the FORMATTED values of the variables. That means that you can play games with PROC FORMAT to get all kind of versitility in how results are displayed.