Hi I\'m learning Statsmodel and can\'t figure out the difference between : and * (interaction terms) for formulas in StatsModels OLS regression. Could you please give me a hint
":" will give a regression without the level itself. just the interaction you have mentioned.
"*" will give a regression with the level itself + the interaction you have mentioned.
for example
a. GLMmodel = glm("y ~ a: b" , data = df)
you'll have only one independent variable which is the results of "a" multiply by "b"
b. GLMmodel = glm("y ~ a * b" , data = df)
you'll have 3 independent variables which is the results of "a" multiply by "b" + "a" itself + "b" itself