SAS author's tip: Counting missing values with PROC MEANS

0

Data Quality for Analytics Using SASThis week's SAS tip is from Gerhard Svolba and his latest book Data Quality for Analytics Using SAS. For additional bonus book content and to learn more about Gerhard and his work, visit his author page.

The following excerpt is from SAS Press author Gerhard Svolba's book "Data Quality for Analytics Using SAS" Copyright © 2012, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software).

Counting missing values with PROC MEANS

A simple and quick method to check the number of missing values in a table is to use PROC MEANS with the NMISS option:

proc means data = hmeq nmiss;
run;

Note that only variables with a numeric format can be analyzed with this method. If no variables are specified in the VAR statement, all numeric variables in the data set are used for the analysis. An alternative would be to use the VAR statement in the MEANS procedure:

Var mortdue value yoj;

The output that is generated from this procedure is shown in Output 10.1.

Share

About Author

Shelly Goodin

Social Media Specialist, SAS Publications

Shelly Goodin is SAS Publications' social media marketer and the editor of "SAS Publishing News". She’s worked in the publishing industry for over thirteen years, including seven years at SAS, and enjoys creating opportunities for fans of SAS and JMP software to get to know SAS Publications' many offerings and authors.

Comments are closed.

Back to Top