
Last chance! 50% off unlimited learning
Sale ends in
Computes the variance inflation factor (VIF). The VIF is a measure of how much the variance of a regression coefficient is increased due to collinearity.
vif(model)# S3 method for default
vif(model)
# S3 method for lm
vif(model)
# S3 method for lmerMod
vif(model)
It returns a data.frame
with three columns: the name of the
model term, the VIF value and its classification (see "Details").
An object containing a model.
As a rule of thumb for the interpretation of the VIF value, a VIF less than 5 indicates a low correlation of a given model term with the others, a VIF between 5 and 10 indicates a moderate correlation and a VIF greater than 10 indicates a high correlation.
James, G., Witten, D., Hastie, T., & Tibshirani, R. (eds.). (2013). An introduction to statistical learning: with applications in R. New York: Springer.
m <- lm(disp ~ mpg + cyl + mpg:cyl, mtcars)
vif(m)
Run the code above in your browser using DataLab