I have very little familiarity with Stata, and I am working on interpreting the code below (which concerns stochastic frontier analysis) in order to translate into R:
frontier lq lland lseed llabor, distribution(exponential)
predict double u_e, u
gen eff = exp(-u_e)
.sum eff
I am having trouble finding the meanings of two parts of this code:
u_e
exp()
What do these refer to? I understand that exp(x)
returns the "elementwise exponentiation" of x
, and I understand that u_e
is somehow related to the error term, but I do not understand what they are well enough to know how to translate them in R.
CodePudding user response:
u_e
is just the name supplied for a new variable. What's important is that it contains estimates of minus the natural log of the technical efficiency via E(u|e)
Hence exp(-u_e)
is just the estimated technical efficiency.
See https://www.stata.com/manuals/rfrontierpostestimation.pdf