[ADMB Users] Non-matching analytic and numeric derivatives
davef at otter-rsch.com
Fri Oct 10 10:45:29 PDT 2014
On 10/09/2014 07:32 AM, Jeff Laake wrote:
This might be of interest to others so I cc's it to the list.
In your code for the log-likelihood you have the line.
Now I figured that 0.000000000000000000000001 might be too small.
What would happen is that is pch is zero you will get derivatives on the
and this could make the model numerically unstable at least during the
initial fitting stage.
I modified this to
and ran the model for a while and then used the values as initial values
to run the
model with your original code. It converged easily.
There is nothing magical about 1.e-8. For some models you might need
something like 1.e-4 to start.
> Per Johnoel's request I forwarded a zip containing an example in which
> the numeric and analytic derivatives don't match when I use -dd. The
> code fails because it thinks it should move but can't make any
> progress because it is at the min.
More information about the Users