I'm capturing the output of proc lifetest through ods. I need to customize the tick interval on a survival plot for the x axis such that the ticks have values of 0 to 18 by intervals of 1.5.
The lifetest procedure code is:
/*** Compute Kaplan Meier Statistics ***/
ods rtf file = "(directory path)\figures\f4_1.rtf"
style=rtf;
ods graphics on;
proc lifetest data = km1
timelist=0 1.5 3 4.5 6 7.5 9 10.5 12 13.5 15 16.5 18
plots = survival(atrisk=0 1.5 3 4.5 6 7.5 9 10.5 12 13.5 15 16.5 18)
;
time months * event(0);
id usubjid;
strata TRT01PN;
title "Kaplan-Meier plot of PFS based on central review - Figure 4.1";
run;
ods graphics off;
ods listing;
run;
The at-risk table reports at the proper intervals but the ticks on the plot have intervals of 5 instead of 1.5. How do I make the ticks occur at 1.5 intervals?
Thank you for your help!
Try the intervals option in proc lifetest
ods rtf file = "(directory path)\figures\f4_1.rtf"
style=rtf;
ods graphics on;
proc lifetest data = km1 intervals=(0 to 18 by 1.5)
timelist=0 1.5 3 4.5 6 7.5 9 10.5 12 13.5 15 16.5 18
plots = survival(atrisk=0 1.5 3 4.5 6 7.5 9 10.5 12 13.5 15 16.5 18)
;
time months * event(0);
id usubjid;
strata TRT01PN;
title "Kaplan-Meier plot of PFS based on central review - Figure 4.1";
run;
ods graphics off;
ods listing;
run;
Thank you for responding. I tried your suggestion but the x axis still shows intervals of 5 instead of 1.5.
Thank you for responding. I completely removed the timelist from the code. I'm still seeing the same interval of 5.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.