Combining Numeric and Character Validity Checks in a Single Macro with a Single Validation Data Set
In this section, the two previous macros are combined, one to test for valid numeric values and the other to check for discrete character values or character ranges. The validation data file includes information on both the numeric and character variables, in any order. For the numeric variables, include the variable name (in uppercase or lowercase), the minimum and maximum values, and a ‘Y’ if missing values are okay (not to be flagged as errors). For the character variables, include the variable name, a list of discrete character values and/or ranges of character values, and a missing value indicator. Be sure to insert at least two spaces between ...
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.