BookmarkSubscribeRSS Feed
Claire_panda
Calcite | Level 5

Hi,

I am using SAS9.4 to generate survival plots with SGPLOT and the dataset is from the output by the PHREG BASELINE statement.

 

I tried to use XAXISTABLE to generate a survival plot that contains the number of subjects at risk along the x-axis, however,  I don't know how to use  ODS OUTPUT statement from PHREG to save the ATRISK time into the dataset that I'm going to use in SGPLOT PROC.

 

So, my question is how to generate ATRISK data and save it to output dataset in SAS9.4.

 

Thanks in advance for your time!

3 REPLIES 3
Reeza
Super User
Try RISKSETINFO?
https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_phreg_details217.htm&docsetVersio...

Otherwise, have PROC PHREG create the graph and capture that data set directly and then customize as desired.
Claire_panda
Calcite | Level 5
Can I customize the output data set generated in Baseline statement in Phreg? Thank you.
Reeza
Super User
Depends on what you mean by customize. But in general, yes you can customize it.

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

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
  • 3 replies
  • 1970 views
  • 0 likes
  • 2 in conversation