bat {TRES} | R Documentation |
Bat simulated data
Description
Synthetic data generated from tensor response regression (TRR) model. Each response observation is a two-dimensional image, and each binary predictor observation takes values 0 and 1, representing two groups.
Usage
data("bat")
Format
A list consisting of four components:
- x
A
matrix, each entry takes values 0 and 1, representing two groups.
- y
A
tensor, each matrix
y@data[,,i]
represents an image.- coeffiicients
A
tensor with the bat pattern.
- Gamma
A list consisting of two
envelope basis.
Details
The dataset is generated from the tensor response regression (TRR) model:
where and the regression coefficient
is a given image with rank 14, representing the mean difference of the response
between two groups. To make the model conform to the envelope structure, we construct the envelope basis
and the covariance matrices
, of error term as following. With the singular value decomposition of
, namely
, we choose the envelope basis as
. Then the envelope dimensions are
. We generate another two matrices
and
, where
and
are randomly generated from Uniform(0,1) elementwise. Then we set the covariance matrices
, followed by normalization with their Frobenius norms. We set the first 10 predictors
as 1 and the rest as 0. The error term is then generated from two-way tensor (matrix) normal distribution
.
References
Li, L. and Zhang, X., 2017. Parsimonious tensor response regression. Journal of the American Statistical Association, 112(519), pp.1131-1146.
Examples
## Fit bat dataset with the tensor response regression model
data("bat")
x <- bat$x
y <- bat$y
# Model fitting with ordinary least square.
fit_std <- TRR.fit(x, y, method="standard")
# Draw the coefficient and p-value plots
plot(fit_std)