Re: [R] eigenvalue ordering

From: Alberto Monteiro <albmont_at_centroin.com.br>
Date: Mon 26 Feb 2007 - 19:33:31 GMT

Peter Dalgaard wrote:
>
>>> Is it possible to get unordered eigenvalues and eigenvectors of a
>>> symmetric matrix in R?
>>
>> Yes, see help("eigen").
>
> Er, where do you see anything about (un)order? As far as I know,
> there's no "natural" ordering of eigenvalues and eigenvalue
> algorithms generally find them in either increasing or decreasing
> order (or closest to specified value).
>
"eigen" orders the values. From help("eigen"):

  values: a vector containing the p eigenvalues of 'x', sorted in

          _decreasing_ order, according to 'Mod(values)' in the
          asymmetric case when they might be complex (even for real
          matrices).  For real asymmetric matrices the vector will be
          complex only if complex conjugate pairs of eigenvalues are
          detected. 

So, if you are strict about getting unordered eigenvalues, you must shuffle them :-)

Alberto Monteiro



R-help@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. Received on Tue Feb 27 06:41:21 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 26 Feb 2007 - 20:30:36 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.