python - Difference between the interaction : and * term for formulas in StatsModels OLS regression -


hi i'm learning statsmodel , can't figure out difference between : , * (interaction terms) formulas in statsmodels ols regression. please give me hint figure out?

thank you!

the documentation: http://statsmodels.sourceforge.net/devel/example_formulas.html

":" give regression without level itself. interaction have mentioned.

"*" give regression with level + interaction have mentioned.

for example a. glmmodel = glm("y ~ a: b" , data = df) you'll have 1 independent variable results of "a" multiply "b"

b. glmmodel = glm("y ~ * b" , data = df) you'll have 3 independent variables results of "a" multiply "b" + "a" + "b" itself


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -