import statsmodels.api as sm
x = sm.add_constant(x) # 添加截距项
modelDfs = sm.OLS(y, x)
result = modelDfs.fit()
result.summary()
2023-08-10 12:41:58
import statsmodels.api as sm
x = sm.add_constant(x) # 添加截距项
modelDfs = sm.OLS(y, x)
result = modelDfs.fit()
result.summary()