scoremods: Score best subsets by information criteria

Description Usage Arguments Value Author(s) References See Also Examples

Description

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.

Usage

1
scoremods(y, X, nboot, nfold=length(y), names=NULL)

Arguments

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 X. If NULL, names(X) is used.

Value

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).

Author(s)

Philip Reiss phil.reiss@nyumc.org and Lei Huang huangracer@gmail.com

References

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

See Also

bestmods; leaps (in the package of the same name)

Examples

1
## see example for bestmods

reams documentation built on May 2, 2019, 2:23 p.m.