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.

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!

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
  • 733 views
  • 0 likes
  • 2 in conversation