Overview

Why two chapters on a single statistic? Because percentages are different from other statistics. In most cases, changing the statistic displayed in a PROC TABULATE table is as simple as changing the statistic name in the TABLE statement.
For example, you can take your PROC TABULATE code and switch the statistic keyword MEAN to N or MAX with no other changes to the TABLE statement, and your new table will show the number of observations or the maximum value in each cell instead of the mean.
Percentages are different. In all but the simplest cases, you need to change the syntax of the TABLE statement to get the percentage that you want.

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.