vifx | R Documentation |
Function to compute the variance inflation factor (VIF) for a multiple linear regression model.
vifx(mod = mod)
mod |
an object containing the fitted MLR model by using
the |
The resulting out is a dataframe having the VIF for each of the predictor variables.
This function creates a LaTeX file having the main fitting statistics of a linear regression model.
Christian Salas-Eljatib.
Salas-Eljatib, C. 2021. Análisis de datos con el programa estadístico R: una introducción aplicada. Ediciones Universidad Mayor, Santiago, Chile. 170 p. https://eljatib.com/rlibro
##Two fitted models
mod1 <- stats::lm(mpg ~ cyl+disp + hp + wt + drat, data = mtcars)
mod2 <- stats::lm(mpg ~ disp + hp + wt + drat, data = mtcars)
##The VIF values for each regression model
vifx(mod=mod1)
vifx(mod=mod2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.