# Simulation:
set.seed(123)
n <- 80
p <- 82
## x with correlated columns
corMat <- toeplitz((p:1/p)^5)
corMatQ <- chol(corMat)
x <- matrix(rnorm(n * p), nrow = n) %*% corMatQ
colnames(x) <- paste0("x", 1:p)
## y
mu <- x[, c(5, 24, 72)] %*% c(3, 1, 2)
y <- rnorm(n, mu)
## clustering of the clumns of x
hc <- hclust(dist(t(x)))
# HIT with AF
out <- hit(x, y, hc)
summary(out)
Run the code above in your browser using DataLab