简体   繁体   English

常数项(截距)的高 VIF 表示什么?

[英]What does the high VIF for the constant term (intercept) indicate?

I am building a Linear regression model on a car dataset using RFE technique and statsmodels library.我正在使用 RFE 技术和 statsmodels 库在汽车数据集上构建线性回归模型。 My final model has p-value well within 5% and has high F-statistics.我的最终模型的 p 值在 5% 以内,并且 F 统计量很高。 VIF values for the predictor variables are well below 5 but for the constant term(intercept) VIF is 8.18.预测变量的 VIF 值远低于 5,但常数项(截距)的 VIF 值为 8.18。 I have used add_constant method to add constant to the model.我使用add_constant方法向模型添加常量。 Following are my doubts:以下是我的疑惑:

  1. What does High variance for the constant indicate ?常数的高方差表示什么?
  2. Should i ignore the constant term while calculating VIF?我应该在计算 VIF 时忽略常数项吗?

These are my results:这些是我的结果:

这是我最终模型的总结

模型的 VIF 结果

I am new to machine learning and also posting question on this site for the 1st time.我是机器学习的新手,也是第一次在这个网站上发布问题。 Kindly let me know if any more information is needed to answer my question.如果需要更多信息来回答我的问题,请告诉我。

statistical question are better asked on stats.stackexchange.统计问题最好在 stats.stackexchange 上提问。 However, I just went through this for statsmodels, eg https://github.com/statsmodels/statsmodels/issues/2376但是,我只是针对 statsmodels 进行了此操作,例如https://github.com/statsmodels/statsmodels/issues/2376

First, there is no multicollinearity problem in your model and data.首先,您的模型和数据不存在多重共线性问题。 p-values are low and confidence intervals are pretty narrow, so the parameters in the model should be a good estimates. p 值很低,置信区间很窄,所以模型中的参数应该是一个很好的估计。 A vif of 8 is not large. 8 的 vif 并不大。

A large vif in the constant indicates that the (slope) explanatory variables have also a large constant component.常数中较大的 vif 表明(斜率)解释变量也具有较大的常数分量。 An example would be when a variable has a large mean but only a small variance.一个例子是当一个变量具有很大的平均值但只有很小的方差时。 An example for perfect collinearity with the constant and rank deficiency of the design matrix is the dummy variable trap, when we did not remove one of the levels of a categorical variable in dummy encoding and the dummies sum to 1 and, therefore, replicate a constant.与设计矩阵的常数和秩不足的完美共线性的一个例子是虚拟变量陷阱,当我们没有删除虚拟编码中分类变量的一个级别并且虚拟变量总和为 1,因此,复制一个常数.

The purpose of including the constant in the vif computation is to discover this kind of problems with the design matrix exog provided by the user.在vif计算中包含常量的目的是发现用户提供的设计矩阵exog存在此类问题。 It would not show up if we compute vif on demeaned or standardized explanatory variables.如果我们在贬值或标准化的解释变量上计算 vif,它就不会出现。

There has been a long standing debate in statistics and econometrics about whether multicollinearity measures should include a constant or work only with demeaned explanatory variables.在统计和计量经济学中,关于多重共线性度量是否应该包括常数或仅使用贬值的解释变量存在长期争论。

I am currently preparing an extension to statsmodels that gives users the option to compute both versions, with and without constant.我目前正在准备 statsmodels 的扩展,让用户可以选择计算两个版本,有和没有常量。 In some cases reparameterization, demeaning and scaling, can improve numerical precision and prediction.在某些情况下,重新参数化、贬低和缩放可以提高数值精度和预测。 So we want to have measures that check the actual design matrix provided by users, but also check a standardized version of the data to see whether demeaning and scaling might improve numerical precision.因此,我们希望有一些措施来检查用户提供的实际设计矩阵,但也要检查数据的标准化版本,看看贬低和缩放是否可以提高数值精度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM