variableSelection: SNPs selection

Description Usage Arguments Value Author(s)

View source: R/SNPselection.R

Description

This function selects the most relevant variables according to a response.

Usage

1
2
3
4
5
6
7
8
9
variableSelection(
  dataMatrix,
  dataResponse,
  nbFolds = min(length(dataResponse), 10),
  loss = c("logistic", "linear"),
  plot = TRUE,
  pkg = c("HDPenReg", "spikeslab"),
  ...
)

Arguments

dataMatrix

Matrix containing the data, each row is a different sample.

dataResponse

response associated to the data.

nbFolds

number of folds in the cross validation.

loss

either "logistic" (binary response) or "linear" (quantitative response).

plot

If TRUE plot cross-validation mean squared error (default=TRUE).

pkg

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.

Value

a list containing

variable

A vector containing the index of all selected variables.

coefficient

A vector containing the coefficients of all selected variables.

intercept

Intercept of the model.

Author(s)

Quentin Grimonprez


MPAgenomics documentation built on March 30, 2021, 5:13 p.m.