Skip to content

eigen vector sign reversal

5 messages · Karim Elsawy, Roger D. Peng, Martin Maechler +2 more

#
I've just installed R 1.7.1 under linux red hat
I noticed sign reversal of eigen vectors ,some of them not all, upon
using diag function relative to those obtained using R 1.4.1
this is gonna miss up lots of my previous scripts
I wonder if there is a way to avoid this.
best regards
karim
#
I think at version 1.7.0 R started using LAPACK for its eigen/svd 
routines.  I think using `eigen(x, EISPACK = TRUE)' uses the previous 
version.

-roger
Karim Elsawy wrote:

            
#
Roger> I think at version 1.7.0 R started using LAPACK for
    Roger> its eigen/svd routines.  I think using `eigen(x,
    Roger> EISPACK = TRUE)' uses the previous version.

Yes (2 x).

But it the eigen vectors *are* determined only upto
multiplication with +/- 1.
So I think Karim should consider improving the R scripts that 
have been dependent on particular signs of the eigen vectors.
Roger> Karim Elsawy wrote:
>> I've just installed R 1.7.1 under linux red hat I noticed
    >> sign reversal of eigen vectors ,some of them not all,
    >> upon using diag function relative to those obtained using
    >> R 1.4.1 this is gonna miss up lots of my previous scripts
    >> I wonder if there is a way to avoid this.  best regards
    >> karim

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
#
On Tue, 15 Jul 2003, Roger D. Peng wrote:

            
Yes, but as the sign of eigenvectors is not well-defined it may be better
to fix the scripts so that they don't care.

	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle
1 day later
#
On Tue, 15 Jul 2003, Roger D. Peng wrote:

            
That is true, but using different compilers on the same machine and the 
same version of R may give different signs for the eigenvectors.  The 
moral is, don't rely on the signs of eigenvectors!  (This *is* on the help 
page.)