simE {mclust} | R Documentation

## Simulate from a Parameterized MVN Mixture Model

### Description

Simulate data from a parameterized MVN mixture model.

### Usage

    simE(mu, sigmasq, pro, ..., seed = 0)
    simV(mu, sigmasq, pro, ..., seed = 0)
    simEII(mu, sigmasq, pro, ..., seed = 0)
    simVII(mu, sigmasq, pro, ..., seed = 0)
    simEEI(mu, decomp, pro, ..., seed = 0)
    simVEI(mu, decomp, pro, ..., seed = 0)
    simEVI(mu, decomp, pro, ..., seed = 0)
    simVVI(mu, decomp, pro, ..., seed = 0)
    simEEE(mu, pro, ..., seed = 0)
    simEEV(mu, decomp, pro, ..., seed = 0)
    simVEV(mu, decomp, pro, ..., seed = 0)
    simVVV(mu, pro, ..., seed = 0)

### Arguments

`mu` | The mean for each component. If there is more than one component, `mu` is a matrix whose columns are the means of the components.
`sigmasq` | for the one-dimensional models ("E", "V") and spherical models ("EII", "VII"). This is either a vector whose kth component is the variance for the kth component in the mixture model ("V" and "VII"), or a scalar giving the common variance for all components in the mixture model ("E" and "EII").
`decomp` | for the diagonal models ("EEI", "VEI", "EVI", "VVI") and some ellipsoidal models ("EEV", "VEV"). This is a list described in `cdens`.
`pro` | Component mixing proportions. If missing, equal proportions are assumed.
`...` | Other terms describing variance: Sigma for the equal variance model "EEE". A d by d matrix giving the common covariance for all components of the mixture model. sigma for the unconstrained variance model "VVV". A d by d by G matrix array whose `[,,k]`th entry is the covariance matrix for the kth component of the mixture model. The form of the variance specification is the same as for the output for the `em`, `me`, or `mstep` methods for the specified mixture model. n An integer specifying the number of data points to be simulated.
`seed` | A integer between 0 and 1000, inclusive, for specifying a seed for random class assignment. The default value is 0.

### Details

This function can be used with an indirect or list call using `do.call`, allowing the output of e.g. `mstep`, `em` `me`, or `EMclust`, to be passed directly without the need to specify individual parameters as arguments.

### Value

A data set consisting of `n` points simulated from the specified MVN mixture model.

### References

C. Fraley and A. E. Raftery (2002a). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611-631. See http://www.stat.washington.edu/mclust.

C. Fraley and A. E. Raftery (2002b). MCLUST:Software for model-based clustering, density estimation and discriminant analysis. Technical Report, Department of Statistics, University of Washington. See http://www.stat.washington.edu/mclust.

### See Also

`sim`, `EMclust`, `mstepE`, `do.call`

### Examples

    d <- 2
    G <- 2
    scale <- 1
    shape <- c(1, 9)

    O1 <- diag(2)
    O2 <- diag(2)[,c(2,1)]
    O <- array(cbind(O1,O2), c(2, 2, 2))
    O

    decomp <- list(d= d, G = G, scale = scale, shape = shape, orientation = O)
    mu <- matrix(0, d, G) ## center at the origin
    simdat <- simEEV(n=200, mu=mu, decomp=decomp, pro = c(1,1))

    cl <- attr(simdat, "classification")
    sigma <- array(apply(O, 3, function(x,y) crossprod(x*y),
                     y = sqrt(scale*shape)), c(2,2,2))
    paramList <- list(mu = mu, sigma = sigma)
    coordProj( simdat, paramList = paramList, classification = cl)

[Package mclust version 2.1-10 Index]