Learn R Programming

TRES (version 1.1.5)

TRRdim: 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 \(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.

C

The parameter passed to oneD_bic. Default is nrow(x) = p.

maxdim

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

...

Additional arguments passed to oneD_bic.

Value

bicval

The minimal BIC values for each mode.

u

The optimal envelope subspace dimension \((u_1, u_2,\cdots,u_m).\)

mse

The prediction mean squared error using the selected envelope basis.

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.

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

oneD_bic, TRRsim.

Examples

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