[R] interactions in GAMs

chirleu villegas at iim.csic.es
Tue Nov 27 18:23:31 CET 2012


Thanks Simon, for your quick reply.

Now I have a different but related problem.

Including by=colorsex I'm testing significant effects of each level of this
variable.  It's like doing a second level interaction (size*color*sex).  But
I think I'm omiting the first level interaction, i.e., size*sex for example.

Looking at my data, it seems that the response variable (let's say energy
content) relates to size in a different way for males and females. If I
include just s(size, by=sex) I pick this effect (very significant). If I
also include (separately) s(size, by=color), no differences. So, differences
between sexes, but not between colours.
Now I do s(size, by=sexcolor) and I get no significant differences among the
4 levels. But I guess I'm loosing information, I mean, now there is no way
of detecting differences  in the relationship energy-size related
exclusively to sex.

Should I do s(size, by=sexcolor)+s(size, by=sex) + s(size, by=color) ?

It seems like an ugly model...

Any suggestion?

Thanks





--
View this message in context: http://r.789695.n4.nabble.com/interactions-in-GAMs-tp4650987p4650995.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list