从回归模型获取Beta

时间:2018-06-19 16:23:56

标签: python linear-regression

我正在使用python从数据框计算线性回归。

我想知道如何只求方程的beta,以便返回初始数据框?

使用此功能,我可以获得Beta:

lm = smf.ols("np.log(Volume) ~ np.log(PrecoVenda)", data=df2).fit()

 print(lm.params)

Intercept             5.435106
np.log(PrecoVenda)    0.819627
dtype: float64

如何仅从方程式中选择beta?

0 个答案:

没有答案