vifx {preputils}R Documentation

Compute Variance inflation factor

Description

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

Usage

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

    vifx(iris)

[Package preputils version 1.0.3 Index]