Suppose you have data consisting of 1000 variables and you need to impute missing values with mean/median. You can do it easily with PROC STDIZE.
proc stdize data= test out= result method=mean reponly; var X1-X1000; run;
By specifying the REPONLY option, the STDIZE procedure does not standardize the numeric variables; it replaces the missing values with the METHOD= statistic.
Other Useful METHOD= statistic options
- MEDIAN
- MIDRANGE
- IQR
- MAXABS : Maximum Absolute Value
- STD : Standard Deviation
If you want to replace missing values with 0 or any number
proc stdize data=develop1 reponly missing=0 out=imputed; var mortdue value yoj derog delinq clage ninq clno debtinc; run;
Note : You cannot use MISSING and METHOD options together.
Share Share Tweet