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.
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)".
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: