[R] lda: how to get the eigenvalues

Christoph Lehmann christoph.lehmann at gmx.ch
Tue Jun 3 14:23:13 CEST 2003


let's compare lda and discrimin (ade4) using the iris data:


with lda I get:
> lda1 <- lda(iris[,1:4],iris[,5])
> lda1$svd
[1] 48.642644  4.579983

with discrimin:
> discrimin1 <- discrimin(dudi.pca(iris[,1:4],scan=F),iris[,5],scan=F)
> discrimin1
eigen values: 0.9699 0.222


so where and how is the relationship?

thanks

christoph



On Tue, 2003-06-03 at 13:01, Prof Brian Ripley wrote:
> On Tue, 3 Jun 2003, Stephane Dray wrote:
> 
> > >On Tue, 3 Jun 2003, Christoph Lehmann wrote:
> > >
> > >>  How can I get the eigenvalues out of an lda analysis?
> > >
> > >It uses singular values not eigenvalues: see ?lda for a description of the
> > >output, and the print method for one way to use them.
> > 
> > the function discrimin ofthe ade4 package performs discriminat 
> > analysis with eigen and so produces eigenvalues ($eig)
> 
> For those for whom squaring is too difficult, that is.
> Why recommend software using an inferior algorithm to avoid squaring?
-- 
Christoph Lehmann <christoph.lehmann at gmx.ch>




More information about the R-help mailing list