%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;



雷达卡



京公网安备 11010802022788号







