[R] matrix inverstion

Ben Bolker bbolker at gmail.com
Mon Mar 28 22:50:06 CEST 2011


Daniel Nordlund <djnordlund <at> frontier.com> writes:


> > On Behalf Of Rosario Garcia Gil

> > I have this matrix which I am trying to invert. I get a message about
> > reciprocal condition number, what that does mean?

 [snip]
> 
> Well, it means exactly what the message says.  Within the precision of your
computer, the matrix is singular
> and has no inverse.  If you try the following code you will see that column 1
is perfectly correlated with the
> remaining columns.
> 
> summary(lm(XT_X [,1] ~ XT_X[,-1]))
> 

  Depending on what you're trying to do, you might try the
generalized inverse in the MASS package (MASS::ginv).



More information about the R-help mailing list