Sunday, July 5, 2009

DEA technical efficiency score

function TE=techeff(X,Y)
%% techeff(X,Y) calculates the technical efficiency of decision making units%%% Input:% X: N x J matrix, with N inputs for each unit% Y: M x J matrix, with M outpus for each unit% J: # of decision making units%%% Output:% TE: J x 1 vetctor contains the technical efficiency of each DMU%%% Reference:% Hughes and Yaisawarng, 2004, "Sensitivity and dimensionality tests of DEA% efficiency scores," European Journal of Operational Research, 154,% p.410-422%%% Author information:% Yundong Tu% Department of Economics% University of California, Riverside% e-mail: yundong.tu@gmail.com% July 4, 2009
%check data inputs% if nargin<2% error(' Not enough input arguments to run techeff ')% end
if nargin<2 rand('twister',3); X=3.*rand(5,20); Y=5.*rand(3,20);end
%check dimension compatibilityif size(X,2)~=size(Y,2) error(' Input data are not compatible. Inputs and outputs must have the same collumns, i.e., for the same number of DMUs')end
options=optimset('Display','off');%,'MaxIter',100,'MaxFunEvals',100,'TolX',1e-2,'TolFun',1e-2);for k=1:size(X,2) [z,TE(k,1)]=linprog([zeros(size(X,2),1);1.0], [-Y,zeros(size(Y,1),1);X, -X(:,k)], [-Y(:,k);zeros(size(X,1),1.0)],... [ones(1,size(X,2)),0.0], 1.0,zeros(size(X,2)+1,1),ones(size(X,2)+1,1), 0.5.*ones(size(X,2)+1,1),options);end

No comments:

Post a Comment