[R] discriminant function analysis in R

From: Graham Jones <maillists_at_visiv.co.uk>
Date: Wed 30 Mar 2005 - 23:59:12 EST

In message <200503301005.j2UA3CBr019053@hypatia.math.ethz.ch>, r-help- request@stat.math.ethz.ch writes
>Dear R Users,
>
>I'm very very interested in learning how to use R to carry out a
>classification of data using discriminant function analysis. I've
>found the MASS package and the lda function, but the examples in the
>help system are a bit over my head. I'm not exactly sure how to
>interpret the output, for example, of if the inputs I've chosen are
>best suited to my needs.
[...]

I would recommend writing your own simple version of lda in R. For example, stick to two class problems, and don't worry too much about efficiency or dealing with bad input. Then think about how you might make your routines of more general use (but don't bother to implement this). This is a good way of learning R, and having got this far on your own, you will find the documentation and examples for lda make sense. Well, it worked for me.

Here's some useful functions:

?"%*%"
?t
?determinant
?solve
?mean
?cov
?cat
?scan

-- 
Graham Jones, author of SharpEye Music Reader
http://www.visiv.co.uk
21e Balnakeil, Durness, Lairg, Sutherland, IV27 4PT, Scotland, UK

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Mar 31 00:07:45 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:57 EST