In SPSS it is easy to request the number of missing and
non-missing values for character variables. We can use the frequencies
command to request frequencies for numeric and character variables and use the
/format=notable
subcommand to suppress the display of the frequency tables, leaving us with a concise
report of the number of missing and non-missing values for each variable (see below).
FREQUENCIES VARIABLES=RACE SES SCHTYPE PRG
/FORMAT=NOTABLE
/ORDER= ANALYSIS .
SAS
In SAS, we have to go to a little extra effort to get the number
of missing and non-missing values for character variables. We can use
proc format to make a format for character variable to be either
"nomissing" or "missing" and then use that format with proc freq as
illustrated below. We then get a concise table showing us the number of missing and
nonmissing for the variable schtype.
proc format;
value $miss " "="missing"
other="nomissing";
run;
proc freq data=temp;
tables schtype / missing;
format schtype $miss.;
run;
The content of this web site should not be construed as an endorsement
of any particular web site, book, or software product by the
University of California.