Learn R Programming

TRES (version 1.1.1)

TensEnv_dim: Envelope dimension selection for tensor response regression (TRR)

Description

This function uses the 1D-BIC criterion proposed by Zhang, X., & Mai, Q. (2018) to select envelope dimensions in tensor response regression.

Usage

TensEnv_dim(x, y, multiD=1, maxdim=10, opts=NULL)

Arguments

x

The predictor matrix of dimension \(p \times n\). Vector of length \(n\) is acceptable.

y

The response tensor instance with dimension \(r_1\times r_2\times\cdots\times r_m \times n\), where \(n\) is the sample size. Array with the same dimensions and matrix with dimension \(r\times n\) are acceptable.

multiD

The parameter in ballGBB1D_bic. Default is 1.

maxdim

The maximum envelope dimension to be considered. Default is 10.

opts

The parameter in ballGBB1D_bic.

Value

Return the envelope dimension of \((u_1, u_2,\cdots,u_m)\).

See Also

Arguments multiD and opts are the same as the ones in ballGBB1D_bic.

TRR_sim.

Examples

Run this code
# 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