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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 622 views
  • 0 likes
  • 2 in conversation