[R] linear discriminant analysis in MASS

From: Alain Paquette <alain.paquette_at_umontreal.ca>
Date: Tue 21 Feb 2006 - 10:21:56 EST

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?

(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
labo (514) 872-8488
fax (514) 872-9406

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Feb 21 10:49:07 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:38 EST