# 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 \code{\link{TRR_sim}}.
dat <- TRR_sim(r = r, p = p, u = u, n = n)
Xn <- dat$Xn
Yn <- dat$Yn
TensEnv_dim(Xn, Yn) # The estimated envelope dimensions are the same as u.
## Use dataset bat, but it is time-consuming
# }
# NOT RUN {
data("bat")
Xn <- bat$Xn
Yn <- bat$Yn
# check the dimension of Yn
dim(Yn)
# use 32 as the maximal envelope dimension
TensEnv_dim(Xn, Yn, maxdim=32)
# }
Run the code above in your browser using DataLab