This function selects the most relevant variables according to a response.
variableSelection(
dataMatrix,
dataResponse,
nbFolds = min(length(dataResponse), 10),
loss = c("logistic", "linear"),
plot = TRUE,
pkg = c("HDPenReg", "spikeslab"),
...
)
Matrix containing the data, each row is a different sample.
response associated to the data.
number of folds in the cross validation.
either "logistic" (binary response) or "linear" (quantitative response).
If TRUE plot cross-validation mean squared error (default=TRUE).
Either "HDPenReg" or "spikeslab". Ued package in linear case.
spplementary arguments for cv.glmnet function in case of logistic loss or for HDlars or spikeslab function for linear loss.
a list containing
A vector containing the index of all selected variables.
A vector containing the coefficients of all selected variables.
Intercept of the model.