Data Quality Review for Missing Values and Outliers

Before performing any analysis on a dataset, it is often useful to perform a review of the dataset in order to detect missing values and outliers. The macro provided in this paper is a SAS ® macro program designed to check the data in a time-efficient and user-friendly way, which can generate the following content: First, the macro can generate an Excel report to determine whether the variables have missing values or outliers, and report the percentage of missing values. Second, the macro can display all records which contain missing values and/or outliers, grouped by variables in an Excel file. Each tab will represent the exception records for one variable. This macro can automatically check all variables regardless of the dataset structure and variable names. Also, an extended version of this macro can perform an automatic check of a whole SAS data library at one time.