BookmarkSubscribeRSS Feed
mkit8
Fluorite | Level 6

Hello,

Is there a way to see if there is a significant difference in the hazard ratios between age groups? (see table below or attached pdf). For example, I want to know if there is a significant difference in the HR for sex between 20-49 and 50+ year olds. And the same thing for my Race variable.

See below for the code I used to obtain these values as well).

mkit8_1-1586127633467.png

proc sort data=new2
out=new3;
by age_recode_with_1_year_olds;

proc phreg data = new3;
class sex (ref='Male') RaceandoriginrecodeNHWNHBNHAIA (ref='Non-Hispanic White')
   Summary_stage_2000_1998 (ref='Localized')Primary_Site_labeled (ref='Proximal Colon') Grade (ref='Grade I')
   Yost_quintile_registry_based (ref='Group 5');
model Survival_months*SEERcausespecificdeathclassifi(0,8) = age_recode_with_1_year_olds sex RaceandoriginrecodeNHWNHBNHAIA Summary_stage_2000_1998 Primary_Site_labeled Grade
   Yost_quintile_registry_based / rl;
by age_recode_with_1_year_olds;
hazardratio age_recode_with_1_year_olds / DIFF=ALL;
run;

 

1 REPLY 1
SteveDenham
Jade | Level 19

Just going off of the documentation, I think you need two HAZARDRATIO statements.  Try this:

hazardratio sex/diff=ALL;
hazardratio RaceandoriginrecodeNHNWNHBNHAIA/diff=ALL;

SteveDenham

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 25. 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
  • 1 reply
  • 1231 views
  • 2 likes
  • 2 in conversation