qselection: Selecting variables for several subset sizes
Description
Function that enables to obtain the best variables for more than one size of subset. Returns a table with the chosen covariates to be introduced into the models and their information criteria.
Usage
qselection(x, y, qvector, criterion = "deviance", method = "lm",
family = "gaussian")
Arguments
x
A data frame containing all the covariates.
y
A vector with the response values.
qvector
A vector with more than one variable-subset size to be selected.
criterion
The cross-validation-based information criterion to be used. Default is the deviance. Other functions provided are the coefficient of determination ("R2") and residual variance ("variance").
method
A character string specifying which regression method is used, i.e., linear models ("lm"), generalized additive models ("glm") or generalized additive models ("gam").
family
This is a family object specifying the distribution and link to use in fitting: "gaussian", "binomial" or "poisson".
Value
qA vector of subset sizes.
criterionA vector of Information criterion values.