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)".

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 1719 views
  • 0 likes
  • 2 in conversation