Using PROC TABULATE to Count Missing and Nonmissing Values for Character Variables

A similar program can provide the number of missing and nonmissing values for the character variables in the data set. There are some differences in how PROC TABULATE can be used to count missing and nonmissing values for character variables. You need to apply a format having only two categories, missing and nonmissing, to each of the character variables to accomplish your goal; the same trick used with PROC FREQ earlier in this chapter. In addition, use the MISSING option to force the number of missing values to be listed.

Program 3-7. Using PROC TABULATE to Count Missing and Nonmissing Values for Character Variables
PROC FORMAT; VALUE $MISSCH ' ' = 'Missing' ...

Get Cody’s Data Cleaning Techniques Using SAS® Software 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.