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.
Find the figure online
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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.