Tag: SAS macro

How to use the SAS Auto Call facility

Many SAS programmers use macros. I have seen students in my SAS classes use several methods to activate their macros. One way is to load the macro in the Display manager or editor in SAS OnDemand for Academics and submit it. Another technique is to use the statement %Include macro-name. […]

How to use the SAS Auto Call facility was published on SAS Users.

Two macros for detecting data errors

Last year, I wrote a blog demonstrating how to use the %Auto_Outliers macro to automatically identify possible data errors. This blog demonstrates a different approach—one that is useful for variables for which you can identify reasonable ranges of values for each variable. For example, you would not expect resting heart […]

Two macros for detecting data errors was published on SAS Users.

How to evaluate SAS expression in DATA Step dynamically

In many programming languages, there is a function named eval() that can be used to evaluate an expression and return the result at run time. For example, in Python, the eval() function parses the expression passed to it and runs a Python expression or code within the program. Even Python […]

How to evaluate SAS expression in DATA Step dynamically was published on SAS Users.

Adjusting outliers with the 1.5 IQR rule

In my new book, End-to-End Data Science with SAS: A Hands-On Programming Guide, I use the 1.5 IQR rule to adjust multiple variables.  This program utilizes a macro that loops through a list of variables to make the necessary adjustments and creates an output data set. One of the most […]

Adjusting outliers with the 1.5 IQR rule was published on SAS Users.