$ontext Stochastic Nonparametric Envelopment of Data (StoNED) Cross-sectional example Andrew Johnson, Aug 2008 any questions or comments please contact ajohnson@tamu.edu Data from: Emrouznejad, A (1995-2001), " Ali Emrouznejad's DEA HomePage", Warwick Business School, Coventry CV4 7AL, UK $offtext *Define the parameters related to the data sets i "DMU's" /Depot1*Depot20/ j 'inputs and outputs' /stock, wages, issues, receipts, reqs/ inp(j) 'inputs' /stock, wages/ outp(j) 'outputs' /issues, receipts, reqs/ alias (i,h) ; Table data(i,j) stock wages issues receipts reqs Depot1 3 5 40 55 30 Depot2 2.5 4.5 45 50 40 Depot3 4 6 55 45 30 Depot4 6 7 48 20 60 Depot5 2.3 3.5 28 50 25 Depot6 4 6.5 48 20 65 Depot7 7 10 80 65 57 Depot8 4.4 6.4 25 48 30 Depot9 3 5 45 64 42 Depot10 5 7 70 65 48 Depot11 5 7 45 65 40 Depot12 2 4 45 40 44 Depot13 5 7 65 25 35 Depot14 4 4 38 18 64 Depot15 2 3 20 50 15 Depot16 3 6 38 20 60 Depot17 7 11 68 64 54 Depot18 4 6 25 38 20 Depot19 3 4 45 67 32 Depot20 3 6 57 60 40 ; *define the parameters related to the model PARAMETERS Y(i) output L(i) labor Z(i) environmental variable n ; VARIABLES A(i) intercept E(i) error term SS Sum of Square of errors mresid M2(i) M3(i) mM2 mM3 sigmau sigmav sumsigma2 lamda myy epsilon(i) temp2(i) Eu(i) Etheta(i) ; POSITIVE VARIABLES BL(i) marginal product of labor BZ(i) marginal product of capital ; * Set up the equations EQUATIONS QSSE objective=sum of squares of errors QREGR(i) regression equation QCONC (i,h) concavity constraint; QSSE.. SS =e= sum(i,E(i)*E(i)); QREGR(i).. Y(i)=e=A(i)+BL(i)*L(i)+E(i); QCONC(i,h).. A(i)+BL(i)*L(i)=l=A(h)+BL(h)*l(i); alias (i,iter); * Assign the data to variables Z(i) = data(i,'stock'); L(i) = data(i,'wages'); Y(i) = data(i,'issues'); n = card(i); * Solve the model Model StoNED /all/ SOLVE StoNED using NLP Minimizing SS; * Decompose inefficiency and noise mresid.l = sum(i,E.l(i))/n; M2.l(i) = (E.l(i) - mresid.l)*(E.l(i) - mresid.l); M3.l(i) = (E.l(i) - mresid.l)*(E.l(i) - mresid.l)*(E.l(i) - mresid.l); mM2.l = sum(i,M2.l(i))/n; mM3.l = sum(i,M3.l(i))/n; if (mM3.l > 0, mM3.l = 0); sigmau.l =(mM3.l/((2/Pi)**(1/2)*(1-4/Pi)))**(1/3); sigmav.l = (mM2.l-((Pi-2)/Pi)*sigmau.l**2)**(1/2); sumsigma2.l = sigmau.l**2 + sigmav.l**2; lamda.l = sigmau.l / sigmav.l; myy.l = (sigmau.l**2*2/Pi)**(1/2); epsilon.l(i) = (E.l(i) - myy.l); temp2.l(i) = (1/(1*(2*Pi)**(1/2)))*exp((-((epsilon.l(i)/(sigmav.l**2)) - 0)*((epsilon.l(i)/(sigmav.l**2)) - 0))/(2*1**2)); Eu.l(i) = (-epsilon.l(i)*(sigmau.l**2)/sumsigma2.l) + (temp2.l(i) / (1-errorf((epsilon.l(i)/(sigmav.l**2)))))* (sigmau.l**2) * (sigmav.l**2) / sumsigma2.l; Etheta.l(i) = ( A.l(i)+BL.l(i)*L(i)+Eu.l(i)-Eu.l(i))/ (A.l(i)+BL.l(i)*L(i)+Eu.l(i)); * Formatting for the display command Option Etheta:3:0:1; Option E:3:0:1; Option mresid:3:0:1; Option M2:3:0:1; Option M3:3:0:1; Option mM2:3:0:1; Option mM3:3:0:1; Option sigmau:3:0:1; Option sigmav:3:0:1; Option sumsigma2:3:0:1; Option lamda:3:0:1; Option myy:3:0:1; Option epsilon:3:0:1; Option Eu:3:0:1; Display E.l,mresid.l,M2.l,M3.l,mM2.l,mM3.l,sigmau.l,sigmav.l,sumsigma2.l,lamda.l,myy.l,epsilon.l,Eu.l,Etheta.l * * create sorted output * set r /rnk1*rnk1000/; parameter rank(i); alias (i,ii); rank(i) = sum(ii$(Etheta.l(ii)>=Etheta.l(i)), 1); parameter E2(r,i); E2(r,i)=Etheta.l(i)$(rank(i)=ord(r)); option E2:4:0:1; display E2;