[R] Discriminant Analysis - Obtaining Classification Functions

Emmanuel Charpentier charpent at bacbuc.dyndns.org
Fri Apr 3 23:24:15 CEST 2009


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 :
> 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
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 




More information about the R-help mailing list