By default, PROC LIFETEST displays a plus to indicate censoring. This example illustrates how to change that symbol to a small filled circle both on the step plots and in the inset box. The following steps change the template and create Output 22.3.12:
%SurvivalTemplateRestore %let censored = markerattrs=(symbol=circlefilled size=3px); %let censorstr = "(*ESC*){Unicode '25cf'x} Censored" / textattrs=GraphValueText (family=GraphUnicodeText:FontFamily); %SurvivalTemplate proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500); ods select SurvivalPlot; time T * Status(0); strata Group; run;
The Unicode Consortium http://unicode.org/ provides a list of character codes at
http://www.unicode.org/charts/charindex.html.
The following step suppresses the censoring information by using the NOCENSOR option in the survival plot request:
proc lifetest data=sashelp.BMT plots=survival(nocensor atrisk=0 to 2500 by 500); ods select SurvivalPlot; time T * Status(0); strata Group; run;
Alternatively, you could make a template change to have the same effect and create Output 22.3.13 as follows:
%let censored = ; %SurvivalTemplate; proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500); ods select SurvivalPlot; time T * Status(0); strata Group; run;
This step works because the modularized template was written to include the following DYNAMIC statement:
dynamic NStrata xName plotAtRisk plotCL plotHW plotEP labelCL %if %nrbquote(&censored) ne %then plotCensored; labelHW labelEP maxTime xtickVals xtickValFitPol method StratumID classAtRisk plotBand plotTest GroupName yMin Transparency SecondTitle TestName pValue;
The DYNAMIC statement names the variables that are set by the procedure and control aspects of the graph. The plotCensored dynamic variable controls whether the censoring information is plotted. It is omitted from the list of dynamic variables when the macro variable Censored is null, so all aspects of the graph that are conditionally displayed based on the value of the dynamic variable plotCensored are suppressed.
You can restore the default macros, macro variables, and template by running the following steps:
%SurvivalTemplateRestore proc template; delete Stat.Lifetest.Graphics.ProductLimitSurvival; run;