BookmarkSubscribeRSS Feed
sasuser110
Calcite | Level 5

Hi, I am using SAS University Edition and looking to graphically display the cumulative incidence function (CIF) curves for a time to event analysis. I am unsure how to customize the x-axis intervals and I don't see any way of customizing the x axis for CIF based on: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_lifetest_syn...

or https://support.sas.com/documentation/onlinedoc/stat/141/kaplan.pdf

My code is below:

 

proc lifetest data=filename OUTCIF=ATRISK MAXTIME=6 plots=cif(test);
time years*censor(0)/ eventcode=1;
run;

 

Based on the above, I can set the maxtime as 6 years, but the x-axis by default shows tick marks at 2 year intervals. I would like it to show tick marks at 1 year intervals.

 

 

 

I know that for Kaplan-Meier curves you can just do this to customize it:

proc lifetest data=filename atrisk plots=survival(PVALUE ATRISK(atrisktick outside) = 0 to 6 by 1) MAXTIME=6;
time years*censor1(0)
run;

 

 

Would greatly appreciate any help.

2 REPLIES 2
ballardw
Super User

Most of the time if I don't find a quick option in the analysis procedure I create an appropriate output data set and use sgplot or sgpanel where I have more controls of appearance to create desired graphs.

sasuser110
Calcite | Level 5
Thanks - I am a bit confused as to how to do this for a cumulative incidence function. Any tips for that?

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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