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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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