Easy and fast simulation of data from Gaussian mixture copula models (GMCM) and Gaussian mixture models (GMM).
SimulateGMCMData(n =1000, par, d =2, theta,...)SimulateGMMData(n =1000, theta = rtheta(...),...)
Arguments
n: A single integer giving the number of realizations (observations) drawn from the model. Default is 1000.
par: A vector of parameters of length 4 where par[1] is the mixture proportion, par[2] is the mean, par[3] is the standard deviation, and par[4] is the correlation.
d: The number of dimensions (or, equivalently, experiments) in the mixture distribution.
theta: A list of parameters for the model as described in rtheta.
...: In SimulateGMCMData the arguments are passed to SimulateGMMData. In SimulateGMMData the arguments are passed to rtheta.
Returns
SimulateGMCMData returns a list of length 4 with elements: - u: A matrix of the realized values of the GMCM.
z: A matrix of the latent GMM realizations.
K: An integer vector denoting the component from which the realization comes.
theta: A list containing the used parameters for the simulations with the format described in rtheta.
SimulateGMMData returns a list of length 3 with elements: - z: A matrix of GMM realizations.
K: An integer vector denoting the component from which the realization comes.
theta: As above and in rtheta.
Details
The functions provide simulation of n observations and d-dimensional GMCMs and GMMs with provided parameters. The par argument specifies the parameters of the Li et. al. (2011) GMCM. The theta argument specifies an arbitrary GMCM of Tewari et. al. (2011). Either one can be supplied. If both are missing, random parameters are chosen for the general model.
Examples
set.seed(2)# Simulation from the GMMgmm.data1 <- SimulateGMMData(n =200, m =3, d =2)str(gmm.data1)# Plotting the simulated dataplot(gmm.data1$z, col = gmm.data1$K)# Simulation from the GMCMgmcm.data1 <- SimulateGMCMData(n =1000, m =4, d =2)str(gmcm.data1)# Plotthe 2nd simulationpar(mfrow = c(1,2))plot(gmcm.data1$z, col = gmcm.data1$K)plot(gmcm.data1$u, col = gmcm.data1$K)# Simulation from the special case of GMCMtheta <- meta2full(c(0.7,2,1,0.7), d =3)gmcm.data2 <- SimulateGMCMData(n =5000, theta = theta)str(gmcm.data2)# Plotting the 3rd simulationpar(mfrow=c(1,2))plot(gmcm.data2$z, col = gmcm.data2$K)plot(gmcm.data2$u, col = gmcm.data2$K)
References
Li, Q., Brown, J. B. J. B., Huang, H., & Bickel, P. J. (2011). Measuring reproducibility of high-throughput experiments. The Annals of Applied Statistics, 5(3), 1752-1779. doi:10.1214/11-AOAS466
Tewari, A., Giering, M. J., & Raghunathan, A. (2011). Parametric Characterization of Multimodal Distributions with Non-gaussian Modes. 2011 IEEE 11th International Conference on Data Mining Workshops, 286-292. doi:10.1109/ICDMW.2011.135