Re: [R] Discriminant function analysis

From: Birgit Lemcke <>
Date: Thu, 7 Feb 2008 12:04:29 +0100

Am 06.02.2008 um 21:00 schrieb Tyler Smith:

> On 2008-02-06, Birgit Lemcke <> wrote:
>> I am using R 2.6.1 on a PowerBook G4.
>> I would like to perform a discriminant function analysis. I found lda
>> in MASS but as far as I understood, is it only working with
>> explanatory variables of the class factor.
> I think you are mistaken. If you reread the help for lda() you'll see
> that the grouping has to be a factor, but the explanatory variables
> should be numeric.

oh yeah your completely right. It seems that I had some tomatoes on my eyes.
>> My dataset contains variables of the classes factor and numeric. Is
>> there another function that is able to handle this?
> The numeric variables are fine. The factor variables may have to be
> recoded into dummy binary variables, I'm not sure if lda() will deal
> with them properly otherwise.

But aren´t binary variables also factors? Or is there another variable class than factor or numeric?
Do I have have to set the classe of the binaries as numeric?

Thanks for your help

> HTH,
> Tyler
> ______________________________________________
> mailing list
> PLEASE do read the posting guide
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

Birgit Lemcke
Institut für Systematische Botanik
Zollikerstrasse 107
CH-8008 Zürich
Ph: +41 (0)44 634 8351

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 mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 07 Feb 2008 - 11:13:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 07 Feb 2008 - 14:00:13 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive