Statistic Definitions for a Two-Dimensional Table

Add Statistic Definitions in the Column Dimension

In the previous examples, you might have noticed that the statistic keywords N and MEAN were listed in the column dimension. This is not required. PROC TABULATE enables you to specify statistics in either the row or the column dimension (but not both).
For example, the following two-dimensional table displays three statistics for INCOME: N, MEAN, and MAX. As in the previous examples, the statistic keywords are located in the column definition.
PROC TABULATE DATA=TEMP;
   VAR INCOME;
   CLASS EDUC;
   TABLE EDUC, INCOME*N INCOME*MEAN INCOME*MAX;
RUN;
As you can see in Output 5.4, this code produces a table with three rows and three columns. Notice that ...

Get PROC TABULATE by Example, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.