3
$\begingroup$

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.

$\endgroup$
2
  • 4
    $\begingroup$ "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 $\endgroup$
    – user603
    Commented Aug 23, 2011 at 6:34
  • $\begingroup$ The following webpage suggested the vectors from eigen() were not sorted: tolstoy.newcastle.edu.au/R/help/03a/3713.html $\endgroup$ Commented Aug 23, 2011 at 13:52

1 Answer 1

5
$\begingroup$

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?

$\endgroup$
1
  • 1
    $\begingroup$ It is also crucial to me since I use this for the extraction of static factors. $\endgroup$ Commented Aug 23, 2011 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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