Description Usage Arguments Value Author(s) References Examples
vif
selects variables for a linear model. It returns a subset of variables for building a linear model.
1 |
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 |
mode |
|
A list containing:
select |
the chosen subset of variable. |
modelmatrix |
the model matrix that is ready for fitting a linear model. |
Dongyu Lin dongyu.lin@gmail.com
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.
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);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.