如何在列表中指定OLS回归结果F-statsistic和R-squared?例如:
ols('x ~ a + b + c', data).fit()
ols_model.summary()
OLS Regression Results
Dep. Variable: x R-squared: 0.901
Model: OLS Adj. R-squared: 0.799
Method: Least Squares F-statistic: 598.1
Date: Thu, 08 jan 2013 Prob (F-statistic): 0.01
Time: 09:07:22 Log-Likelihood: 280.00
No. Observations: 110 AIC: -910.0
Df Residuals: 250 BIC: -910.1
Df Model: 3
Covariance Type: robust
我可以将输出存储在像这样的变量
中x = model.rsquared
x
0,901
但是以下代码没有任何结果:
df['x'] = x
type(x)
给出numpy.float64
btw。
希望有人可以帮忙!感谢。