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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.