Description Usage Arguments Value Author(s) References Examples
Given an outcome vector and model matrix, this function finds the submodel(s) minimizing the Akaike (1973, 1974) information criterion (AIC), a corrected version thereof (Sugiura, 1978; Hurvich and Tsai, 1989), and the Bayesian information criterion (BIC; Schwarz, 1978).
1 |
y |
outcome vector |
X |
model matrix. This should not include an intercept column; such a column is added by the function. |
pvec |
vector of possible dimensions of the model to consider: by default, ranges from 1 (intercept only) to |
A list with components
nlogsig2hat |
value of the first (non-penalty) term of the criterion, i.e., sample size times log of MLE of the variance, for best model of each dimension in |
aic |
lowest AIC for models of each dimension. |
aicc |
lowest corrected AIC for models of each dimension. |
bic |
lowest BIC for models of each dimension. |
best.aic, best.aicc, best.bic |
vectors of logicals indicating which columns of the model matrix are included in the model minimizing AIC, corrected AIC, or BIC. |
Philip Reiss phil.reiss@nyumc.org and Lei Huang huangracer@gmail.com
Akaike, H. (1973). Information theory and an extension of the maximum likelihood principle. In Second International Symposium on Information Theory (eds. B. N. Petrov and F. Csaki), pp. 267–281. Budapest: Akademiai Kiado.
Akaike, H. (1974). A new look at the statistical model identification. IEEE Transactions on Automatic Control, 19, 716–723.
Hurvich, C. M., and Tsai, C.-L. (1989). Regression and time series model selection in small samples. Biometrika, 76, 297–307.
Schwarz, G. (1978). Estimating the dimension of a model. Annals of Statistics, 6, 461–464.
Sugiura, N. (1978). Further analysis of the data by Akaike's information criterion and the finite corrections. Communications in Statistics: Theory & Methods, 7, 13–26.
1 2 3 |
Loading required package: leaps
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-20. For overview type 'help("mgcv-package")'.
$nlogsig2hat
[1] 236.3452 209.0421 196.1834 185.2882 179.8606 178.6913
$aic
[1] 238.3452 213.0421 202.1834 193.2882 189.8606 190.6913
$aicc
[1] 287.6180 262.6002 252.1358 243.7516 240.9606 242.5631
$bic
[1] 240.1954 216.7424 207.7339 200.6888 199.1114 201.7922
$best.aic
1 2 3 4 5
TRUE FALSE TRUE TRUE TRUE
$best.aicc
1 2 3 4 5
TRUE FALSE TRUE TRUE TRUE
$best.bic
1 2 3 4 5
TRUE FALSE TRUE TRUE TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.