Nongluck Klibbua reports: > -----Original Message-----
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Nongluck > Klibbua > Sent: Tuesday, 29 August 2006 11:12 AM > To: R-help@stat.math.ethz.ch > Subject: [R] singular matrix > > Dear R-users, > I try to use "solve" to get the solution of this matrix.But it has error > happen below. > How I can solve this problem. > [1] "a" > [,1] > [1,] 0.8109437 > [2,] 5.7569740 > [1] "b" > [,1] [,2] > [1,] 0.3141293 2.230037 > [2,] 2.2300367 15.831264 > > Error in solve.default(b, a) : system is computationally singular: > reciprocal condition number = 1.37415e-018 The irony seems to be that if you quote them to only this number of digits then the system is no longer quite singular enough for the problem to appear, at least on Windows R 2.3.1: > a [,1] [1,] 0.8109437 [2,] 5.7569740 > b [,1] [,2] [1,] 0.3141293 2.230037 [2,] 2.2300367 15.831264 > solve(b, a) [,1] [1,] 2.5831242104 [2,] -0.0002203103 > b %*% solve(b, a) - a ### check [,1] [1,] -1.110223e-16 [2,] -8.881784e-16 In general, though, in dealing with singular systems you might want to look at the function ginv in the MASS library. ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.