Hello R-Cracks, 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. My dataset contains variables of the classes factor and numeric. Is there another function that is able to handle this? Thank you all in advance. Greetings Birgit 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 175jahre.uzh.ch
On 2008-02-06, Birgit Lemcke <birgit.lemcke at systbot.uzh.ch> 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.> 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. HTH, Tyler