Modifying the Plot Title in the Revised Template

This example changes the title of the survival plot in PROC LIFETEST from Product-Limit Survival Estimates to Kaplan-Meier Plot as follows, using the modularized template with macros:

%SurvivalTemplateRestore

%let TitleText0 = "Kaplan-Meier Plot";
%let TitleText1 = &titletext0 " for " STRATUMID;
%let TitleText2 = &titletext0;

%SurvivalTemplate

The %SurvivalTemplateRestore macro from the preceding section, Creating a Template That Is Easy to Modify, provides the modularized template code. The three %LET statements modify the titles, and the %SurvivalTemplate macro compiles the modified template. The following step, along with the modified template, creates Output 22.3.3:

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

You can restore the default macros, macro variables, and template by running the following steps:

%SurvivalTemplateRestore

proc template;
   delete Stat.Lifetest.Graphics.ProductLimitSurvival / store=sasuser.templat;
run;

Output 22.3.3: Kaplan-Meier Plot Created with the Revised Template

Kaplan-Meier Plot Created with the Revised Template