- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I ran a dataset through proc freq and noticed I had missing values when I didn't expect any. Is there a way to output those values or print them so that I can determine what the issue might be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The TABLES statement has two options. MISSING and MISSPRINT.
The first treats missing values as valid values, same as any other value.
The later just displays the missing values but they do not count in the total used for calculating percentages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you mean that you want to look at other values, such as identifiers or variables used to create the "missing values" then perhaps you are looking for something like:
data help; set yourdatasetname; where missing( targevariablename); run;
Of perhaps provide a couple of other variables in proc freq:
proc freq data=yourdataset; tables thisvar*thatvar*targetvar / list missing; run;
The above approach is helpful when targetvar in some way depends on the other two variables (or one or three or ...). The List option puts all the values on one line in the output table for easier following and the missing gets the missing values in context.
"Printing missing" values by themselves is not much interest as it would look like:
.
.
.
.
.
by default.