# NOT RUN {
# 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 TRRsim.
dat <- TRRsim(r = r, p = p, u = u, n = n)
x <- dat$x
y <- dat$y
TRRdim(x, y) # The estimated envelope dimensions are the same as u.
## Use dataset bat. (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
TRRdim(x, y, maxdim=32)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab