I ran the following code and got the curve below.
proc lifetest data=sasuser.combine_aim2n2 plots=survival(f) timelist=(0 to 132 by 12);
time month2*ui2(0);
run;
Would there be a way to change the scale of x axis from 0 25 50 75 100 125 to 0 12 24 36 48 60 72 84 96 108 120 132?
Hello @tan-wongv,
@tan-wongv wrote:
Would there be a way to change the scale of x axis from 0 25 50 75 100 125 to 0 12 24 36 48 60 72 84 96 108 120 132?
Yes, I see three ways to do this, the simplest of which is a combination of three survival (plot) options:
proc lifetest data=sasuser.combine_aim2n2 plots=survival(f atrisk(outside(1e-6))=0 to 132 by 12 atrisktickonly); time month2*ui2(0); run;
It is possible, though, that the last tick mark (132) is not displayed if the greatest failure time is less than 132.
The other two ways are more cumbersome:
linearopts=(viewmax=MAXTIME tickvaluelist=XTICKVALS ...in the PROC TEMPLATE code to
linearopts=(viewmax=132 tickvaluelist=(0 12 24 36 48 60 72 84 96 108 120 132) ...
Hello @tan-wongv,
@tan-wongv wrote:
Would there be a way to change the scale of x axis from 0 25 50 75 100 125 to 0 12 24 36 48 60 72 84 96 108 120 132?
Yes, I see three ways to do this, the simplest of which is a combination of three survival (plot) options:
proc lifetest data=sasuser.combine_aim2n2 plots=survival(f atrisk(outside(1e-6))=0 to 132 by 12 atrisktickonly); time month2*ui2(0); run;
It is possible, though, that the last tick mark (132) is not displayed if the greatest failure time is less than 132.
The other two ways are more cumbersome:
linearopts=(viewmax=MAXTIME tickvaluelist=XTICKVALS ...in the PROC TEMPLATE code to
linearopts=(viewmax=132 tickvaluelist=(0 12 24 36 48 60 72 84 96 108 120 132) ...
Thank you very much for your help!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.