Add Totals to Rows and Columns
Overview
One trick that will
definitely make your tables more readable is row and column totals.
Totals are quite easy to generate in PROC TABULATE.
For example, consider
the following code, which does not ask for totals:
PROC TABULATE DATA=TEMP; CLASS EDUC2 GENDER FULLTIME; TABLE EDUC2*GENDER, FULLTIME*N; RUN;
This code produces Output
5.15. This is a nice table, but it shows only the details. You can see that there are 98 women with education "<= High School" that are working part-time. But if you want to see how this compares to the total number of women in this row (both those who work part-time and those who work full-time), you have to do some math. By adding 98 to 695, you can figure out that 98 out of ...
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.