varSelect: Variable selection

Description Usage Arguments Value See Also Examples

View source: R/varSel.R

Description

Select a specific number of variables via variable selection that are optimal for multivariate analysis.

Usage

1
varSelect(x, group, scope, nv, direction=c("backward","forward"))

Arguments

x

a data matrix/frame. Columns are variables to select from.

group

a grouping indicator of observations.

scope

which variables (i.e., columns of x) to select from.

nv

how many variables to be selected.

direction

forward selection or backward elimination.

Value

variables selected in the model.

See Also

varGroup and varStep

Examples

1
2
3
4
5
data(etrait)
g55<- varGroup(traits, mdat, zscope=55, method="best")
idx<- sample(1:nrow(traits), replace=FALSE)
varSelect(traits[idx,], group=mdat[,55], scope=1:ncol(traits[idx,]),
   nv=length(g55[[1]]))

Example output

R/qtlmt is loaded

[1]  3  5 14 15

qtlmt documentation built on May 2, 2019, 2:23 p.m.

Related to varSelect in qtlmt...