set.seed(123)
n <- 80
p <- 90
# x with correlated columns
corMat <- toeplitz((p:1/p)^3)
corMatQ <- chol(corMat)
x <- matrix(rnorm(n * p), nrow = n) %*% corMatQ
colnames(x) <- paste0("x", 1:p)
# y
y <- x[, c(3, 5, 73)] %*% c(2, 5, 3) + rnorm(n)
# clustering
hc <- hclust(dist(t(x)))
# HIT (run time > 5 sec)
out <- hit(x, y, hc)
summary(out)Run the code above in your browser using DataLab