BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ifti_ch2002
Obsidian | Level 7

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.

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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;

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

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;
ifti_ch2002
Obsidian | Level 7

Oh Nice. Thanks

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 1209 views
  • 3 likes
  • 2 in conversation