Description Usage Arguments Value Author(s) References See Also Examples
This function uses the leaps package to find the best models of each size, and scores each according to AIC, corrected AIC, BIC, EIC and CVIC.
1 |
y |
outcome vector |
X |
model matrix. This should not include an intercept column; such a column is added by the function. |
nboot |
number of bootstrap samples or subsamples. |
nfold |
number of folds cross validation conduct. |
names |
vector of names for the columns of |
A matrix. The first ncol(X)
columns, essentially the which
component of an object outputted by leaps
, identify which predictors are in each of the best models. The remaining columns provide the AIC, corrected AIC, BIC, EIC, and CVIC for each model. The matrix has an
attribute "npred
" giving the number of candidate predictors, i.e.,
ncol(X)
.
Philip Reiss phil.reiss@nyumc.org and Lei Huang huangracer@gmail.com
Lumley, T., using Fortran code by A. Miller (2009). leaps: regression subset selection. R package version 2.9. http://CRAN.R-project.org/package=leaps
Reiss, P. T., Huang, L., Cavanaugh, J. E., and Roy, A. K. (2012). Resampling-based information criteria for adaptive linear model selection. Annals of the Institute of Statistical Mathematics, to appear. Available at http://works.bepress.com/phil_reiss/17
bestmods
; leaps
(in the package of the same name)
1 | ## see example for bestmods
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.