[R] linear discriminant analysis in MASS
Alain Paquette
alain.paquette at umontreal.ca
Tue Feb 21 00:21:56 CET 2006
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!)
--
Alain Paquette
Laboratoire d'écologie végétale
Institut de recherche en biologie végétale
Université de Montréal
4101 rue Sherbrooke Est
Montréal (Québec) H1X 2B2
alain.paquette at umontreal.ca
labo (514) 872-8488
fax (514) 872-9406
http://www.irbv.umontreal.ca/francais/personnel/cogliastro-paquette.htm
More information about the R-help
mailing list