Graphics Programming

Data visualization using SAS programming, including ODS Graphics and SAS/GRAPH. Charts, plots, maps, and more!
BookmarkSubscribeRSS Feed
NadiaK
Fluorite | Level 6

Hellooo!

 

I would like to merge 3 individual survival curves on the same plot (Note: I'm using phreg and not lifetest). I have 3 different equations (same X but different Y- my Y is mortality: cancer, cardiovascular and all-cause) generating 3 individual survival curves and would now like to represent all three on the same graph. Is this possible in SAS? If yes, how????? If no, what other software do you know of that can allow me to do that?

 

Thanks.

2 REPLIES 2
Reeza
Super User

1. Capture the data for each plot from the PROC PHREG procedure

2. Plot it manually using PROC SGPLOT

 

For 1:

https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html

 

For 2:

https://www.lexjansen.com/pharmasug-cn/2015/ST/PharmaSUG-China-2015-ST56.pdf

 

 

NadiaK
Fluorite | Level 6

Thanks for the resources! Looks feasible although I've tried some those that included lifetest and they don't all work with phreg. That being said, I've never plotted them on sgplot. I'll try it out and update!

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1125 views
  • 1 like
  • 2 in conversation