Hi, I currently have a problem that requires filling the missing value with surrounding value mean. For example: data have; input a ; datalines; 1 2 2 . . 1 . 2 ; run; Here is what I need: data want; input a ; datalines; 1 2 2 1.5 1.25 1 1.5 2 ; run; As you may notice, the filling method is when there is only one missing, simply take the average of the surrounding values. If there are two continuous missing value, take the average of surrounding values to fill the first missing, then use the same method as only one missing value to fill the second missing. Any suggestion would be appreciated. Thank you.
... View more