[R] highest eigenvalues of a matrix

baptiste Auguié ba208 at exeter.ac.uk
Wed Jun 18 22:56:05 CEST 2008

DeaR list,

I happily use eigen() to compute the eigenvalues and eigenvectors of  
a fairly large matrix (200x200, say), but it seems over-killed as its  
rank is limited to typically 2 or 3. I sort of remember being taught  
that numerical techniques can find iteratively decreasing eigenvalues  
and corresponding orthogonal eigenvectors, which would provide a nice  
alternative (once I have the first 3, say, I stop the search).

Looking at the R source code for eigen and some posts on this list,  
it seems that the function uses a LAPACK routine, but obviously all  
the options are not available through the R wrapper. I'm not  
experienced enough to try and make my own interface with Fortran  
code, so here are two questions:

- is this option (choosing a desired number of eigenvectors) already  
implemented in some function / package that I missed?

- is the "range of indices" option in DSYEVR.f < http:// 
www.netlib.org/lapack/double/dsyevr.f > what I think, the indices of  
the desired eigenvalues ordered from the highest to lowest?

Many thanks in advance for any piece of advice,



dummy example if needed:

test <- matrix(c(1, 2, 0, 4, 5, 6, 1.00001, 2, 0), ncol=3)


Baptiste Auguié

Physics Department
University of Exeter
Stocker Road,
Exeter, Devon,

Phone: +44 1392 264187


More information about the R-help mailing list