varStep: Variable selection

Description Usage Arguments Value See Also Examples

View source: R/varSel.R

Description

Add a variable, drop a variable, or select a subset of variables via variable selection that are optimal for multivariate analysis.

Usage

1
2
3
4
5
6
varAdd1(x, group, vin=NULL, scope=1:ncol(x), k=0)

varDrop1(x, group, vin=1:ncol(x), k=0)

varStep(x, group, scope, k, kf=k/2, direction=c("both",
   "forward","backward"))

Arguments

x

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

group

a grouping indicator of observations.

vin

which variables (i.e., columns of x) already in model. It defines the initial model.

scope

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

k

entry/stay value in backward stepwise.

kf

entry/stay value in forward stepwise.

direction

forward selection, backward elimination or both stepwise.

Value

which variable to add (add1), which variable to drop (drop1), or a subset of variables in the final model (step).

See Also

varSelect

Examples

1
2
3
4
data(etrait)
varAdd1(traits, group=mdat[,42], vin=10, scope=1:ncol(traits))
varStep(traits, group=mdat[,42], k=12, scope=1:ncol(traits),
   direction="back")

Example output

R/qtlmt is loaded

[1] 5
[1]  2 16

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

Related to varStep in qtlmt...