TRRdim: Envelope dimension selection for tensor response regression...

Description Usage Arguments Details Value References See Also Examples

View source: R/TRRdim.R

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

1
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.

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∑_{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 (u_1, u_2,\cdots,u_m).

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

oneD_bic, TRRsim.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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)

TRES documentation built on Oct. 20, 2021, 9:06 a.m.