BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SeaMoon_168
Obsidian | Level 7

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 onlineFind the figure online

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

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.

SeaMoon_168
Obsidian | Level 7

Awesome! It works very well. Many thanks for your help.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 1325 views
  • 0 likes
  • 2 in conversation