BookmarkSubscribeRSS Feed
joesmama
Obsidian | Level 7

Hello,

 

New to SAS. Trying to plot multiple survival curves on one graph using PHREG. I've tried the overlay option

 

my model is set up as follows:

 

proc phreg data=grands alpha=0.05 PLOTS(OVERLAY range=(0, 200)) = (SURVIVAL);
class grade racen gender marst stage;
model survivem*cs_vital(0) = grade gender marst racen;
by stage;
run;

 

I'd simply like to see three different survival curves (one for each stage)  on  one graph. As of now, they are printing separately. 

 

Thanks in advance for your help. 

1 REPLY 1
Reeza
Super User
BY STAGE means you have a different regression for each STAGE and then each analysis is handled independently. Do you need STRATA instead?

If BY is correct, you'll need to use the raw data and create the graphs afterwards using SGPLOT. There are a lot of examples of this online.

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 Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1059 views
  • 0 likes
  • 2 in conversation