Computes the variance inflation factor (VIF) of the colums in a data frame. Warning: variables in preference.order not in colnames(x), and non-numeric columns are removed silently from x and preference.order. The same happens with rows having NA values (na.omit() is applied). The function issues a warning if zero-variance columns are found.

vif(x)

Arguments

x

Data frame with numeric columns, typically containing a set of model predictors.

Value

A data frame with two columns having the name of the variables in 'x' and their respective VIF values.

Examples

if(interactive()){

 data(plant_richness_df)

 vif(plant_richness_df[, 5:21])

}