vif: Variance Inflation Factor of a data frame

View source: R/vif.R

vifR Documentation

Variance Inflation Factor of a data frame

Description

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.

Usage

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.

See Also

auto_vif(), auto_cor()

Examples

if(interactive()){

 data(plant_richness_df)

 vif(plant_richness_df[, 5:21])

}

spatialRF documentation built on Aug. 19, 2022, 5:23 p.m.

Related to vif in spatialRF...