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 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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1441 views
  • 0 likes
  • 2 in conversation