use gpe2;
data1=xlsreadm("research.xls","b2:ax50",12,0);
s=data1;
data2=xlsreadm("research.xls","b2:ac50",13,0);
x=data2;
y=s~x;
call reset;
_nplot=1;
_method=5;
_iter=100;
_tol=1.0e-5;
_vcov=1;
_b={1,2};
call estimate(&cesll,y);
end;
proc cesll(data,b);
local s,j,u_j,sum_c;
s=data[.,1:49];
sum_c=0;
j=1;
do while j<29;
u_j=sumc((data[.,49+j]-b[2].*s*data[.,49+j])^2);
sum_c=u_j+sum_c;
j=j+1;
endo;
retp(-49*28*0.5*ln(b[1]^2)+28*ln(det(eye(49)-b[2].*s))-0.5/(b[1]^2)*sum_c);
endp;
运行时,老是出现Argument must be positive 的错误提示。请高手指点。