Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

In R, the eigen() returns descending sorted eigenvalues. However, the eigenvectors do not correspond to these sorted eigenvalues. How do I identify the eigenvector corresponding to the ith sorted eigenvalue?

One approach might be to sort by the norm of the eigenvectors (is there a procedure in R that can do this). I imagine there is a simple method I am missing.

share|improve this question
2  
"However, the eigenvectors do not correspond to these sorted eigenvalues" yes it does. "One approach might be to sort by the norm of the eigenvectors" hard, given that eigenvectors are normed – user603 Aug 23 '11 at 6:34
The following webpage suggested the vectors from eigen() were not sorted: tolstoy.newcastle.edu.au/R/help/03a/3713.html – Quant Guy Aug 23 '11 at 13:52

1 Answer

up vote 4 down vote accepted

Look at the end of the eigen function:

...    
ord <- sort.list(Mod(z$values), decreasing = TRUE)
}
list(values = z$values[ord], vectors = if (!only.values) z$vectors[, 
      ord, drop = FALSE])}

That means both values and vectors are sorted by ord. So why eigenvectors ordering is not corresponding to the eigenvalues ordering?

share|improve this answer
It is also crucial to me since I use this for the extraction of static factors. – Dmitrij Celov Aug 23 '11 at 7:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.