BookmarkSubscribeRSS Feed
mkit8
Fluorite | Level 6

Hello, 

I am attempting to do modeling in proc phreg by producing two models (a crude model and a fully adjusted model). I have two questions.

1) Does my code seem correct considering my objective?

2) What is the easiest/best way to produce survival curves for each model? I would like each model to have two lines (representing each of my two age groups).

 

Exposure = age (20-49 year olds, 50+ year olds)

Outcome = overall survival

Covariates (for the fully adjusted model) = sex, race, stage, primary_site, grade, Yost_quintile

proc phreg data = new2;
class age (ref='50+');
model Survival_months*SEERcausespecificdeathclassifi(0,8) = age / rl;
hazardratio age / DIFF=ALL;
run;

proc phreg data = new2;
class age (ref='50+')sex (ref='Male') race (ref='Non-Hispanic White')
   stage (ref='Localized') primary_site (ref='Proximal Colon') grade (ref='Grade I')
   Yost_quintile (ref='Group 5');
model Survival_months*SEERcausespecificdeathclassifi(0,8) = age sex race stage primary_site grade
   Yost_quintile / rl;
hazardratio age / DIFF=ALL;
run;

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Update

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
  • 0 replies
  • 574 views
  • 0 likes
  • 1 in conversation