04-14-2015 02:39 AM
I can view variable UTIL as 0. Before this, I use UTIL=round(a/b,0.0001) to calculate UTIL.
And then I use proc expand as below:
PROC EXPAND data=trade_util out=trade_util1;
CONVERT util=util_MEAN3 / transformout=(movave 3 lag 1);
Do anyone know why for moving average of 3 zeros, I get numbers like
I follow it up with code like this, but how can I avoid this extra step? It has something to do with numeric precision.
04-16-2015 05:16 PM
I thing proc expand is geared for speed and skips the numerical precautions that are common in other procedures. You will have to follow the procedure call with a datastep to round() or fuzz() output values. If only for display, numerical formats will do the rounding for you.