[ADMB Users] matrix not positive definite
Mollie Brooks
mbrooks at ufl.edu
Fri Feb 8 13:19:38 PST 2013
Hi ADMB users,
I am trying to figure out why my variance-covariance matrix isn't positive definite. The matrix starts out ok and then I get the error
Error matrix not positive definite in choleski_decomp
To figure out the problem, I've been outputting parameters and the Var-cov matrix. Two parameters go into calculating the matrix: rho and sigmaSq. The matrix starts out as it should (I calculated the values separately to check). But then the matrix changes to something unexpected for the given parameter values and that's when it isn't SPD anymore.
This looks correct
rho = 0.5
sigmaSq = 1
varcov= 1 0.25 0.0625 0.03125
0.25 1.3125 0.328125 0.164062
0.0625 0.328125 1.33203 0.666016
0.03125 0.164062 0.666016 1.33301
and this looks correct
rho = 0.880797
sigmaSq = 1
varcov= 1 0.775803 0.601871 0.530126
0.775803 2.37767 1.84461 1.62473
0.601871 1.84461 3.20686 2.82459
0.530126 1.62473 2.82459 3.48789
but then the value of rho stays the same and the matrix changes.
rho = 0.880797
sigmaSq = 1
varcov= 1 -4.72992 1.037 -7.7791
-4.72992 -1.89369 2.18218 -4.8216
1.037 2.18218 3.46875 -2.17649
-7.7791 -4.8216 -2.17649 -0.917046
Can anyone offer any explanation or advice for why this is happening?
thanks,
Mollie
Mollie Brooks
Postdoctoral Researcher, Ponciano Lab
Biology Department, University of Florida
http://people.biology.ufl.edu/mbrooks
More information about the Users
mailing list