In Stata, command 'dea' reports efficiency scores but no weights used to value each input. Is it possible to run dea in mata environment and then export the weights of input instead? Or is there any command following dea can export the input weights?

I try to run dea in mata but Stata always report error. I don't know what's the problem.

Thanks in advance for your answers.

Stata code for dea:

cap mata mata drop CCR1()

mata:

function CCR2(real matrix data, real matrix dataref, real scalar k)

{

datatable=( ...... )

M=rows(data)

X=datatable[1..k,.]

Y=datatable[k+1..M,.]

Xref=dataref[1..k,.]

Yref=dataref[k+1..M,.]

N=cols(data)

class LinearProgram scalar q

q=LinearProgram()

c=(1, J(1,N,0))

lowerbd=., J(1,N,0)

upperbd=J(1,N+1,.)

theta=J(cols(data),1,.)

for(j=1;j

More Mengyang Zhang's questions See All
Similar questions and discussions