Learn R Programming

TRES (version 1.1.0)

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(Xn, Yn, multiD=1, maxdim=10, opts=NULL)

Arguments

Xn

A vector predictor of dimension p.

Yn

The response tensor instance \(r_1\times \cdots \times r_m\).

multiD

The parameter in ballGBB1D_bic.

maxdim

The maximum envelope dimension to be considered, the parameter in ballGBB1D_bic.

opts

The parameter in ballGBB1D_bic.

Value

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

See Also

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 \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