Calculate Row and Column Percentages
Overview
It is just as simple
to create row or column percentages as it is to create cell percentages.
Just as PCTN and PCTSUM calculate percentages for table cells, the
ROWPCTN, ROWPCTSUM, COLPCTN, and COLPCTSUM statistics create row or
column percentages. In these examples, the goal is to calculate row
and column percentages of the total sum for each row and column. Because
we are looking at the sum, we use the ROWPCTSUM and COLPCTSUM statistics.
To
see examples of calculating percentages based on the number of observations
using ROWPCTN and COLPCTN, see Add Row Totals to a Table with Row Percentages.
Create Row Percentages
-
Create the table. Just as in the previous example, we start by building the ...
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.