varGroups: Group variables

Description Usage Arguments Value Examples

Description

Group variables via variable selection such that the grouped variables are optimal for multivariate analysis.

Usage

1
2
varGroup(x, z, zscope=NULL, k=qf(0.95,1,nrow(x)-2), kf=k/2,
   method=c("pool","best"), direction=c("both","forward","backward"))

Arguments

x

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

z

a data matrix/frame. Columns are variables with elements 1 or not 1 (any others).

zscope

which variables in z to be used for grouping; all if "NULL".

k

entry/stay value in backward stepwise.

kf

entry/stay value in forward stepwise.

method

grouping method at each step: pool all the groups selected from each zcope variable, or choose the largest group (see examples).

direction

forward selection, backward elimination or both stepwise.

Value

indicators of grouped variables.

Examples

1
2
3
data(etrait)
varGroup(traits, mdat, zscope=c(42,55), method="pool")
varGroup(traits, mdat, zscope=c(42,55), method="best")

Example output

R/qtlmt is loaded

$group1
 [1]  1  2  3  7  8  9 11 12 14 15 16

$group2
[1]  4 10

$group3
[1] 6

$group4
[1] 13

$remainder
[1] 5

$group1
[1]  2  3  8 11 14 15 16

$group2
[1]  1  7  9 12

$group3
[1] 10

$group4
[1] 4

$group5
[1] 6

$group6
[1] 13

$remainder
[1] 5

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

Related to varGroups in qtlmt...