square {TRES} | R Documentation |
Square simulated data
Description
Synthetic data generated from tensor predictor regression (TPR) model. Each response observation is univariate, and each predictor observation is a matrix.
Usage
data("square")
Format
A list consisting of four components:
- x
A
tensor, each matrix
x@data[,,i]
represents a predictor observation.- y
A
matrix, each entry represents a response observation.
- coefficients
A
tensor with a square pattern.
- Gamma
A list consisting of two
envelope basis.
Details
The dataset is generated from the tensor predictor regression (TPR) model:
where and the regression coefficient
is a given image with rank 2, which has a square pattern. All the elements of the coefficient matrix
are either 0.1 or 1. To make the model conform to the envelope structure, we construct the envelope basis
and the covariance matrices
, of predictor
as following. With the singular value decomposition of
, namely
, we choose the envelope basis as
. Then the envelope dimensions are
. We set matrices
and
,
. Then we generate the covariance matrices
, followed by normalization with their Frobenius norms. The predictor
is then generated from two-way tensor (matrix) normal distribution
. And the error term
is generated from standard normal distribution.
References
Zhang, X. and Li, L., 2017. Tensor envelope partial least-squares regression. Technometrics, 59(4), pp.426-436.
Examples
## Fit square dataset with the tensor predictor regression model
data("square")
x <- square$x
y <- square$y
# Model fitting with ordinary least square.
fit_std <- TPR.fit(x, y, method="standard")
# Draw the coefficient plot.
plot(fit_std)