# NOT RUN {
rm(list=ls())
# The dimension of response
r <- c(10, 10, 10)
# The envelope dimensions u.
u <- c(2, 2, 2)
# The dimension of predictor
p <- 5
# The sample size
n <- 100
# Simulate the data with TRR_sim.
dat <- TRR_sim(r = r, p = p, u = u, n = n)
x <- dat$x
y <- dat$y
TensEnv_dim(x, y) # The estimated envelope dimensions are the same as u.
## Use dataset bat, but it is time-consuming
# }
# NOT RUN {
data("bat")
x <- bat$x
y <- bat$y
# check the dimension of y
dim(y)
# use 32 as the maximal envelope dimension
TensEnv_dim(x, y, maxdim=32)
# }
Run the code above in your browser using DataLab