Description Usage Arguments Value Note Author(s) References Examples
Function estimates Variance Inflation Factors (VIFs), measures of collinearity in a linear model. The VIF provides a measure of how much the variance of an estimated regression coefficient is increased because of collinearity. Collinearity is present when there is a high correlation between the independent, predictor, variables in a model, i.e. they tell the same ‘story’. Where collinearity exists it is often best to remove predictor variables with high VIFs from the model.
1 |
object |
a |
... |
any additional parameters. |
A (structure) table of Variable Inflation Factors for the predictor variables.
VIFs >5 are indicative of collinearity, and the information conveyed in that variable is also in the subset of the remaining variables.
W.N. Venables,function shared on S-News, October 21, 2002
http://www.biostat.wustl.edu/archives/html/s-news/2001-10/msg00164.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Make test data available
data(sind)
attach(sind)
## Model 1
sind.1 <- lm(log(Zn) ~ Fe + log(Mn) + log(Cu) + log(Cd))
summary(sind.1)
gx.lm.vif(sind.1)
## Model 2
sind.2 <- lm(log(Zn) ~ Fe + log(Mn))
summary(sind.2)
gx.lm.vif(sind.2)
AIC(sind.1, sind.2)
## Model 3
sind.3 <- lm(log(Zn) ~ log(Mn) + log(Cu))
summary(sind.3)
gx.lm.vif(sind.3)
AIC(sind.1, sind.2, sind.3)
## Clean-up and detach test data
rm(sind.1)
rm(sind.2)
rm(sind.3)
detach(sind)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.