Three–Dimensional Tables

Now, let’s show how easy it is for PROC TABULATE to create multiple related tables with simple yet elegant syntax. With the same set of variables that we have used before, the following code creates a three–dimensional table, where one table for each AGE value becomes a logical "page":
PROC TABULATE DATA=CHPT01;
   CLASS AGE GENDER;
   VAR INCOME EDUC;
   TABLE AGE, GENDER ALL, (INCOME EDUC)*MEAN;
RUN;
Output 2.8 shows only three of the tables, one created for each age. Note the syntax in the TABLE statement. AGE is separated from GENDER and ALL by a comma and then GENDER and ALL are separated from the variables in the column dimension by another comma.
Output 2.8 Basic Three–Dimensional Table
This illustrates an important ...

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.