Skip to content

Instantly share code, notes, and snippets.

View mgao6767's full-sized avatar
😀

Adrian Gao mgao6767

😀
View GitHub Profile
@mgao6767
mgao6767 / winsorize.sas
Last active January 25, 2019 10:42 — forked from JoostImpink/winsorize.sas
winsorize macro
/*****************************************
Author unknown - that is a pity because this macro is the best since sliced bread!
Trim or winsorize macro
* byvar = none for no byvar;
* type = delete/winsor (delete will trim, winsor will winsorize;
*dsetin = dataset to winsorize/trim;
*dsetout = dataset to output with winsorized/trimmed values;
*byvar = subsetting variables to winsorize/trim on;