qselection(x, y, qvector, criterion = "deviance", method = "lm", family = "gaussian", nfolds = 5, cluster = TRUE, ncores = NULL)
"R2"
), the residual
variance ("variance"
), the Akaike information criterion ("aic"
),
AIC with a correction for finite sample sizes ("aicc"
)
and the Bayesian information criterion ("bic"
). The deviance,
coefficient of determination and variance are calculated by cross-validation."lm"
), generalized additive models
("glm"
) or generalized additive models ("gam"
)."gaussian"
), ("binomial"
) or
("poisson"
).deviance
, R2
or variance
criterion.TRUE
(default), the
procedure is parallelized. Note that there are cases without enough
repetitions (e.g., a low number of initial variables) that R will gain in
performance through serial computation. R takes time to distribute tasks
across the processors also it will need time for binding them all together
later on. Therefore, if the time for distributing and gathering pieces
together is greater than the time need for single-thread computing, it does
not worth parallelize.NULL
(default), the number of cores to be used
is equal to the number of cores of the machine - 1.selection
plot.qselection
.
library(FWDselect)
data(diabetes)
x = diabetes[ ,2:11]
y = diabetes[ ,1]
obj2 = qselection(x, y, qvector = c(1:9), method = "lm", criterion = "variance", cluster = FALSE)
obj2
Run the code above in your browser using DataLab