start ccrie(Theta,Lambda,X,Y); n = nrow(X); m = ncol(X); s = ncol(Y); X = t(X); /* */ Y = t(Y); /* */ Theta=j(n,1,0.); Lambda=j(n,n,0.); do k = 1 to n; C = { 1 } || j(1,n,0); /* */ A = ( X[,k] || -X) // /* */ ( j(s,1,0) || Y); B = j(m,1,0) // Y[,k]; /* */ rel = j(s+m,1,'>='); call mlinprog(C,'min',A,rel,B,Eff,Z,Zd); Theta[k] = Z[1]; /* */ Lambda[k,] = t(Z[2:n+1]); /* */ end; X = t(X); /* */ Y = t(Y); /* */ finish;