As I understand, when mle is given derivatives of the log-likelihood,
it checks the computed derivatives against its own numerical
derivatives at the first iteration. If they are different, the
program reports that there is a difference and stops. This is a very
useful test, but the diagnostic information could be a bit more helpful.
Would there be any problem in reporting the computed derivatives and
the numerical derivatives, because this would help the programmer
identify where the error in programming the derivatives has
occurred? At the moment I am struggling with an unusually messy set
of derivatives. While I can, I think, persuade the program to
generate the comparison, it would be much easier if this were done
automatically before the program stops.
As a further thought: what is the test that the numerical and
computed derivatives are different? I can imagine circumstances
where one might start the estimation from a potentially degenerate
set of initial parameter values that might lead to a false positive
for the difference between the two.
Gordon