[R] Dominant eigenvector displayed as third (Marco Visser)
Ben Bolker
bolker at zoo.ufl.edu
Fri Jun 29 23:49:43 CEST 2007
>
> Marco Visser wrote:
> > Dear R users & Experts,
> >
> > This is just a curiousity, I was wondering why the dominant
eigenvetor and
eigenvalue
> > of the following matrix is given as the third. I guess this could
complicate
automatic selection
> > procedures.
> >
> > Comment: In Matlab the the dominant eigenvetor and eigenvalue
> > of the described matrix are given as the sixth. Again no idea why.
> >
> ????
>
If you want the eigenvalue with the largest REAL PART to be first
(which will be "dominant" in the sense of population dynamics/stability)
then you can just reorder according to
order(-Re(eigen(mat)$values))
About MATLAB: my guess is that it, too, is ordering
according to modulus -- since the moduli are essentially
all the same, the order will be more or less random
across programs and platforms
(on my Linux machine I got the "dominant" (=largest real part)
eigenvector/value pair 6th, too).
Ben Bolker
More information about the R-help
mailing list