[R] Discriminant Function Analysis

From: michael watson (IAH-C) <michael.watson_at_bbsrc.ac.uk>
Date: Wed 06 Jul 2005 - 00:29:28 EST

Dear All

This is more of a statistics question than a question about help for R, so forgive me.

I am using lda from the MASS package to perform linear discriminant function analysis. I have 14 cases belonging to two groups and have measured each of 37 variables. I want to find those variables that best discriminate between the two groups, and I want to visualise that and create a classification function. Please note at this stage it is a proof of concept problem - I realise that I must follow this up with a much more robust anaylsis involving cross-validation.

  1. First problem, I got this error message:
    > z <- lda(C0GRP_NA ~ ., dpi30)
    Warning message: variables are collinear in: lda.default(x, grouping, ...)

I guess this is not a good thing, however, I *did* get a result and it discriminated perfectly between my groups. Can anyone explain what this means? Does it invalidate my results?

2) My analysis came up with one discriminant variable. How do I control how many are produced? I currently assume this is the only significant discriminant variable found. Can I insist it finds more?

3) More of a tip - when my analysis only finds one significant variable, what is a good way to visualise this graphically?

4) Can I work out from the coefficients which sub groups of my variable are better at discriminating than others? I guess I could simply perform a t-test first to select the best variables...?

5) How do I turn my discriminant function into a classification function? i.e. when I plot the scores for the groups I can see graphically that all the values for one group are below 0.1 and all the values for the other group are above 1. But how do I turn my discriminant function into a classification function?

Many thanks in advance for your help


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 Wed Jul 06 00:32:37 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:16 EST