Statistics Labels Do Not Appear Next to the Correct Variable

You probably have your desired table pictured perfectly in your mind, but getting it to look like that in your SAS output can sometimes be a challenge. Unfortunately, PROC TABULATE cannot read your mind.
A common problem is that you get the basic structure of the table correct, and you get the correct values in the table cells, but the row and column headings are not as you would like. For example, look at the following code:
PROC TABULATE DATA=TEMP F=DOLLAR8.;
   CLASS AGE NUMKIDS;
   VAR INCOME;
   TABLE INCOME*AGE, NUMKIDS*MEAN;
RUN;
There is nothing wrong with Output 17.13, but it is difficult to read. It looks like it is displaying the mean number of children because the MEAN label is ...

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.