[R] Discriminant function analysis

Birgit Lemcke birgit.lemcke at systbot.uzh.ch
Thu Feb 7 17:51:10 CET 2008


Thank you all for your good advices and codes.
I know really that I have huge deficits in statistics knowledge and I  
am really working on it, but its not done in five minutes.

Anyway thank you very match for your help.

Greets

Birgit

Am 07.02.2008 um 17:34 schrieb Gavin Simpson:

> On Thu, 2008-02-07 at 11:16 -0400, tyler wrote:
>> On Thu, Feb 07, 2008 at 02:36:58PM +0000, Gavin Simpson wrote:
>>>
>>> But I'm not sure this matters much. If you use the formula  
>>> interface to
>>> lda(), factors get expanded to the dummy variables Tyler is talking
>>> about. But of course, a factor with two levels 0/1 doesn't need much
>>> manipulation as you only need a single dummy variable to  
>>> represent its
>>> two states:
>>>
>>
>> Thanks, Gavin!
>>
>> R's formula interface if very powerful, and I'm just starting to
>> understand how to take full advantage of it.
>>
>>> You might want to standardise your exp variables to zero mean and  
>>> unit
>>> variance prior to doing the lda so that all variables carry the same
>>> weight, if you have mixtures of numeric (continuous) variables and
>>> binary ones.
>>
>> This is the part I was unsure of. If you have a categorical
>> explanatory variable with five levels, you can turn it into four  
>> dummy
>> variables, which you then standardize. Does the original variable end
>> up getting four times the weight of a single numerical variable?
>
> I have no idea Tyler. I would take great heed in the warning about  
> using
> only continuous variables in lda() - the author(s) of that function
> certainly know what they are talking about! One is probably violating
> some of the underlying assumptions of the method using
> binary/categorical data.
>
> There are better classification tools available than LDA for mixed  
> data
> like this, such as a classification tree, which is easy to interpret
> (always good for ecologists ;-) or some of the bagging, boosting or
> random forest algorithms also spring to mind. There has been quite  
> a lot
> on these techniques in the ecological literature in the past 3-4  
> years.
>
> HTH
>
> G
>
>>
>> Cheers,
>>
>> Tyler
>>
> -- 
> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
>  Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
>  ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
>  Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
>  Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
>  UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting- 
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

Birgit Lemcke
Institut für Systematische Botanik
Zollikerstrasse 107
CH-8008 Zürich
Switzerland
Ph: +41 (0)44 634 8351
birgit.lemcke at systbot.uzh.ch

175 Jahre UZH
«staunen.erleben.begreifen. Naturwissenschaft zum Anfassen.»
MNF-Jubiläumsevent für gross und klein.
19. April 2008, 10.00 Uhr bis 02.00 Uhr
Campus Irchel, Winterthurerstrasse 190, 8057 Zürich
Weitere Informationen www.175jahre.uzh.ch



More information about the R-help mailing list