Skip to content

possible bug in det using method="qr" (PR#1244)

4 messages · Armin Roehrl, Peter Dalgaard

#
Full_Name: Armin Roehrl
Version: 1.4.0(2001-12-19)
OS: Linux; Suse 7.3
Submission from: (NULL) (217.84.18.204)


Hello,

On a given matrix det returns different results whether
I use the method "qr" or "eivenvalues".

The matrix:
[,1]         [,2]        [,3]
[1,] 9.822616e+09 3.841723e+09    79790.09
[2,] 3.841723e+09 1.502536e+09    31251.82
[3,] 7.979009e+04 3.125182e+04 64156419.36
[1] -9.331893e+19
[1] 9.331893e+19

I think the result based on the eigenvalues is correct.

Good night.
	Armin

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
armin@approximity.com writes:
That format is a bit awkward to key back in. Could you do a dput(m2)
so that it becomes easier for us to reproduce the effect?

  
    
#
Good morning,
structure(c(9822616000, 3841723000, 79790.09, 3841723000, 1502536000, 
31251.82, 79790.09, 31251.82, 64156419.36), .Dim = c(3, 3))
[1] -9.331893e+19
[1] 9.331893e+19

I hope it's not just some numerical accuracy thing and therefore
wasting your time.

Thx,
	Armin
On Saturday 05 January 2002 03:10, Peter Dalgaard BSA wrote:

  
    
#
Armin Roehrl <armin@approximity.com> writes:
It's a numerical accuracy thing, but not a waste of time. The issue
is that qr() thinks that the matrix is singular:
[1] -9.331893e+19
[1] 9.331893e+19

Two issues here: 
(a) if qr() thinks a matrix is singular, I think det() should take the
consequences and return zero.
(b) Perhaps there ought to be a way to pass the tol= argument to det.