I have defined nx and ny before writing the LP problem. I want to write this code inside proc iml command. So what is the write command to run " LP" model in this case ? And I need to put equality constraints but I do not know how to do this here? here is my detailed code: Proc iml; option nonotes; P=2 ; n=3 ; B= {1, 1}; X1= { 0.019831833 0.150408859 0.782582506 }; x2={ 1.008931805 0.365347241 0.055856515 }; Xt1 = t(x1); xt2=t(x2); xt=xt1 || xt2; E= 1#normal(repeat(-1,n)); Y=xt* B+E; my = sum(y)/n; m1 = sum(xt1)/n; m2 = sum(xt2)/n; ny =(y-my)/sqrt(t(y-my)*(y-my)); nX1 =(xt1-m1)/sqrt (t(xt1-m1)*(xt1-m1)); nX2 =(xt2-m2)/sqrt(t(xt2-m2)*(xt2-m2)); nx= nx1||nx2; start fun(DEV) global (n,p); sumf=0; do i = 1 to 6; sumf = sumf + (DEV[I]); end; return (sumf); finish fun; start con(DEV) global (lambda,lenght,thrd,estvar1,g,mseco,mspeco,i2,R,nx,n,ny,rxy,p); c=j(3,1,0); sumc1= DEV[1]-DEV[4]+(DEV[7]*NX[1,1])+(DEV[8]*NX[1,2]); sumc2=DEV[2]-DEV[5]+(DEV[7]*NX[2,1])+(DEV[8]*NX[2,2]); sumc3=DEV[3]-DEV[6]+(DEV[7]*NX[3,1])+(DEV[8]*NX[3,2]); c[1]= NY[1]-sumc1; c[2]=NY[2]-SUMC2; c[3]=NY[3]-SUMC3; return (c); finish con; call LP (rc, kres, "fun");
... View more