data b;
input x;
cards;
1
2
3
4
5
6
7
8
;
run;
data a;
do j=0 to floor(N/5);
sum=0;
do i=1 to 5;
n=j*5+i;
set b point=n nobs=N;
sum=sum+x;
output;
end;
data a;sum=0;do i=1 to 5; set b point=i nobs=N; sum=sum+x; output;end;stop;run;

|
楼主: 若水烟寒
|
2182
2
双重循环以5个观测值为一组求和的问题 |
|
已卖:840份资源 博士生 8%
-
|
| ||
|
|
| ||
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


