VIF | R Documentation |
Calculates variance inflation factors for all indicated variables appearing in data frame.
VIF(data, vars = names(data), returnModels = F)
data |
Data frame containing covariates of interest for multiple regression or multivariate regression-based analysis. |
vars |
Character vector listing names of covariates in 'data' for which variance inflation factors are desired. Default is all columns in 'data'. |
returnModels |
If 'TRUE' model objects regressing each variable against all other variables in 'vars' are returned in list form. If 'FALSE' (default), only VIF values are returned. |
If returnModels == TRUE, a list whose first element ('vif') is a vector of length = length(vars) containing variance inflation factors (VIF = 1 / (1 - R^2)), and second element is a list of length = length(vars) with lm model objects as elements. If returnModels == FALSE, only VIFs are returned as numeric vector.
Quresh S. Latif
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.