SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Tabular Reports
Labeling Keywords for Statistics and ALL


In addition to adding titles, footnotes, and labels for variable names, you can change headings for statistics or the special class variable ALL. For example, look at the table below. You can change ALL to All Patients for clarity, and you can label MEAN as Average.


  Sex of Patient All Patients
F M
Height Average 64.82 72.00 68.24
Weight Average 141.73 172.80 156.52


To change headings for statistics or ALL, you use the KEYLABEL statement.


General form, KEYLABEL statement:
KEYLABEL keyword='text';

where keyword is ALL or one of the following keywords for statistics:

     N      MEAN     MIN     PCTN
     SUM    MAX      STD     PCTSUM


As with the LABEL statement, you can specify several labels in a single KEYLABEL statement, but only one label for each keyword.
     proc tabulate data=clinic.admit;
        class sex;
        var height weight;
        table (height weight)*mean,sex all;
        label sex='Sex of Patient'
              height='Height'
              weight='Weight';
        keylabel mean='Average'
                 all='All Patients';
     run;

Here's another example of a KEYLABEL statement:

     keylabel min='Lowest Reading' 
              max='Highest Reading'
              mean='Average Reading';

  Lowest
Reading
Highest
Reading
Average
Reading
Sex 152.00 568.00 253.45
F Fasting
Glucose
Level
M Fasting
Glucose
Level
156.00 492.00 354.89



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement