0

I am trying to perform multiple linear regression using statsmodels while controlling for one variable but I am not sure how to control for a variable in python.

import statsmodels.formula.api as smf
results = smf.ols('y ~ Var1 + Var2', data=df).fit()

How can I control for Var2 on this example?

Uni 13
  • 95
  • 6

0 Answers0