search for: colorsex

Displaying 1 result from an estimated 1 matches for "colorsex".

Did you mean: colorseq
2012 Nov 27
1
interactions in GAMs
...it's possible to include a double interaction in a GAM formula. Example: If I do this: mod=gam(energy~s(size, *by=color, by=sex*, k=5) + temperature, ...) I get the interaction betwen size*color and size*sex. But I need size*color*sex, being size a smoother. I've created a new variable (colorsex) which combines all the level of both color (2 levels) and sex (2 level), so that I have a new variable with 4 level. In this case I can do: mod=gam(energy~s(size, *by=colorsex*, k=5) + temperature, ...) What do you think of this approach? In this case, should I also include colorsex (or color*s...