请教高手解释下下面第二个data步的意思,我对数组不明白,尤其是红色字体部分不明白:_s
是什么意思啊,另外_s[5]不是被置为缺失了吗,怎么下面的 if 语句还有_s[k] <1?多谢各位了
%let r =10;
data a;
call streaminit(1234);
do sample =1 to &r;
do i =1 to 6;
x =rand('T',3) ;
y =x/sqrt(3);
output;
end;
end;
keep sample i y;
run;
data shifts;
set a;
by sample;
array _n[5] _temporary_(1:5);
array _s[5] _temporary_;
if first.sample then call missing(of _s);
do k =1 to dim(_n);
if _s[k] <1 then if (sum ge (0.2+0.01*(_n[k]-1))) then do;
_s[k] =1; n =_n[k]; cat ='shifts';
output shifts;
keep sample n i cat;
end;
end;
run;