*! version 1.0 15 Apr 2019

Title

subsetByVIF -- Select a subset of covariates constrained by VIF

Syntax

subsetByVIF
[varlist]
[if]
[in]
[, options]

Main
viflist(numlist descending min=1) list of maximum variance inflation factors (VIFs) used to subset varlist

Description

subsetByVIF selects subsets of the covariates listed
in varlist such that each covariate
in a given subset has a VIF that is less than or equal
to a specified value given by viflist.

Options

Main

viflist(numlist descending min=1) specifies one or more maximum VIF values.
These values must be in descending order, and must be greater than one.
For each these maximum VIF values, the program identifies the largest
possible subset of covariates such that each covariate in this subset
has a VIF that is less than or equal to this maximum value.
The default maximum VIF is 10.

Remarks

We are frequently faced with analyzing data sets in which the ratio of
covariates to patients is high. There are several approaches to analyzing
such data including penalized regression methods, k-fold cross-validation
techniques, and bagging. A problem with any of these approaches is that, even
after the elimination of variables causing multi-collinearity,
the variance-covariance matrix of the remaining covariates is often
highly ill-conditioned. The subsetByVIF program reduces the number
of covariates to the largest subsample such that the maximum VIF for
each variable in the subsample is less than some value specified by
the user. These variables are selected without regard to the dependent
variable of interest, which should mitigate problems due to overfitting.
The use of this program should improve the convergence properties of
many methods of exploratory data analysis.

Examples

Setup

. webuse auto

subsetByVIF

. subsetByVIF price mpg weight length displacement gear_ratio foreign

. subsetByVIF price mpg weight length displacement gear_ratio foreign, viflist(15 5)

Stored results

Locals

r(n_vif) number of maximum VIF values specified

r(vifmax1) largest value of vifmax specified by the viflist option

r(n1) number of variables in the subset of covariates with VIFs <= vifmax1

r(covlist1) local macro consisting of the names of the variables in the subset of covariates with VIFs <= vifmax1

r(vifmax2) second largest value of vifmax specified by the viflist option

r(n2) number of variables in the subset of covariates with VIFs <= vifmax2

r(covlist2) local macro consisting of the names of the variables in the subset of covariates with VIFs <= vifmax2

.

.

.

Author

Dale Plummer

William D. Dupont

Department of Biostatistics

Vanderbilt University School of Medicine

Email william.dupont@vumc.org

Email dale.plummer@vumc.org

Also see

collin.ado: A contributed program by Philip B. Ender that calculates the VIF for each variable in a set of covariates.

Manual: [R] regress_postestimation

On-line: help for vif