Description Usage Arguments Value Author(s) References See Also Examples
Computes confidence intervals for the l1-norm of groups of linear regression coefficients in a hierarchical clustering tree.
1 2 3 4 5 |
x |
numeric design matrix of the regression n * p with p columns for p predictor variables and n rows corresponding to n observations. |
y |
numeric response variable of length n. |
method |
a |
dist |
a distance matrix can be specified on which the
hierarchical clustering will be based (see |
alpha |
numeric level in (0, 1) at which the test / confidence intervals are to be constructed. |
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 n > 50, then |
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 |
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 |
Nicolai Meinshausen
Meinshausen, N. (2015); JRSS B, see groupBound
.
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.
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 | ## 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.