Skip to content

Discriminant Analysis - Obtaining Classification Functions

2 messages · Pavel Kúr, Emmanuel Charpentier

#
Hello!

I need some help with the linear discriminant analysis in R.
I have some plant samples (divided into several groups) on which I
measured a few quantitative characteristics. Now, I need to infer some
classification rules usable for identifying new samples.
I have used the function lda from the MASS library in a usual fashion:

lda.1 <- lda(groups~char1+char2+char3, data=xxx)

I'd like to obtain the classification functions for the particular
groups, with the aid of which I could classify unknown samples. I know
I can use predict.lda to classify such samples, but I need to obtain
some equations into which I could simply put the measured values of an
unknown sample manually and the result would predict which group the
sample most probably belongs to (like in eg. STATISTICA).
I haven't found out how to extract these functions from the lda output.
Could somebody give me some advice?

Thank you in advance,

Pavel Kur
#
reauire(MASS) ; ?predict.lda should enlighten you. Glancing at V&R4
might be a bit more illuminating...

HTH

					Emmanuel Charpentier

Le vendredi 03 avril 2009 ? 22:29 +0200, Pavel K?r a ?crit :