Exclude Missing Data
The
example in Display Variable Categories That Have Missing Data shows how to use PRELOADFMT with PRINTMISS options to force
all possible values of your class variables to be displayed in your
table. You can also use PRELOADFMT to do the
opposite. That is, you can use PRELOADFMT to limit your table to the
values in your format.
You do this by pairing
PRELOADFMT with the EXCLUSIVE option. The EXCLUSIVE option tells PROC
TABULATE to limit the table to classification values that are in your
user-defined format and are also present in the data set.
For example, consider
the following code:
PROC FORMAT; VALUE GRADEFT 4='A' 3='B' 2='C' 1='D' 0='F'; RUN; PROC TABULATE DATA=OTHERDATA ORDER=FORMATTED; CLASS GRADE GENDER; FORMAT ...
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.