Creating Tabular Reports |
Specifying
Totals![]() ![]() |
Now consider another useful modification that you can make. Your table displays statistics for each of three activity levels. But what if you want to find out the average age across all categories? |
Age | |
Mean | |
ActLevel | 34.29 |
HIGH | |
LOW | 39.29 |
MOD | 40.57 |
To summarize all categories, you can use the special class variable
ALL in your TABLE statement.
To specify a summary row, you specify ALL in the row expression of your TABLE statement. For example, the PROC TABULATE step below specifies ALL in the row expression. Notice that you do not specify ALL in the CLASS statement. As with other class variables, the default statistic for ALL is N. proc tabulate data=clinic.admit; var fee; class sex; table sex all,fee; run; The PROC TABULATE step creates the following table, which displays a row for females, a row for males, and a row for all observations. |
Fee | |
Sum | |
Sex | 1418.35 |
F | |
M | 1268.60 |
All | 2686.95 |
Creating Summary Columns
To specify a summary column, you specify ALL in the column expression of your TABLE statement. proc tabulate data=clinic.admit; class sex; table sex all; run; |
Sex | All | |
F | M | |
N | N | N |
11 | 10 | 21 |
![]() ![]() ![]() ![]() ![]() ![]() |
|
![]() |
![]() |
Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.