简体   繁体   English

在基R中查找参数的VIF

[英]Finding the VIF of parameters in base R

I'm doing some multivariate linear modeling currently and need to find the variance inflation factor (vif) for each of my parameters. 我目前正在做一些多元线性建模,需要为我的每个参数找到方差膨胀因子(vif)。 I usually use the car package, but I am presently not able to use external packages for R. 我通常使用car包装,但目前无法将外部包装用于R。

Is there a way to calculate vif in base R? 有没有一种方法可以计算基数R中的vif? And if there is how am I to go about calculating it? 如果有我该如何计算呢?

Just copy the source code of car:::vif.default into your own source code. 只需将car:::vif.default的源代码复制到您自己的源代码中。 A quick glance suggests that the function doesn't contain any references to unexported car functions (which would have to be copied in addition), so it should just work as is. 快速浏览一下,该函数不包含对未导出的car函数的任何引用(必须另外复制),因此它应该照常工作。

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

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