vif: Variance inflation factor

Description Usage Arguments Details Value References Examples

View source: R/vif.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
vif(model)

## Default S3 method:
vif(model)

## S3 method for class 'lm'
vif(model)

## S3 method for class 'lmerMod'
vif(model)

Arguments

model

An object containing a model.

Details

VIF interpretation

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.

Value

It returns a data.frame with three columns: the name of the model term, the VIF value and its classification (see "Details").

References

Examples

1
2
m <- lm(disp ~ mpg + cyl + mpg:cyl, mtcars)
vif(m)

lvmisc documentation built on April 5, 2021, 5:06 p.m.