vifx: Compute Variance inflation factor

Description Usage Arguments Details Value Examples

View source: R/vifx.R

Description

Calculate variance inflation factors (VIF) for all numeric variables contained in data set

Usage

1
vifx(x)

Arguments

x

name of data frame for which the VIFs should be computed

Details

The function reads in the object named in x, builds a linear model for each of the contained variables in the data set, regressing the selected variable on all other numeric variables contained in the data set.

The multiple R-squared is computed and transformed to VIF using following formula: VIF_i=\frac{1}{1-R_i^2}

Value

A named vector with names given by the contained numeric variables and values by the computed respective VIFs

Examples

1

preputils documentation built on July 1, 2020, 5:35 p.m.

Related to vifx in preputils...