TRRdim {TRES} | R Documentation |
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. Refer to oneD_bic
for more details.
Usage
TRRdim(x, y, C = NULL, maxdim = 10, ...)
Arguments
x |
The predictor matrix of dimension |
y |
The response tensor instance with dimension |
C |
The parameter passed to |
maxdim |
The maximum envelope dimension to be considered. Default is 10. |
... |
Additional arguments passed to |
Details
See oneD_bic
for more details on the definition of 1D-BIC criterion and on the arguments C
and the additional arguments.
Let B
denote the estimated envelope with the selected dimension u
, then the prediction is \hat{Y}_i = B \bar{\times}_{(m+1)} X_i
for each observation. And the mean squared error is defined as 1/n\sum_{i=1}^n||Y_i-\hat{Y}_i||_F^2
, where ||\cdot||_F
denotes the Frobenius norm.
Value
bicval |
The minimal BIC values for each mode. |
u |
The optimal envelope subspace dimension |
mse |
The prediction mean squared error using the selected envelope basis. |
References
Li, L. and Zhang, X., 2017. Parsimonious tensor response regression. Journal of the American Statistical Association, 112(519), pp.1131-1146.
Zhang, X. and Mai, Q., 2018. Model-free envelope dimension selection. Electronic Journal of Statistics, 12(2), pp.2193-2216.
See Also
Examples
# 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)
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)