Add Row Totals to a Table with Row Percentages
Step 1: Build the Table with Row Totals
When you build a table
with row percentages, the best way to clearly identify what type of
percentages you are displaying is to include row totals. In this way,
the end user of your table can see that the percentages in each row
add up to a total of 100%.
We need to use the ALL keyword to add a total to the table,
just as we did in the sections Add Totals to Rows and Columns andAdd Subtotals. As a first step, we build a table
that shows the correct structure, with row totals, but without the
row percentages.
PROC TABULATE DATA=TEMP; CLASS OCCUP EDUC; TABLE OCCUP, EDUC ALL; RUN;
Output
7.8 shows the results. Now that the basic table has been constructed, ...
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.