Percentages for Multiple Row Variables
Our first table shows
row percentages. What’s different about this table is that
this time there are multiple row variables. So we will be building
percentages for more than one variable at a time.
Our starting point is
a table showing a breakdown of customers by country , gender, business
type, and business size. The following code produces a table that
shows the number of customers in each category:
PROC TABULATE DATA=TEMP; CLASS GENDER CTRY CUSTTYPE SIZE; TABLE (CTRY CUSTTYPE)*GENDER, SIZE*N; RUN;
But it would be much
more interesting to see some percentages. This will make it easier
to see the distribution of customers between the categories.
PROC TABULATE DATA=TEMP; CLASS GENDER CTRY CUSTTYPE SIZE; ...
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.