vif: Fitting Linear Models using VIF-Regression

Description Usage Arguments Value Author(s) References Examples

Description

vif selects variables for a linear model. It returns a subset of variables for building a linear model.

Usage

1
	vif(y, x, w0 = 0.05, dw = 0.05, subsize = 200, trace = TRUE, mode = c("dense", "sparse"))

Arguments

y

the response.

x

an optional data frame or matrix containing the variables in the model.

w0

the initial wealth.

dw

the incremental wealth attained if a variable is included in the model.

subsize

the size of the subsample to approximate the variance inflation factor.

trace

logical. if TRUE a list containing current wealth, current test level, absolute t value and p-value for the current variable will be printed out.

mode

"dense" or "sparse", specifying one of the two alpha-investings that should be used. Default is "sparse".

Value

A list containing:

select

the chosen subset of variable.

modelmatrix

the model matrix that is ready for fitting a linear model.

Author(s)

Dongyu Lin dongyu.lin@gmail.com

References

Dongyu Lin, Dean P. Foster, and Lyle H. Ungar. (2011). VIF-Regression: A Fast Regression Algorithm for Large Data. Journal of the American Statistical Association, Vol. 106, No. 493: 232–247. http://gosset.wharton.upenn.edu/~foster/research/vif_jasa_final.pdf

The data sets used in the paper can be downloaded via following links:

Boston Housing Data: http://gosset.wharton.upenn.edu/~foster/auction/boston.csv

Bankruptcy Data: http://gosset.wharton.upenn.edu/~foster/auction/bankruptcy.csv

Call Center Data: http://gosset.wharton.upenn.edu/~foster/auction/calldata.tar.gz

Many others: http://gosset.wharton.upenn.edu/~foster/auction/auction.html.

Examples

1
2
3
4
5
6
7
8
	data(syn);
	vif.sel <- vif(syn$y, syn$x, trace = FALSE);
	vif.sel$select;
	syn$true;
	
	data(housingexp);
	colnames(housingexp$x);
	vif.sel <- vif(housingexp$y, housingexp$x, w0 = 0.0005, dw = 0.005, subsize = 300, trace = FALSE);

VIF documentation built on May 2, 2019, 8:35 a.m.

Related to vif in VIF...