Customizing the Kaplan-Meier Survival Plot

Adding Y-Axis Grid Lines

Begin by including the macros that you copied in the section The Modularized Templates.

You can add horizontal grid lines to the survival plot by adding the following option to the Y-axis options:

griddisplay=on;

You can do this by modifying the yOptions macro variable. The following steps create the plot in FigureĀ 30:

%ProvideSurvivalMacros

%let yoptions = &yoptions griddisplay=on;

%CompileSurvivalTemplates

proc lifetest data=sashelp.BMT plots=survival(cb=hw test);
   time T * Status(0);
   strata Group;
run;

Figure 30: Horizontal Grid Lines

Horizontal Grid Lines


Last updated: December 09, 2022