Home > Enterprise >  In a GLM with interactive effects, what is the difference between ":" and "*"?
In a GLM with interactive effects, what is the difference between ":" and "*"?

Time:12-01

If I'm trying to check interactive effects between factors in a linear model, what is the difference between M1 <- glm(Capture ~ Season * Habitat , data=d) and M1 <- glm(Capture ~ Season : Habitat , data=d)?

I would like to check wether Captures are influenced by Season or Habitat or an interaction between both. What is the correct way of indicating an interaction between them in a linear model? Do I use ":" or "*" between facors?

CodePudding user response:

* includes the interaction and the individual terms, whereas : includes just the interaction, ie a * b is short for a a:b b.

The correct way depends on whether or not you want the individual terms. From what i hear, in linear models, you often do. Also "check whether Captures are influenced by Season or Habitat or an interaction between both" looks like a job for *.

  •  Tags:  
  • rglm
  • Related