On Tue, 1 Jul 2008, Gordon Hughes wrote:
I have uploaded to the gretl server 4 function packages to estimate
stochastic frontier models with & without heteroskedasticity.
sfa_mod & sfa_hetmod estimate SFA models without & with heteroskedasticity.
sfa_eff & sfa_het_eff estimate the case by case efficiencies using the
results from sfa_mod & sfa_hetmod respectively.
The packages pretty much cover the same range of options as provided by
Stata's frontier command (Version 10) with the exception of heteroskedastic
random errors (the v[i,t] component), which are less interesting and very
difficult to estimate. Please note that both Stata and I find that the
heteroskedastic models are sometimes difficult or impossible to estimate. I
will add a version matching Stata's xtfrontier for panel data in due course.
Thank you! This is really excellent. By the way, thanks to Allin's efforts
on the quantile regression front, we now have a (somewhat specialised)
linear programming routine in our source tree; it is conceivable to
expose this as a user-callable function, which would make it possible to
write comparable routines for doing Data Envelopment Analysis (not that
I'm a huge fan of DEA myself, but still...).
The programs are well-tested as estimation procedures, but the
interface is a
little primitive because I would prefer to put everything into a single
package with branches depending upon whether the user wants to specify
uniform or heteroskedastic errors and whether they want to obtain efficiency
estimates or not.
The difficulty for me at the moment is that each combination requires a
different number and type of inputs or outputs and I can't work out how to do
this conveniently without requiring script users to specify null fields and
pre-created series for the results. There is probably a way, but I don't
gretl sufficiently well to be sure how.
The function packaging and upload process is a bit messy. gretl (for
Windows) crashed once during the process and it managed to put the wrong
helper functions into one package (I don't think that this was my mistake) so
I have upload several packages on more than one occasion. The most recent
are the correct ones - all marked as Version 0.5.
You're right. The fact that gretl crashed is especially unfortunate.
Clearly, a bug like that has top priority. However, another thing we will
have to address is finding a way to let a function package expose more
than one public function. Stefano Balietti has been doing some very nice
work in the area of GARCH models which would greatly benefit from this.
Finally, I would like to endorse many of the remarks made by Andreas
Rosenblad in his message of March 20th. His suggestions would make the
process of defining and using function packages rather easier.
Please let me know if you find errors in the SFA packages or have suggestions
for improvements or extensions.
One of Andreas' requests is in place already: you can attach description
strings to the function parameters. I'm attaching a slightly revised
version of the sfa_mod() function which implements this, plus a few minor
changes.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti