*! version 1.0.0 01apr2014
help gvselect

Title

gvselect -- Best subsets variable selection

Syntax

gvselect <term> varlist, nmodels(#): est_cmd

est_cmd may be an estimation command that stores the e(ll) result.

Instances of <term> (with the angle brackets) that occur
within est_cmd are replaced in est_cmd by subsets of varlist to
determine the best subsets of varlist for estimating the model of interest.

Description

gvselect performs best subsets variable selection. The Furnival-Wilson
(1974) leaps-and-bounds algorithm is applied using the log likelihoods of
candidate models, allowing variable selection to be performed on a wide family
of normal and non-normal regression models. This method is described in
Lawless and Singhal (1978).

The log likelihood, Akaike's information criterion, and the Bayesian information
criterion are reported for the best regressions at each predictor quantity.

Options

nmodels(#) Report the best # models for each quantity of predictors.

Examples

Setup

. sysuse auto

Linear regression variable selection

. gvselect <term> weight trunk length, nmodels(2): regress mpg <term> i.foreign

Setup

. use dvisits

Poisson regression variable selection

. gvselect <term> sex age agesq income levyplus freepoor freerepa illness actdays hscore chcond1 chcond2: poisson docvis <term>

Stored results

When nmodels() < 2, gvselect saves the following in r():

Macros

r(bestk) variable list of predictors from best k predictor model

.

.

.

r(best1) variable list of predictors from best 1 predictor model

Matrices

r(info) contains the information criteria for the best models

When m = nmodels() > 1, gvselect saves the following in r():

Macros

r(bestk1) variable list of predictors from best k predictor model

.

.

.

r(best11) variable list of predictors from best 1 predictor model

.

.

.

r(bestkm) variable list of predictors from mth best k predictor model

.

.

.

r(best1m) variable list of predictors from mth best 1 predictor 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

References

Furnival, G. M., and R. W. Wilson. 1974. Regression by leaps and bounds. Technometrics. 16: 499-511.

Lawless, J. F., and K. Singhal. 1978. Efficient screening of nonnormal
regression models. Biometrics 34: 318-327.