I want to change the font and size of the at-risk table using Proc Lifetest (shown below). I can find article about how to adjust the font and size for labels and titles. I want to change the table font to Times New Roman and font to 12. Many thanks.
Hello @SeaMoon_168,
Are you already using the macros provided by SAS that facilitate the customization of the Kaplan-Meier plot? If not, just copy and submit the code from https://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html .
Then changing the font family and size is as easy as setting a macro variable (here: AtRiskOpts) between two macro calls:
%ProvideSurvivalMacros %let AtRiskOpts = labelattrs=(family='Times New Roman' size=12pt) valueattrs=(family='Times New Roman' size=12pt); %CompileSurvivalTemplates proc lifetest data=sashelp.BMT plots=survival(atrisk(outside maxlen=13)); time T * Status(0); strata Group; run;
See Controlling the Survival Plot by Modifying Graph Templates for the documentation.
Hello @SeaMoon_168,
Are you already using the macros provided by SAS that facilitate the customization of the Kaplan-Meier plot? If not, just copy and submit the code from https://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html .
Then changing the font family and size is as easy as setting a macro variable (here: AtRiskOpts) between two macro calls:
%ProvideSurvivalMacros %let AtRiskOpts = labelattrs=(family='Times New Roman' size=12pt) valueattrs=(family='Times New Roman' size=12pt); %CompileSurvivalTemplates proc lifetest data=sashelp.BMT plots=survival(atrisk(outside maxlen=13)); time T * Status(0); strata Group; run;
See Controlling the Survival Plot by Modifying Graph Templates for the documentation.
Awesome! It works very well. Many thanks for your help.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.