Use Appropriate Formats for Statistics
The FORMAT= option in
the PROC TABULATE statement applies a format for the value in each
table cell. You can use any SAS or user-defined format. The FORMAT=
option is a great way to control the formatting of your table row
by row or column by column.
But first, a quick review
of the basics. If you do not specify a value for the FORMAT= option,
PROC TABULATE uses the format BEST12.2. This is a "one size fits
all" solution that does not work well for tables like that produced
by the following code:
PROC TABULATE DATA=TEMP; CLASS SECTOR OCCUP; VAR INCOME; TABLE OCCUP=' ', SECTOR=' '*INCOME*(N MEAN); RUN;
Output 10.1 shows how the BEST12.2 format gives our values of the mean two decimal places. Our values ...
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.