rrmix.sim.norm {rrMixture} | R Documentation |
Simulation Data Generator
Description
‘rrmix.sim.norm’ is used to create synthetic data from the multivariate normal distribution, which is used in a numerical study of Kang et. al. (2022+).
Usage
rrmix.sim.norm(
K = 2,
n = 100,
p = 5,
q = 5,
rho = 0.5,
b = 1,
shift = 1,
r.star = NULL,
sigma = NULL,
pr = NULL,
seed = NULL
)
Arguments
K |
number of mixture components. |
n |
number of observations. |
p |
number of predictors including an intercept. |
q |
number of responses. |
rho |
correlation between predictors used to make a design matrix. |
b |
signal strength which controls the magnitude of coefficient matrices. |
shift |
mean shift which measures how separate the mixture components are. |
r.star |
vector of length K, specifying the true ranks of K coefficient matrices. |
sigma |
vector of length K, specifying the noise strength of K multivariate normal distributions. |
pr |
vector of length K, specifying the multinomial probabilities for the K mixture components. |
seed |
seed number for the reproducibility of results. Default is ‘NULL’. |
Value
X |
n by p design matrix. |
Y |
n by q response matrix. |
E |
p by q error matrix. |
ind.true |
vector of length n, specifying the true mixture membership for n observations. |
para.true |
array of length K. It consists of K lists, each of which contains a coefficient matrix and its true rank. |
Author(s)
Suyeon Kang, University of California, Riverside, skang062@ucr.edu; Weixin Yao, University of California, Riverside, weixin.yao@ucr.edu; Kun Chen, University of Connecticut, kun.chen@uconn.edu.
References
Kang, S., Chen, K., and Yao, W. (2022+). "Reduced rank estimation in mixtures of multivariate linear regression".
Examples
#-----------------------------------------------------------#
# Simulation 1: Two Components Case
#-----------------------------------------------------------#
K2mod <- rrmix.sim.norm(K = 2, n = 100, p = 5, q = 5, rho = .5,
b = 1, shift = 1, r.star = c(1, 3), sigma = c(1, 1),
pr = c(.5, .5), seed = 1215)
#-----------------------------------------------------------#
# Simulation 2: Four Components Case
#-----------------------------------------------------------#
K4mod <- rrmix.sim.norm(K = 4, n = 600, p = 15, q = 15,
rho = .5, b = 1, shift = 1, r.star = c(1, 1, 3, 3),
sigma = c(1, 1, 1, 1), pr = c(.25, .25, .25, .25),
seed = 1215)