Chase Grimm
Chase Grimm

Reputation: 425

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. I usually use the carpackage, but I am presently not able to use external packages for R.

Is there a way to calculate vif in base R? And if there is how am I to go about calculating it?

Upvotes: 0

Views: 545

Answers (1)

Ben Bolker
Ben Bolker

Reputation: 226362

Just copy the source code of car:::vif.default into your own source code. 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.

Upvotes: 3

Related Questions