怎样把这些缺失值都变成点?作者: shiyiming 时间: 2009-4-6 07:21 标题: Re: 【求助】如何自动读入变量名? First I think you have to make sure that there are no value for a certain variable that equals to the possible missing values, either -977 or -99 or whatever..
If not, you may try following code.
data test1(drop=i);
set test;
array var_array {5} var1-var5;
do i=1 to 5;
if var_array{i} in (-99,-977) then var_array{i}=.;
end;
run;
Also, if your variables were not set as var1 , var2 or whatever, you can use the following more universe code
data test1(drop=i);
set test;
array nvar(*) _numeric_;
do i=1 to dim(nvar);
if nvar(i)in (-977,-99) then nvar(i)=.;
end;
run;