TitleBest fit model selection

bfit regressdepvarindepvars[if] [in] [,corder(#)sort(bic|aic)options]

bfit logitdepvarindepvars[if] [in] [,corder(#)sort(bic|aic)options]

bfit poissondepvarindepvars[if] [in] [,corder(#)sort(bic|aic)options]

optionsDescription -------------------------------------------------------------------------quantiles(numlist) estimate specified quantiles

vce(vcetype [,vceoptions])vcetypemay bebootstrap,analytic, ornone.analyticis the default whenquantiles()is not specified.bootstrapis the default whenquantiles()is specified.vceoptionsvary overvcetypeand are discussed below.INCLUDE help shortdes-coeflegend -------------------------------------------------------------------------

gpsvarsandcvarsmay contain time-series operators; see fvvarlist.

bfitsubcmdsorts a set of fitted candidate regression models by an information criterion, puts the best-fitting model inereturn, and displays a table showing the ranking of the models fitted. The Bayesian information criterion (BIC) is the default and the Akaike information criterion (AIC) may optionally be specified as the ranking criterion.

bfitsubcmdsorts a set of fitted candidate regression models bybfitregressfits the candidate linear-regression models by ordinary least squares.bfit mlogitfits the candidate mulitinomial-logit models by maximum likelihood.bfit poissonfits the candidate poisson regression models by maximum likelihood.

bfitsubcmdsorts a set of fitted candidate regression models by For eachsubcmd, the candidate models are a series of polynomials inindepvars. The smallest of the candidate models includes only the first variable specified inindepvars. The largest of the candidate models is a fully-interacted polynomial of the order specified incorder(). SeeMethods and formulasin !! for details on the set of candidate models.Cattaneo, Drukker, and Holland (2012) provides an introduction to this command.

corder(#)specifies the maximum order of the covariate polynomial. The default is 2 which specifies a fully-interacted second-order polynomial.

sort()specifies the information criterion by which the candidate models are to be sorted.sort(bic), the default, sorts the fitted candidate models by the Bayesian information criterion.sort(aic)sorts the fitted candidate models by the Akaike information criterion.

coptionsare passed to the estimation command. The allow options depend on the estimation command invoked by thesubcommand. For example,base()may be specified only the withlogitsubcommand. See regress, mlogit, and poisson for the allowable command options.

--------------------------------------------------------------------------- Setup

. use spmdataModel selection with logit

. bfit logit w pindex eindexModel selection with logit up to a third-order model

. bfit logit w pindex eindex, corder(3)Model selection with logit, and AIC selection

. bfit logit w pindex eindex, sort(aic)Model selection with regress

. bfit regress spmeasure pindex eindex

biftsaves the following inr():Macros

r(subcmd)regress,logit, orpoissonr(bmodel)Name of selected model inestimates storer(bvlist)Variables in selected modelr(sortby)bicoraicMatrices

e(S)Results for each model fitThe matrix

r(S)has 7 columns with the following model-specific information in each row: Column 1 contains the names of the model inestimates storeColumn 2 contains the number of observations in the sample Column 3 contains the value of the log-likelihood function for the constant-only model Column 4 contains the value of the log-likelihood function Column 5 contains the degrees of freedom in the model Column 6 contains the AIC Column 7 contains the BIC

ReferencesCattaneo, M. D., D. M. Drukker, and A. Holland. 2012. Estimation of multivalued treatment effects under conditional independence. Working paper, University of Michigan, Department of Economics, http://www-personal.umich.edu/~cattaneo/papers/Cattaneo-Drukker-Holla > nd_2012_STATA.pdf.

AuthorsMatias D. Cattaneo, University of Michigan, Ann Arbor, MI. cattaneo@umich.edu.

David M. Drukker, StataCorp, College Station, TX. ddrukker@stata.com.

Ashley D. Holland, Grace College, Winona Lake, IN. hollana@grace.edu.