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.
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.