[R] LDA once again
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sun May 25 09:38:14 CEST 2003
Do read the reference: MASS (the book), *and* the code. Your question is
addressed in the primary reference for the function, with references to
the original papers.
On Sun, 25 May 2003, Edoardo M Airoldi wrote:
> i have one more question about LDA. just to make surei understand,
> suppose we have two classes, then if i specify a prior=c(.3,.7) in
> lda(...) this will affect my between classes covariance matrix as in:
>
> SB = (.3*m1 - .7*m2) %*% inv(Sigma) %*% t(.3*m1 - .7*m2)
>
> [is Sigma affected ?] and the threshold to decide which class to assign
> 'test' data = log(.3/.7)
Sigma is undefined! That symbol is normally used to indicate the
*population* within-class covariance matrix. But no, you do not seem to
understand, so please consult your local statistical experts (since you
seem inexplicably loath to read our book).
Overview for well-informed readers: the `Fisher' view of LDA has no
priors: the Rao and Bryan views do, and they differ. In practice it only
matters if LDA is used when the within-class covariances are not common
but the conventional theory assumes the model is correct.
--
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