Marco Visser
2007-Jun-29 20:14 UTC
[R] Dominant eigenvector displayed as third (Marco Visser)
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. 0 0 0 0 0 5 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 Please copy & paste the following into R; a=c(0,0,0,0,0,5,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0) mat=matrix(a, ncol=6,byrow=T) eigen(mat) The matrix is a population matrix for a plant pathogen (Powell et al 2005). Basically I would really like to know why this happens so I will know if it can occur again. Thanks for any comments, Marco Visser Comment: In Matlab the the dominant eigenvetor and eigenvalue of the described matrix are given as the sixth. Again no idea why. reference J. A. Powell, I. Slapnicar and W. van der Werf. Epidemic spread of a lesion-forming plant pathogen - analysis of a mechanistic model with infinite age structure. (2005) Linear Algebra and its Applications 298. p 117-140. ____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. [[alternative HTML version deleted]]
Spencer Graves
2007-Jun-29 21:03 UTC
[R] Dominant eigenvector displayed as third (Marco Visser)
There is no dominant eigenvalue: The eigenvalues of that matrix are the 6 different roots of 5. All have modulus (or absolute value) = 1.307660. When I raised them all to the 6th power, all 6 were 5+0i. Someone else can tell us why this is, but this should suffice as an initial answer to your question. Hope this helps. Spencer Graves 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. > > 0 0 0 0 0 5 > 1 0 0 0 0 0 > 0 1 0 0 0 0 > 0 0 1 0 0 0 > 0 0 0 1 0 0 > 0 0 0 0 1 0 > > Please copy & paste the following into R; > > a=c(0,0,0,0,0,5,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0) > mat=matrix(a, ncol=6,byrow=T) > eigen(mat) > > The matrix is a population matrix for a plant pathogen (Powell et al 2005). > > Basically I would really like to know why this happens so I will know if it can occur > again. > > Thanks for any comments, > > Marco Visser > > > Comment: In Matlab the the dominant eigenvetor and eigenvalue > of the described matrix are given as the sixth. Again no idea why. > > reference > > J. A. Powell, I. Slapnicar and W. van der Werf. Epidemic spread of a lesion-forming > plant pathogen - analysis of a mechanistic model with infinite age structure. (2005) > Linear Algebra and its Applications 298. p 117-140. > > > > > > ____________________________________________________________________________________Ready for the edge of your seat? > Check out tonight's top picks on Yahoo! TV. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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 > and provide commented, minimal, self-contained, reproducible code. >
Peter Dalgaard
2007-Jun-29 21:09 UTC
[R] Dominant eigenvector displayed as third (Marco Visser)
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. > > 0 0 0 0 0 5 > 1 0 0 0 0 0 > 0 1 0 0 0 0 > 0 0 1 0 0 0 > 0 0 0 1 0 0 > 0 0 0 0 1 0 > > Please copy & paste the following into R; > > a=c(0,0,0,0,0,5,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0) > mat=matrix(a, ncol=6,byrow=T) > eigen(mat) > > The matrix is a population matrix for a plant pathogen (Powell et al 2005). > > Basically I would really like to know why this happens so I will know if it can occur > again. > > Thanks for any comments, > > Marco Visser > > > Comment: In Matlab the the dominant eigenvetor and eigenvalue > of the described matrix are given as the sixth. Again no idea why. >???? I get > eigen(mat)$values [1] -0.65383+1.132467i -0.65383-1.132467i 0.65383+1.132467i 0.65383-1.132467i [5] -1.30766+0.000000i 1.30766+0.000000i > Mod(eigen(mat)$values) [1] 1.307660 1.307660 1.307660 1.307660 1.307660 1.307660 So all the eigenvalues are equal in modulus. What makes you think one of them is "dominant"?
(Ted Harding)
2007-Jun-29 21:47 UTC
[R] Dominant eigenvector displayed as third (Marco Visser)
On 29-Jun-07 21:09:37, Peter Dalgaard wrote:> Marco Visser wrote: >> 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. >> >> 0 0 0 0 0 5 >> 1 0 0 0 0 0 >> 0 1 0 0 0 0 >> 0 0 1 0 0 0 >> 0 0 0 1 0 0 >> 0 0 0 0 1 0 >>[...] >> Comment: In Matlab the the dominant eigenvetor and eigenvalue >> of the described matrix are given as the sixth. Again no idea why. >> > ???? > > I get > > > eigen(mat)$values > [1] -0.65383+1.132467i -0.65383-1.132467i 0.65383+1.132467i > 0.65383-1.132467i > [5] -1.30766+0.000000i 1.30766+0.000000i > > Mod(eigen(mat)$values) > [1] 1.307660 1.307660 1.307660 1.307660 1.307660 1.307660 > > So all the eigenvalues are equal in modulus. What makes you think > one of them is "dominant"?When I run it I get eigenvectors 3 and 6 both purely real. It may be that Marco has confused this with "dominant". Also, the eigenvalues of these two are real, and have the largest real parts (+/- 1.3076605). All others have complex eigenvalues, of which the real parts are +/- 0.6538302. It may be that Marco has been misled by this, perceiving the real part rather than both real and complex parts, and being led to think that the largest real part corresponds to the largest eigenvalue. As has been clearly pointed out, this is not the way to look at it! Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 29-Jun-07 Time: 22:47:01 ------------------------------ XFMail ------------------------------
Ben Bolker
2007-Jun-29 21:49 UTC
[R] Dominant eigenvector displayed as third (Marco Visser)
>> 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