|
楼主

楼主 |
发表于 2012-9-29 13:10:03
|
只看该作者
程序出错,请帮忙,急!!!!!!!!
proc iml;
use a;
read all into x;
start parent (x,se);
aa=nrow(x); m=x[+,1];n=aa-m;ma=J(m,2,.);pe=J(n,2,.);t=0;
do j=1 to aa;
t=t+1;
if x[j,1]*j^=j then t=t;
pe[t,]=x[j,];
end;
ma=x[n+1:aa,];
a=1+round((n-1)*ranuni(j(50,1,0)));
b=1+round((m-1)*ranuni(j(50,1,0)));
if se=0 then Pa=ma[a,2];
if se=1 then Pa=pe[b,2];
return (pa);
finish;
p1=pa(x,0);p2=pa(x,1);
print P1 P2;
quit;run;
求助程序出错,原因在于t的行数和pe的行数不一致,请帮忙!
本文来自: 人大经济论坛 SAS专版 版,详细出处参考: <!-- m --><a class="postlink" href="http://bbs.pinggu.org/forum.php?mod=viewthread&tid=1593991&page=1&fromuid=844830">http://bbs.pinggu.org/forum.php?mod=vie ... uid=844830</a><!-- m --> |
|