cvic(y, X, nfold = length(y), pvec = 1:(ncol(X) + 1))
ncol(X) + 1
(full model).pvec
.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
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.
leaps
in package leaps for best-subset selection; pcls
in package mgcv for the constrained monotone smoothing.
# Predicting fertility from provincial socioeconomic indicators
data(swiss)
cvicobj <- cvic(swiss$Fertility, swiss[ , -1])
cvicobj$best
cvicobj$best.mon
Run the code above in your browser using DataLab