clusterGroupBound {hdi} | R Documentation |
Hierarchical structure group tests in linear model
Description
Computes confidence intervals for the l1-norm of groups of linear regression coefficients in a hierarchical clustering tree.
Usage
clusterGroupBound(x, y, method = "average",
dist = as.dist(1 - abs(cor(x))), alpha = 0.05,
eps = 0.1, hcloutput, nsplit = 11,
s = min(10, ncol(x) - 1),
silent = FALSE, setseed = TRUE, lpSolve = TRUE)
Arguments
x |
numeric design matrix of the regression |
y |
numeric response variable of length |
method |
a |
dist |
a distance matrix can be specified on which the
hierarchical clustering will be based (see |
alpha |
numeric level in |
eps |
a level of eps*alpha is used and the values of different splits are aggregated using the (1-eps) quantile. See reference below for more details. |
hcloutput |
optionally, the value of a |
nsplit |
the number of data splits used. |
s |
the dimensionality of the projection that is used. Lower
values lead to faster computation and if |
silent |
logical enabling progress output. |
setseed |
a logical; if this is true (recommended), then the same random seeds are used for all groups, which makes the confidence intervals simultaneously valid over all groups of variables tested. |
lpSolve |
logical; only set it to false if |
Value
Returns a list with components
groupNumber |
The index of the group tested in the original hierarchical clustering tree |
members |
A list containing the variables that belong into each testes group |
noMembers |
A vector containing the number of members in each group |
lowerBound |
The lower bound on the l1-norm in each group |
position |
The position on the x-axis of each group (used for plotting) |
leftChild |
Gives the index of the group that corresponds to the left child node in the tested tree (negative values correspond to leaf nodes) |
rightChild |
Same as |
isLeaf |
Logical vector. Is |
Author(s)
Nicolai Meinshausen
References
Meinshausen, N. (2015); JRSS B, see groupBound
.
See Also
Use groupBound
to compute the lower bound for selected
groups of variables whereas you use this clusterGroupBound
to
test all groups in a hierarchical clustering tree.
Examples
## Create a regression problem with correlated design (n = 10, p = 3):
## a block of size 2 and a block of size 1, within-block correlation is 0.99
set.seed(29)
p <- 3
n <- 10
Sigma <- diag(p)
Sigma[1,2] <- Sigma[2,1] <- 0.99
x <- matrix(rnorm(n * p), nrow = n) %*% chol(Sigma)
## Create response with active variable 1
beta <- rep(0, p)
beta[1] <- 5
y <- as.numeric(x %*% beta + rnorm(n))
out <- clusterGroupBound(x, y, nsplit = 4) ## use larger value for nsplit!
## Plot and print the hierarchical group-test
plot(out)
print(out)
out$members
out$lowerBound