[ADMB Users] ADMB-RE fitting failure in 11 but not in 10.1
mbrooks at ufl.edu
Thu Dec 6 12:23:59 PST 2012
A while back I had a similar underflow problem with solve(dvar_dmatrix). The elements of my determinant were so small and there were so many of them that the product was 0. As Dave suggests, the solution to my problem was to replace the determinant checking code with this code that doesn't have underflow issues.
if (temp > big)
if (big == 0.0)
cerr << "Error in matrix inverse -- matrix singular in solve(dvar_dmatrix)\n";
ofs << aa << endl;
I'm suprised that
> exp(sum(log(fabs(determinant components)))) == 0.0 and product(determinant components) == 0.0
could give different answers besides the sign.
Postdoctoral Researcher, Ponciano Lab
Biology Department, University of Florida
On 6 Dec 2012, at 11:47 AM, Tim Miller wrote:
> Dear Users,
> During the fitting of a random effects model in version 11 (Windows 7, MinGW GCC-4.5.2), I get a failure with error message:
> Error in matrix inverse -- matrix singular in solve(dmatrix)
> This occurs before a .par file is written. In 10.1 convergence is fine. The error doesn't occur in 11 when I use the sparse hessian option -shess and in that case I get the same result as 10.1 (with or without -shess).
> I think I have traced it to the solve function in ludcmp_solve.cpp just by searching for the error text in all the source code files and I think the error occurs when checking the determinant. In version 11 the function appears to check whether exp(sum(log(fabs(determinant components)))) == 0.0 whereas in 10.1 it checks product(determinant components) == 0.0.
> Assuming I have traced the source of the error correctly, why is the newer determinant checking method better than that in 10.1? If it is better, maybe there is a way to continue on rather than exiting on the error?
> I could provide the tpl/dat files, but fitting the model without -shess is annoying because it takes a while to get to the error.
> Users mailing list
> Users at admb-project.org
More information about the Users