Say you're fitting a generalized linear model where the response variable is weight and there are several factors: height, sex, vegetarian, country where the person lives, etc. Now say you expect there to be an interaction between height and country. Does the way you account for this in the model depend on how many levels there are for the country factor? For instance, if you only took measurements for people from three different countries, would you account for it as an interaction term, whereas if you took measurements for people from 30 different countries, you'd account for it as a random intercept?
Asked
Active
Viewed 25 times
1
-
Check https://stats.stackexchange.com/a/137837/35989 – Tim Apr 03 '23 at 18:09