The most confusing thing
about complex tables with percentages is that there is no single correct
denominator. There are many ways that you can set up the denominator.
This example shows how to take a single TABLE statement and build
a variety of different tables by swapping the denominator. Our starting
point is the table from the previous example:
PROC TABULATE DATA=TEMP;
CLASS GENDER CTRY CUSTTYPE SIZE;
TABLE CTRY*GENDER, (CUSTTYPE SIZE)*PCTN;
RUN;
As we saw before, this
code generates cell percentages. The actual denominator definition
is as follows:
CTRY*GENDER*CUSTTYPE CTRY*GENDER*SIZE
But there are a number of other definitions that will work. There are also a number of definitions that will not work, as ...