TPRsim: Generate simulation data for tensor predictor regression...

Description Usage Arguments Details Value Note References See Also Examples

View source: R/TPRsim.R

Description

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

Usage

1
TPRsim(p, r, u, n)

Arguments

p

The dimension of predictor, a vector in the form of (p_1,\cdots, p_m).

r

The dimension of response, a scale.

u

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

n

The sample size.

Details

The tensor predictor regression model is of the form,

Y = B_{(m+1)}vec(X) + ε

where response Y \in R^{r}, predictor X \in R^{p_1\times \cdots\times p_m}, B \in \in R^{p_1 \times\cdots\times p_m \times r} and the error term is multivariate normal distributed. The predictor is tensor normal distributed,

X\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_1\times \cdots\times p_m \times n.

y

The response of dimension r\times n.

Gamma

A list of envelope subspace basis of dimension p_k \times u_k, \ k=1,…,m.

coefficients

The tensor coefficients of dimension p_1\times \cdots\times p_m \times r.

Sigma

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

p, r, u

The input p,r,u.

Note

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

References

Zhang, X. and Li, L., 2017. Tensor envelope partial least-squares regression. Technometrics, 59(4), pp.426-436.

See Also

TPR.fit, TRRsim.

Examples

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

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