Skip to content
Prev 86876 / 398502 Next

linear discriminant analysis in MASS

Hello R people

I now know how to run my discriminant analysis with the lda function in 
MASS:
lda.alain=lda(Groupes ~ Ht.D0 + Lc.Dc + Ram + IDF, gr, CV = FALSE)
and it works fine.

But I am missing a test and cannot find any help on how to get it, if it 
exist.

The "S" equivalent:
discrim(structure(.Data = Groupes ~ Ht.D0 + Lc.Dc + Ram + IDF, class = 
"formula"), data = gr, family = Canonical(cov.structure = 
"homoscedastic"), na.action = na.omit, prior = "proportional")
outputs a nice matrix of Mahalanobis distances between groups and even 
tests (Hotelling's T Squared) for significant distances.

Why don't I just take the "S" output you say?  Because like you, I'd 
rather put in my paper that I did it using R of course!
Does anyone know of a way to get this test out of lda?  Or of another R 
package that does it?

Thanks
Alain
(on peut me r??pondre en fran??ais aussi, ??videmment!)