[R] glm model syntax

Doran, Harold HDoran at air.org
Fri May 16 17:43:32 CEST 2008


N+M gives only the main effects, N:M gives only the interaction, and G*M gives the main effects and the interaction. 

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Birgit Lemcke
> Sent: Friday, May 16, 2008 11:27 AM
> To: R Hilfe
> Subject: [R] glm model syntax
> 
> 
> Hello R users!
> 
> What is the difference between
> 
> glm(A~N+M)
> glm(A~N:M)
> glm(A~N*M)
> 
> Thanks in advance.
> 
> 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 http://www.175jahre.uzh.ch/naturwissenschaft
> 
> ______________________________________________
> 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.
> 



More information about the R-help mailing list