SimulateGMCMData {GMCM}R Documentation

Simulation from Gaussian mixture (copula) models

Description

Easy and fast simulation of data from Gaussian mixture copula models (GMCM) and Gaussian mixture models (GMM).

Usage

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.

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.

Value

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.

Author(s)

Anders Ellern Bilgrau <anders.ellern.bilgrau@gmail.com>

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

See Also

rtheta

Examples

set.seed(2)

# Simulation from the GMM
gmm.data1 <- SimulateGMMData(n = 200, m = 3, d = 2)
str(gmm.data1)

# Plotting the simulated data
plot(gmm.data1$z, col = gmm.data1$K)

# Simulation from the GMCM
gmcm.data1 <- SimulateGMCMData(n = 1000, m = 4, d = 2)
str(gmcm.data1)

# Plotthe 2nd simulation
par(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 GMCM
theta <- meta2full(c(0.7, 2, 1, 0.7), d = 3)
gmcm.data2 <- SimulateGMCMData(n = 5000, theta = theta)
str(gmcm.data2)

# Plotting the 3rd simulation
par(mfrow=c(1,2))
plot(gmcm.data2$z, col = gmcm.data2$K)
plot(gmcm.data2$u, col = gmcm.data2$K)

[Package GMCM version 1.4 Index]