Re: [R] Singularity problem

From: Allan Engelhardt <allane_at_cybaea.com>
Date: Wed, 16 Mar 2011 16:25:33 +0000

Numeric underflow. Try qr.solve(a)

Allan

On 16/03/11 15:28, Feng Li wrote:
> Dear R,
>
> If I have remembered correctly, a square matrix is singular if and only if
> its determinant is zero. I am a bit confused by the following code error.
> Can someone give me a hint?
>
>> a<- matrix(c(1e20,1e2,1e3,1e3),2)
>> det(a)
> [1] 1e+23
>> solve(a)
> Error in solve.default(a) :
> system is computationally singular: reciprocal condition number = 1e-17
>
>
> Thanks in advance!
>
>
> Feng
>



R-help_at_r-project.org 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. Received on Wed 16 Mar 2011 - 16:52:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 16 Mar 2011 - 17:00:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive