Following up the replies to my questions:
A. The redundant functions on the server which should be removed are
(a) sfa_eff, and (b) sfa_het_eff. These have been replaced by
renamed versions for consistency with the rest of my functions.
C. I will see what I can do about making my test dataset available
to other users.
D. The new option for mle & nls. Thank you for implementing this
change. Going a little further, is there any way of controlling the
option via a flag? At the moment I have different but almost
identical blocks of code that are executed if a flag is set to
request numeric or analytical derivatives. It would be nice, but not
essential if the "-n" could be parameterised, but I don't know
whether this is possible and if so how.
Using pvalue(n,x) instead of 1-cnorm(x). I have made this
change. It seems to be more improve the behaviour of mle a little,
but it is still difficult to avoid the gradient search blowing up in
various circumstances. Strangely, the use of analytical derivatives
seems to create particular problems when I start the procedure from
the coefficient values obtained using a restricted specification
which implies that a particular parameter eta is zero. It is clear
that the likelihood function isn't globally concave, but using
numerical derivatives seems to be a lot more robust in such circumstances.
Gordon