BookmarkSubscribeRSS Feed
viviyeah
Fluorite | Level 6

I read a competing risk example from a SAS link (https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_sashelp_sect007.htm&docsetVersion...), 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_;
run;

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

proc lifetest data=Bmt notable
outcif=CR_CIF_OUTPUT
plots=cif(test);
time T*Status(0) / eventcode=1;
strata Disease;
run;

 

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!

 

 

 

3 REPLIES 3
ballardw
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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3770 views
  • 0 likes
  • 3 in conversation