各位大神这是什么意思 ERROR: The SAS/IML product with which IML is associated is either not licensed for your system or the product license has
expired. Please contact your SAS installation representative.
底下是代码
data xhy;
input x1 x2 y@@;
cards;
8.3 70 10.3
8.6 65 10.3
8.8 63 10.2
10.5 72 16.4
10.7 81 18.8
10.8 83 19.7
11.0 66 15.6
11.0 75 18.2
11.1 80 22.6
11.2 75 19.9
11.3 79 24.2
11.4 76 21.0
11.4 76 21.4
11.7 69 21.3
12.0 75 19.1
12.9 74 22.2
12.9 85 33.8
13.3 86 27.4
13.7 71 25.7
13.8 64 24.9
14.0 78 34.5
14.2 80 31.7
14.5 74 36.3
16.0 72 38.3
16.3 77 42.6
17.3 81 55.4
17.5 82 55.7
17.9 80 58.3
18.0 80 51.5
18.0 80 51.0
20.6 87 77.0
;
proc iml;
n=31; t=1;
use xhy;
read all var{x1 x2 y} into m;
do i=1 to n;
t=t#m[i,3];
end;
prod=t##(1/n); j=j(n,1,1); xx=j||m[,1:2];
h=xx*inv(xx`*xx)*xx`;
do lamb=-0.5 to 0.5 by 0.01;
if lamb=0 then zlamb=prod#log(m[ ,3]);
else zlamb=(m[,3]##lamb-j)/(lamb#(prod##(lamb-1)));
sse=zlamb`*(i(n)-h)*zlamb; lsse=lsse//(lamb||sse);
end;
tt=prod#log(m[ ,3]); sse0=tt`*(i(n)-h)*tt; lsse[51,1]=0;
lsse[51,2]=sse0; index=lsse[>:<,]; minlsse=index[1,2];
lambda0=lsse[minlsse,1];
print lambda0;
quit;
run;
expired. Please contact your SAS installation representative.
底下是代码
data xhy;
input x1 x2 y@@;
cards;
8.3 70 10.3
8.6 65 10.3
8.8 63 10.2
10.5 72 16.4
10.7 81 18.8
10.8 83 19.7
11.0 66 15.6
11.0 75 18.2
11.1 80 22.6
11.2 75 19.9
11.3 79 24.2
11.4 76 21.0
11.4 76 21.4
11.7 69 21.3
12.0 75 19.1
12.9 74 22.2
12.9 85 33.8
13.3 86 27.4
13.7 71 25.7
13.8 64 24.9
14.0 78 34.5
14.2 80 31.7
14.5 74 36.3
16.0 72 38.3
16.3 77 42.6
17.3 81 55.4
17.5 82 55.7
17.9 80 58.3
18.0 80 51.5
18.0 80 51.0
20.6 87 77.0
;
proc iml;
n=31; t=1;
use xhy;
read all var{x1 x2 y} into m;
do i=1 to n;
t=t#m[i,3];
end;
prod=t##(1/n); j=j(n,1,1); xx=j||m[,1:2];
h=xx*inv(xx`*xx)*xx`;
do lamb=-0.5 to 0.5 by 0.01;
if lamb=0 then zlamb=prod#log(m[ ,3]);
else zlamb=(m[,3]##lamb-j)/(lamb#(prod##(lamb-1)));
sse=zlamb`*(i(n)-h)*zlamb; lsse=lsse//(lamb||sse);
end;
tt=prod#log(m[ ,3]); sse0=tt`*(i(n)-h)*tt; lsse[51,1]=0;
lsse[51,2]=sse0; index=lsse[>:<,]; minlsse=index[1,2];
lambda0=lsse[minlsse,1];
print lambda0;
quit;
run;