# Re: [R] Help with eigenvectors

From: Ben Bolker <bolker_at_ufl.edu>
Date: Tue, 08 Jul 2008 12:31:26 +0000 (UTC)

Francisco Javier Santos Alamillos <fsantos <at> ujaen.es> writes:

>
> Hi everybody,
>
> I have some problems with the function eigen. I have a square matrix and I
> want to calculate the eigenvalues and eigenvectors. I apply the function
> eigen and I get it, however when I solve the same problem in Statistica
> software, I realise that some eigenvectors are the opposite. How can I get
> the same values?
>
>

Multiply by -1 :-)
Seriously, though, the eigenvectors can be multiplied by any constant (if L.M = aL, then (cL).M = a(cL)). (They are usually scaled to have norm 1, i.e. L.L=1.) If you are trying to match something from a previous problem, you can check the sign of one particular variable and adjust the eigenvector appropriately.

Ben Bolker

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 Tue 08 Jul 2008 - 12:35:13 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 Tue 08 Jul 2008 - 13:31:10 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.