[R] lda

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat May 14 11:34:12 CEST 2005


On Sat, 14 May 2005, K. Steinmann wrote:

> if I am right a discriminant analysis can be done with "lda".
> My questions are:

> 1. What method to discriminate the groups is used by "lda" (Fisher's linar
> discriminant function, diagonal linear discriminant analysis, likelihood ratio
> discriminant rule, ...)?

None of those, but that due to Rao, which is (up to details of weighting 
of the covariance matrix) what is very widely called LDA.  (Many people 
attribute to Fisher something he did not do, at least not in the paper 
they cite.)

lda() (in package MASS, uncredited) is support software for a book, so 
please refer to the book for the details: it is in the references for the 
help page.

> 2. How can I see, which method is used? (Typing just lda does not give me any
> code).

I get
> lda
function (x, ...)
UseMethod("lda")
<environment: namespace:MASS>

which _is _code.  Please look up `generic functions' for example in `An 
Introduction to R'.  In this case

getS3method("lda", "default")

will show you the guts of the code, but I don't think you will be able to 
understand it without the references.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list