[R] system is computationally singular: reciprocal condition number

Thomas Lumley tlumley at uw.edu
Fri Oct 26 05:24:15 CEST 2012


On Fri, Oct 26, 2012 at 12:14 PM, langvince <langv at purdue.edu> wrote:

> Whatever I do, however I subset it I get the "system is computationally
> singular: reciprocal condition number" error.
> I know what it means and I know what should be the problem, but there is no
> way this is a singular matrix.
>
> I have uploaded the input file to my ftp:
> http://mkk.szie.hu/dep/talt/lv/CentInpDuplNoHeader.txt
> It is a tab delimited txt file with no headers.

It's a singular matrix.  The data matrix has rank 300 according to
either qr() or svd().  The 301st singular value is about ten orders of
magnitude smaller than the 300th one.

The problem is the rounding of the values -- if you take 372 vectors
in 380-dimensional space they should be linearly independent, but if
you force them to lie on a relatively coarse grid there are quite
likely to be linear dependencies.  When I add random noise in the
fourth decimal place, the matrix stops being singular.

     -thomas


    -thomas

-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland




More information about the R-help mailing list