MenvU_sim {TRES} | R Documentation |
Generate matrices
and
Description
This function generates the matrices and
with envelope structure.
Usage
MenvU_sim(
p,
u,
Omega = NULL,
Omega0 = NULL,
Phi = NULL,
jitter = FALSE,
wishart = FALSE,
n = NULL
)
Arguments
p |
Dimension of |
u |
The envelope dimension. An integer between 0 and |
Omega |
The positive definite matrix |
Omega0 |
The positive definite matrix |
Phi |
The positive definite matrix |
jitter |
Logical or numeric. If it is numeric, the diagonal matrix |
wishart |
Logical. If it is |
n |
The sample size. If |
Details
The matrices and
are in forms of
The envelope basis is randomly generated from the Uniform (0, 1) distribution elementwise and then transformed to a semi-orthogonal matrix.
is the orthogonal completion of
.
In some cases, to guarantee that is positive definite which is required by the definition of envelope, a
jitter
should be added to .
If wishart
is TRUE
, after the matrices and
are generated, the samples from Wishart distribution
and
are output as matrices
and
. If so,
n
is required.
Value
M |
The |
U |
The |
Gamma |
The |
References
Cook, R.D. and Zhang, X., 2018. Fast envelope algorithms. Statistica Sinica, 28(3), pp.1179-1197.
Examples
data1 <- MenvU_sim(p = 20, u = 5)
M1 <- data1$M
U1 <- data1$U
# Sample version from Wishart distribution
data2 <- MenvU_sim(p = 20, u = 5, wishart = TRUE, n = 200)
M2 <- data2$M
U2 <- data2$U