Percentages for Three-Dimensional Tables

Using the PCTN Statistic

It is possible to add percentages to three-dimensional tables. It’s not difficult to write the code to create three-dimensional percentages. The challenge is in understanding what the resulting tables are showing. Percentages can be rather confusing across three-dimensional tables because you cannot always see how they add up when looking at a single page.
For our example, we will use the following code:
PROC TABULATE DATA=TEMP;
   CLASS SAT CTRY GENDER;
   TABLE SAT ALL, CTRY ALL, (GENDER ALL)*N;
RUN;
This code produces a table with a page for each level of satisfaction plus a totals page. Each page shows country by gender with totals for the rows and columns. For this example, we ...

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.