I have been comparing the output of gretl and Stata for the
half-normal stochastic frontier model (Example 17.1) in the User's
Guide. They are extremely close, which is reassuring. Without
detailed timings my impression is that the execution times are not
substantially different - my sample is ~ 550 observations and the
model has 13 parameters.
This exercise prompts me to raise a question. The default mle setup
relies upon numerical rather than analytical derivatives. In the
days when I was programming maximum likelihood models, this would
have imposed a huge performance penalty. But writing out all of the
derivatives is rather tedious in mle if one wants to test a lot of
different specification - unless one does it properly via a function
that can parse the number of independent variables, etc. So, the
question is - has anyone assessed the performance penalty from using
numerical rather than analytical derivatives? For example, I note
that the ZIP model shown as Example 17.3 does not have any deriv
statements, so clearly it was not thought worthwhile including them.
One point is that in my experience the use of numerical derivatives
can problems when the starting values are poor. I found this with
the standard deviation parameters (su & sv) in SFA model when I got
the scale wrong - mle blew up very quickly reporting that something
was not a number. This should not happen with analytical derivatives.
I would appreciate any comments. Then I will set about defining
various SFA models as user functions and later as function packages
that others can use.