TRRsim: Generate simulation data for tensor response regression (TRR)

Description Usage Arguments Details Value Note References See Also Examples

View source: R/TRRsim.R

Description

This function is used to generate simulation data used in tensor response regression.

Usage

1
TRRsim(r, p, u, n)

Arguments

r

The dimension of response, a vector with length larger than 2.

p

The dimension of predictor, a scale.

u

The structural dimension of envelopes at each mode, a vector with the same length as r.

n

The sample size.

Details

The tensor response regression model is of the form,

Y = B \bar{\times}_{(m+1)} X + ε

where predictor X \in R^{p}, response Y \in R^{r_1\times \cdots\times r_m}, B \in R^{r_1\times \cdots\times r_m \times p} and the error term is tensor normal distributed as follows,

ε \sim TN(0;Σ_1,…,Σ_m).

According to the tensor envelope structure, we have

B = [Θ;Γ_1,…,Γ_m, I_p],

Σ_k = Γ_k Ω_k Γ_k^{T} + Γ_{0k} Ω_{0k} Γ_{0k}^T,

for some Θ \in R^{u_1\times\cdots\times u_m \times p}, Ω_k \in R^{u_k \times u_k} and Ω_{0k} \in \in R^{(p_k - u_k) \times (p_k - u_k)}, k=1,…,m.

Value

x

The predictor of dimension p\times n.

y

The response of dimension r_1\times \cdots\times r_m \times n.

Gamma

The envelope subspace basis of dimension r_k \times u_k, \ k=1,…,m.

coefficients

The tensor coefficients of dimension r_1\times \cdots\times r_m \times p.

Sigma

A lists of estimated covariance matrices at each mode for the error term, i.e., Σ_1,…,Σ_m.

p, r, u

The input p,r,u.

Note

The length of r must match that of u, and each element of u must be less than the corresponding element in r.

References

Li, L. and Zhang, X., 2017. Parsimonious tensor response regression. Journal of the American Statistical Association, 112(519), pp.1131-1146.

See Also

TPR.fit, TPRsim.

Examples

1
2
3
4
5
6
7
8
r <- c(10, 10, 10)
u <- c(2, 2, 2)
p <- 5
n <- 100
dat <- TRRsim(r = r, p = p, u = u, n = n)
x <- dat$x
y <- dat$y
fit_std <- TRR.fit(x, y, method="standard")

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