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;

 

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

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