I need to include reference category in Phreg in the table of 'Parameterestimates' for comparison between two levels, for example if i have sex as class variable, and female as ref, then in the table of 'Parameterestimates' only shows the hazard ratio of Male. What i need is to include the female as reference for sex and hazard ratio for that will be 1.
Hello @ifti_ch2002,
I think you should specify the param=glm option of the CLASS statement. This will include the reference level in the Parameterestimates ODS output dataset with HazardRatio=., which you can set to 1 in a subsequent data step.
Example (using the sample data from Example 89.3 Modeling with Categorical Predictors):
ods output parameterestimates=est;
proc phreg data=VALung;
class Prior(ref='no') Cell(ref='large') Therapy(ref='standard') / param=glm;
model Time*Status(0) = Kps Duration Age Cell Prior Therapy;
run;
data want;
set est;
if df=0 then hazardratio=1;
run;
Hello @ifti_ch2002,
I think you should specify the param=glm option of the CLASS statement. This will include the reference level in the Parameterestimates ODS output dataset with HazardRatio=., which you can set to 1 in a subsequent data step.
Example (using the sample data from Example 89.3 Modeling with Categorical Predictors):
ods output parameterestimates=est;
proc phreg data=VALung;
class Prior(ref='no') Cell(ref='large') Therapy(ref='standard') / param=glm;
model Time*Status(0) = Kps Duration Age Cell Prior Therapy;
run;
data want;
set est;
if df=0 then hazardratio=1;
run;
Oh Nice. Thanks
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.