The code looks like:
import statsmodels.formula.api as smf
df = pd.read_csv('reg_data.csv')
f = 'inf ~ rh*temp*tl*Tt*C(location)'
lm = smf.ols(formula = f, data=df).fit()
But it always gives me an error:
numbers besides '0' and '1' are only allowed with **
The data in the file are all different numbers. Some have 2 decimals some have more.
Any idea to solve this problem and get regression summary? (by lm.summary()
)
Thank you in advance!