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).
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;
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.