Data Management

Stupid Human Tricks With PROC EXPAND

Date Added: Mar 2010
Format: PDF

PROC EXPAND is one of the lesser-known procedures in SAS/ETS. Its power and its purpose make it very useful for a host of basic, non-statistical, data management tasks. The paper will cover some tasks which may otherwise require lots of coding and/or macro programming? unless PROC EXPAND resides in the bag of tricks. The paper shows how to: create lags and leads of variables; create moving maxima and minima of a given length; aggregate chunks of K records; and build moving-window averages with trimming to handle edge cases.