vif_plot | R Documentation |
Plots the variance inflations factors (VIF) for a linear model.
vif_plot(x)
x |
an object of class |
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.
a ggplot2 graph
Fox, J. and Monette, G. (1992) Generalized collinearity diagnostics. JASA, 87, 178–183.
vif
mtcars$am <- factor(mtcars$am) fit <- lm(mpg ~ wt + am + disp + hp, mtcars) vif_plot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.