BookmarkSubscribeRSS Feed
lillymaginta
Lapis Lazuli | Level 10
ods graphics on;
proc lifetest data=matched3 method=km atrisk
plots=(S(test nocensor atrisk=0 to 3000 by 500)) 
method=km MAXTIME= 3000 intervals=(1 to 3000 by 500);
time period2*outcome2(0);
strata drug/ adjust=sidak test=logrank;run;
ods graphics off;

Would it be possible to adjust the y-axis to start at zero as the above code create a graph with a gap before zero. 

 

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hello @lillymaginta,

 

I assume you mean the "gap" due to the patients-at-risk table inside the plot. You can use the OUTSIDE suboption to display that table outside the plot, which should resolve the issue with the y-axis except for a small offset (see documentation and for an example Displaying the Patients-at-Risk Table outside the Plot):

plots=(S(test nocensor atrisk(outside(0.15))=0 to 3000 by 500)) 

You may need to adjust the percentage (0.15=15% of the vertical space) to your requirements or try the default, i.e., omit the "(0.15)".

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 852 views
  • 0 likes
  • 2 in conversation