fullProcess: Full process of MLGL

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/fullProcess.R

Description

Run hierarchical clustering following by a group-lasso on all the different partition and a hierarchical testing procedure. Only for linear regression problem.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
fullProcess(
  X,
  y,
  control = c("FWER", "FDR"),
  alpha = 0.05,
  test = partialFtest,
  hc = NULL,
  fractionSampleMLGL = 1/2,
  BHclust = 50,
  nCore = NULL,
  addRoot = FALSE,
  Shaffer = FALSE,
  ...
)

fullProcess.formula(
  formula,
  data,
  control = c("FWER", "FDR"),
  alpha = 0.05,
  test = partialFtest,
  hc = NULL,
  fractionSampleMLGL = 1/2,
  BHclust = 50,
  nCore = NULL,
  addRoot = FALSE,
  Shaffer = FALSE,
  ...
)

Arguments

X

matrix of size n*p

y

vector of size n.

control

either "FDR" or "FWER"

alpha

control level for testing procedure

test

test used in the testing procedure. Default is partialFtest

hc

output of hclust function. If not provided, hclust is run with ward.D2 method. User can also provide the desired method: "single", "complete", "average", "mcquitty", "ward.D", "ward.D2", "centroid", "median".

fractionSampleMLGL

a real between 0 and 1: the fraction of individuals to use in the sample for MLGL (see Details).

BHclust

number of replicates for computing the distance matrix for the hierarchical clustering tree

nCore

number of cores used for distance computation. Use all cores by default.

addRoot

If TRUE, add a common root containing all the groups

Shaffer

If TRUE, a Shaffer correction is performed (only if control = "FWER")

...

Others parameters for MLGL

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula)

Details

Divide the n individuals in two samples. Then the three following steps are done: 1) Bootstrap Hierarchical Clustering of the variables of X 2) MLGL on the second sample of individuals 3) Hierarchical testing procedure on the first sample of individuals.

Value

a list containing:

res

output of MLGL function

lambdaOpt

lambda values maximizing the number of rejects

var

A vector containing the index of selected variables for the first lambdaOpt value

group

A vector containing the values index of selected groups for the first lambdaOpt value

selectedGroups

Selected groups for the first lambdaOpt value

reject

Selected groups for all lambda values

alpha

Control level

test

Test used in the testing procedure

control

"FDR" or "FWER"

time

Elapsed time

Author(s)

Quentin Grimonprez

See Also

MLGL, hierarchicalFDR, hierarchicalFWER, selFDR, selFWER

Examples

1
2
3
4
5
# least square loss
set.seed(42)
X <- simuBlockGaussian(50, 12, 5, 0.7)
y <- X[, c(2, 7, 12)] %*% c(2, 2, -2) + rnorm(50, 0, 0.5)
res <- fullProcess(X, y)

MLGL documentation built on Nov. 28, 2020, 5:07 p.m.