[R] The eigen function

From: Louisell, Paul T. <paul.louisell_at_pw.utc.com>
Date: Tue 26 Apr 2005 - 06:25:36 EST


I'm using R version 2.0.1 on a Windows 2000 operating system. Here is some actual code I executed:

> test

     [,1] [,2]
[1,] 1000 500
[2,] 500 250
> eigen(test, symmetric=T)$values

[1] 1.250000e+03 -3.153033e-15
> eigen(test, symmetric=T)$values[2] >= 0
[1] FALSE
> eigen(test, symmetric=T, only.values=T)$values
[1] 1250 0
> eigen(test, symmetric=T, only.values=T)$values[2] >= 0
[1] TRUE I'm wondering why the 'eigen' function is returning different values depending on whether the parameter only.values=T. This is probably some numerical quirk of the code; it must do things differently when it has to compute eigenvectors than it does when only computing eigenvalues. It's easily checked that the exact eigenvalues are 1250 and 0. Can one of the developers tell me whether this should be regarded as a bug or not?

Thanks,

Paul Louisell
Pratt & Whitney
Statistician
TechNet: 435-5417
e-mail: paul.louisell@pw.utc.com



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 Received on Tue Apr 26 06:31:36 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:26 EST