该命令用于线性模型的变量筛选,命令很强大!
需要自行安装。
具体介绍见下
vselect -- Linear regression variable selection
Description + Options + Examples +AuthorsSaved+ results
Syntax
vselect depvar indepvars [if] [in] [weight] [, fix(varlist) best backward forward r2adj aic aicc bic]
fweights, aweights, and pweights are allowed; see weight.
Description
vselect performs variable selection for linear regression. Through the use of the Furnival-Wilson leaps-and-bounds algorithm,
all-subsets variable selection is supported. This is done when the user specifies the best option. The stepwise methods, forward
selection and backward elimination, are also supported (by specifying forward or backward).
All-subsets variable selection provides the R^2 adjusted, Mallows's C, Akaike's information criterion, Akaike's corrected information
criterion, and Bayesian information criterion for the best regression at each quantity of predictors. For stepwise selection, the
user must tell vselect which information criterion to use.
The user may also specify a fixed predictor list in fix() that will be included in every model.
Options
fix(varlist) fixes these predictors in every regression.
best gives the best model for each quantity of predictors.
backward selects a model by backward elimination.
forward selects a model by forward selection.
r2adj uses R^2 adjusted information criterion in stepwise selection.
aic uses Akaike's information criterion in stepwise selection.
aicc uses Akaike's corrected information criterion in stepwise selection.
bic uses Bayesian information criterion in stepwise selection.
Examples
Saved results
vselect saves the following in r():
Macros
r(bestK) variable list of predictors from best K predictor model
r(besti) variable list of predictors from best i predictor model
r(best1) variable list of predictors from best 1 predictor model
r(predlist) variable list of predictors from the optimal model
Matrices
r(info) contains the information criteria for the best models
Authors
Charles Lindsey
StataCorp
College Station, TX
clindsey@stata.com
Simon Sheather
Department of Statistics
Texas A&M University
College Station, TX
Also see
Article: Stata Journal, volume 11, number 1: st0213_1,
Stata Journal, volume 10, number 4: st0213