为什么以下内容不能产生期望的结果?SAS以增量形式循环运行
data data1;
do a = 0.0 to 1.0 by 0.1;
do b = 0.0 to 1.0 by 0.1;
do c = 0.0 to 1.0 by 0.1;
do d = 0.0 to 1.0 by 0.1;
if (a+b+c+d)=1 then output;
end;
end;
end;
end;
format a b c d 4.1;
run;
'想要的结果'是什么? – Joe
我的歉意。期望的结果是具有记录的数据集,其中(a + b + c + d)= 1。例如,a = 0,b = 0,c = 0和d = 1不在数据集中。 – user3245869