举个小例子,你看下,数据集大的话你就改改参数吧。。。试下可行不
data raw;
length p1 t1 p2 t2 p3 t3 p4 t4 8;
input p1 t1 p2 t2 p3 t3 p4 t4;
cards;
1 2 4 4 8 6 7 8
2 1 6 6 7 11 12 15
3 2 7 2 11 6 15 12
11 16 13 15 16 20 16 24
;
run;
data a;
array a(4) p1-p4;
array b(4) t1-t4;
array c(3) c2-c4;
set raw;
do i=2 to 4;
e=0;
do j=1 to i-1;
if a(i)-a(j)>3 and b(i)-b(j)>1 then e+1;
end;
if e=i-1 then c(i-1)=b(i);
end;
run;


雷达卡






京公网安备 11010802022788号







