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!
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!
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.