vif_plot: Variance Inflation Plot

View source: R/vif_plot.R

vif_plotR Documentation

Variance Inflation Plot

Description

Plots the variance inflations factors (VIF) for a linear model.

Usage

vif_plot(x)

Arguments

x

an object of class "lm".

Details

This function plots results from the vif function from the car package. VIFs larger than 5 are highlighted.

If all terms in an unweighted linear model have 1 df, then the usual variance-inflation factors are calculated. If any terms in an unweighted linear model have more than 1 df, then generalized variance-inflation factors (Fox and Monette, 1992) are calculated.

Value

a ggplot2 graph

References

Fox, J. and Monette, G. (1992) Generalized collinearity diagnostics. JASA, 87, 178–183.

See Also

vif

Examples

mtcars$am <- factor(mtcars$am)
fit <- lm(mpg ~ wt + am + disp + hp, mtcars)
vif_plot(fit)

Rkabacoff/qacReg documentation built on Aug. 1, 2022, 11:11 p.m.