RRR_sim {RRRR} | R Documentation |
Simulating data for Reduced-Rank Regression
Description
Simulate data for Reduced-rank regression. See Detail
for the formulation
of the simulated data.
Usage
RRR_sim(
N = 1000,
P = 3,
Q = 3,
R = 1,
r = 1,
mu = rep(0.1, P),
A = matrix(rnorm(P * r), ncol = r),
B = matrix(rnorm(Q * r), ncol = r),
D = matrix(rnorm(P * R), ncol = R),
varcov = diag(P),
innov = mvtnorm::rmvt(N, sigma = varcov, df = 3),
mean_x = 0,
mean_z = 0,
x = NULL,
z = NULL
)
Arguments
N |
Integer. The total number of simulated realizations. |
P |
Integer. The dimension of the response variable matrix. See |
Q |
Integer. The dimension of the explanatory variable matrix to be projected. See |
R |
Integer. The dimension of the explanatory variable matrix not to be projected. See |
r |
Integer. The rank of the reduced rank coefficient matrix. See |
mu |
Vector with length P. The constants. Can be |
A |
Matrix with dimension P*r. The exposure matrix. See |
B |
Matrix with dimension Q*r. The factor matrix. See |
D |
Matrix with dimension P*R. The coefficient matrix for |
varcov |
Matrix with dimension P*P. The covariance matrix of the innovation. See |
innov |
Matrix with dimension N*P. The innovations. Default to be simulated from a Student t distribution, See |
mean_x |
Integer. The mean of the normal distribution |
mean_z |
Integer. The mean of the normal distribution |
x |
Matrix with dimension N*Q. Can be used to specify |
z |
Matrix with dimension N*R. Can be used to specify |
Details
The data simulated can be used for the standard reduced-rank regression testing with the following formulation
where for each realization is a vector of dimension
for the
response variables,
is a vector of dimension
for the
explanatory variables that will be projected to
reduce the rank,
is a vector of dimension
for the
explanatory variables
that will not be projected,
is the constant vector of dimension
,
is the innovation vector of dimension
,
is a coefficient matrix for
with dimension
,
is the so called exposure matrix with dimension
, and
is the so called factor matrix with dimension
.
The matrix resulted from
will be a reduced rank coefficient matrix with rank of
.
The function simulates
,
from multivariate normal distribution and
by specifying
parameters
,
,
,
, and
, the covariance matrix of
the innovation's distribution. The constant
and the term
can be
dropped by setting
NULL
for arguments mu
and D
. The innov
in the argument is
the collection of innovations of all the realizations.
Value
A list of the input specifications and the data ,
, and
, of class
RRR_data
.
- y
Matrix of dimension N*P
- x
Matrix of dimension N*Q
- z
Matrix of dimension N*R
Author(s)
Yangzhuoran Yang
Examples
set.seed(2222)
data <- RRR_sim()