[ADMB Users] Non-matching analytic and numeric derivatives

Jeff Laake jefflaake at gmail.com
Thu Oct 2 12:15:11 PDT 2014

I'm running into a situation in which the numeric and analytic derivatives
are vastly different.  I have separate code FORTRAN code that fits the
model with numeric derivatives and I know that the log-likelihood value
produced by the ADMB code and the numeric derivatives are correct because
they match the FORTRAN code. The analytic derivatives are several orders of
magnitude greater (960 vs 0.0001) so the optimization algorithm thinks it
should move but can't from what I can tell.  It gives up because it can't
make any improvements because I started the code at the MLEs derived from
the FORTRAN code.

This is a very large problem.  It is a Cormack-Jolly-Seber model with
10000+ capture histories for 27 occasions with 251 parameters.  The input
file is 135MB because the design matrix has 260,000+ rows and 251 columns.
If I use a subset of the data (50-75%) the input file is reduced to less
than 100MB and everything works fine. Also if I keep the data set the same
and reduce the number of columns in the design matrix to 70, it also works
fine. It is not a single model that fails. I tried a mdeol with 3/4 of the
data and 357 parameters and it fails as well. It appears to be a function
of the magnitude of the design matrix (x) which would be in the derivative
calculation because the likelihood is a function of 1/(1+exp(-X'Beta)).  I
do not get any out of error messages.  All of the index ranges are input
parameters and adjust automatically and I'm compiling in safe mode.

Any ideas?  Any help is appreciated. I'd like to use ADMB for these
problems but may have to remain with my R/FORTRAN code which is slower but

I'm using ADMB 11 on a Windows machine with 8GB RAM with the Mingw/gcc4.5.2

regards --jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20141002/d0ce5ab5/attachment.html>

More information about the Users mailing list