------------------------------------------------------------------------------- help forallpossible-------------------------------------------------------------------------------

All possible models with subsets of predictors

allpossiblemodelcmddepvarvarlist[ifexp] [inrange] [weight] , {eclass(statistics_list)|rclass(progname statistics_list)} [detailnpmax(#)format(format)cellwidth(#)modelcmd_options]

Description

allpossibleby default (1) computes all possible models fitted bymodelcmdto responsedepvarand subsets of up to 6 predictors fromvarlistand (2) tabulates various summary statistics for each model fitted. Alternatively, (1') the maximum number of predictors fitted may be specified as a number less than 6 by thenpmax()option.

modelcmdmust be a command fitting a model to a single response variable. At least one ofeclass()orrclass()must be specified.eclass()must include one or more names of e-class results, as would be displayed byestimates listafter fitting an individual model.rclass()must include the name of a program that would execute without arguments after a model command and one or more names of r-class results it produces.

RemarksThe number of models fitted must not exceed the number of observations.

The upper limit of 6 is not a matter of principle. The limit may be changed in a future version.

Naturally, this command does not purport to replace the detailed scrutiny of individual models or to offer an unproblematic way of finding "best" models. Its main use may lie in demonstrating that several models exist within many projects possessing roughly equal merit as measured by omnibus statistics.

Options

eclass()specifies one or more model statistics to be tabulated. Statistics displayed byestimates listase(result) should be specified asresult. See the manual entry for whatever ismodelcmd.

rclass()specifies the name of a program that would execute without arguments after a model command and one or more names of r-class results it produces. For example, users may write an r-class program to pick up e-class results aftermodelcmdand compute from them one or more statistics not included in the e-class results. Statistics left behind afterprognameasr(result) should be specified asresult.

detailspecifies that the results ofmodelcmdbe echoed for each individual model. This may produce a large amount of output.

npmax()specifies the maximum number of predictors to be fitted.

format()andcellwidth()are options of tabdisp. The default values areformat(%4.3f) cellwidth(12).

modelcmd_optionsare other options ofmodelcmd.

Examples. gen gpm = 1 / mpg . allpossible regress gpm head-disp, eclass(rmse r2_a)

. allpossible glm mpg weight-displacement, rclass(glmcorr rmse rho jrho) link(power -1)

AuthorNicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk

AcknowledgementsThis program draws upon the rsquare program by Philip B. Ender and Rie von Eyben, UCLA.

Also seeOn-line: help for estimates, return, rsquare (if installed), glmcorr (if installed)