我写了一个均值填空的例子,可能有帮助
更多看我的博客:
http://hi.baidu.com/crack_man/blog
data crackman;
input x y@;
datalines;
1 2
3 4
5 6
. 9
6 7
7 .
1 8
6 3
;
run;
data crackman;
if _n_=1 then do until(lastobs);
set crackman nobs=obs end=lastobs;
sum_x+x;
sum_y+y;
end;
set crackman;
if x=. then x=ceil(sum_x/obs);
if y=. then y=ceil(sum_y/obs);
run;
proc print;
run;