Learn R Programming

MixSim (version 1.0-5)

MixSim: Mixture Simulation

Description

Generates a finite mixture model with Gaussian components for prespecified levels of maximum and/or average overlaps.

Usage

MixSim(BarOmega = NULL, MaxOmega = NULL, K, p, sph = FALSE, hom = FALSE,
       ecc = 0.90, PiLow = 1.0, int = c(0.0, 1.0), resN = 100,
       eps = 1e-06, lim = 1e06)

Arguments

BarOmega
value of desired average overlap.
MaxOmega
value of desired maximum overlap.
K
number of components.
p
number of dimensions.
sph
covariance matrix structure (FALSE - non-spherical, TRUE - spherical).
hom
heterogeneous or homogeneous clusters (FALSE - heterogeneous, TRUE - homogeneous).
ecc
maximum eccentricity.
PiLow
value of the smallest mixing proportion (if 'PiLow' is not reachable with respect to K, equal proportions are taken; PiLow = 1.0 implies equal proportions by default).
int
mean vectors are simulated uniformly on a hypercube with sides specified by int = (lower.bound, upper.bound).
resN
maximum number of mixture resimulations.
eps
error bound for overlap computation.
lim
maximum number of integration terms (Davies, 1980).

Value

  • Pivector of mixing proportions.
  • Mumatrix consisting of components' mean vectors (K * p).
  • Sset of components' covariance matrices (p * p * K).
  • OmegaMapmatrix of misclassification probabilities (K * K); OmegaMap[i,j] is the probability that X coming from the i-th component is classified to the j-th component.
  • BarOmegavalue of average overlap.
  • MaxOmegavalue of maximum overlap.
  • rcMaxrow and column numbers for the pair of components producing maximum overlap 'MaxOmega'.
  • failflag value; 0 represents successful mixture generation, 1 represents failure.

Details

If 'BarOmega' is not specified, the function generates a mixture solely based on 'MaxOmega'; if 'MaxOmega' is not specified, the function generates a mixture solely based on 'BarOmega'.

References

Maitra, R. and Melnykov, V. (2010) ``Simulating data to study performance of finite mixture modeling and clustering algorithms'', The Journal of Computational and Graphical Statistics, 2:19, 354-376.

Melnykov, V., Chen, W.-C., and Maitra, R. (2012) ``MixSim: An R Package for Simulating Data to Study Performance of Clustering Algorithms'', Journal of Statistical Software, (accepted).

Davies, R. (1980) ``The distribution of a linear combination of chi-square random variables'', Applied Statistics, 29, 323-333.

See Also

overlap, pdplot, and simdataset.

Examples

Run this code
set.seed(1234)

# controls average and maximum overlaps
(ex.1 <- MixSim(BarOmega = 0.05, MaxOmega = 0.15, K = 4, p = 5))
summary(ex.1)

# controls average overlap
(ex.2 <- MixSim(BarOmega = 0.05, K = 4, p = 5, hom = TRUE))
summary(ex.2)

# controls maximum overlap
(ex.3 <- MixSim(MaxOmega = 0.15, K = 4, p = 5, sph = TRUE))
summary(ex.3)

Run the code above in your browser using DataLab