BookmarkSubscribeRSS Feed
Fluorite | Level 6

I read a competing risk example from a SAS link (, which performs the CIF curve using the following codes:

ods graphics on;
title 'Cause-specific Analysis';
proc phreg data=Bmt plots(overlay)=cif;
   class Disease (order=internal ref=first);
   model T*Status(0)=Disease / eventcode(cox)=1;
   baseline covariates=Risk out=out2 cif=_all_;

Another way the construct the CIF curve is using the following codes: 

proc lifetest data=Bmt notable
time T*Status(0) / eventcode=1;
strata Disease;


The question is how I customize the curve? For example, how to set the x axis range, like "0 to 800 by 100"? How to add the at-risk table? Also line thickness? I saw a post suggesting can put the plot created using "proc lifetest" into the "sgplot" codes, which can better customize the curve. Any solution or suggestion about customizing the CIF? Thank you!




Super User

You can usually get the data that was used to create a plot using something like:

ods output graphname=wanteddatasetname;

The graphname you would supply depends on the options.

You can get the names of all of the ODS output objects by running your code one time with:


ods trace on;

<your code goes here>

ods trace off;

The log will have list of objects created. If you add the option "/ listing" after the trace on then the name of the object should appear before it in the results window.


After you have the data set you should be able to write SGPLOT code to modify the elments you want. You will want to look at the data set carefully though. The names of some things may not be quite as expected.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3 in conversation