[R] solve computationally singular

xchen chenxh007 at gmail.com
Tue Nov 7 22:47:07 CET 2006


Hi uRsers,

when inverting a 2 by 2 matrix using solve, I encountered a error message:
solve.default(sigma, tol = 1e-07) :
       system is computationally singular: reciprocal condition number
= 1.7671e-017

and then I test the determinant of this matrix: 6.341393e-06.

In my program, I have a condition block that whether a matrix is
invertible like this:
if(det(sigma)<1e-7) return NULL;

but this seems doesnot work to prevent the singularity when inverting a
matrix. I am some confused about the relationship between "reciprocal
condition number" and determinant. Can anybody give me some idea how to
prevent this situation?

Thanks a lot!

Xiaohui



More information about the R-help mailing list