I need to compute generalized eigenvalues. The eigen function in base doesn't do it and I can't find a package that does. As I understand it, Lapack __can__ computer them (http://www.netlib.org/lapack/lawn41/node111.html) and R can use Lapack. If there is no function already, can I access Lapack from R and use those routines directly? Thank you, Joshua Gilbert.
If you mean singular values, look at svd(). Otherwise you may need to explain; a "generalized eigenvector" does have an honest eigenvalue attached to it, so I'm guessing you mean something else. Reid Huntsinger -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Joshua Gilbert Sent: Thursday, June 16, 2005 2:45 PM To: r-help at stat.math.ethz.ch Subject: [R] Computing generalized eigenvalues I need to compute generalized eigenvalues. The eigen function in base doesn't do it and I can't find a package that does. As I understand it, Lapack __can__ computer them (http://www.netlib.org/lapack/lawn41/node111.html) and R can use Lapack. If there is no function already, can I access Lapack from R and use those routines directly? Thank you, Joshua Gilbert. ______________________________________________ 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
On Thu, 16 Jun 2005, Joshua Gilbert wrote:> I need to compute generalized eigenvalues. The eigen function in base > doesn't do it and I can't find a package that does.They are very rarely used in statistics, so this is not surprising. I presume you mean solving Ax = lambda B x: if B is non-singular this reduces to a conventional eigenproblem for B^{-1}A.> As I understand it, Lapack __can__ computer them > (http://www.netlib.org/lapack/lawn41/node111.html) and R can use > Lapack. If there is no function already, can I access Lapack from R > and use those routines directly?Yes, you can: for real matrices the requisite routines are already compiled into R. See DGGES or DGGEV. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595