[R] lda of MASS library
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Apr 2 08:16:46 CEST 2003
On Tue, 1 Apr 2003, array chip wrote:
> it seems that the lda function in MASS library doesn't give out the
> constant for the linear discriminant function under the situation that
> we don't use standardized variable, anyone knows how to obtain the
> constant in order to construct the linear discriminant function?
There is no constant in the LDF as defined by Fisher.
> I understand that if the priors are set to be 1/2, the threshold of the
> discriminant score used to separate the 2 classes is 0, how about if the
> priors are not 1/2 vs. 1/2, e.g. like 1/3 vs. 2/3, in this situation,
> how to determine a threshold of the discriminant score to separate the 2
> classes? Is there a simple formula existing? I understand posterior
> probabilities are usually used for classification, but I would like to
> know if I want to use discriminant scores, how can I do it?
The formulae are in MASS (the book), but this is not then an LDF.
For two classes (not the only case!) you take the log odds of the
posterior probabilities.
May I suggest you try to understand the theory behind the lda() function?
--
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