sim_mix {nethet} | R Documentation |
Simulate from mixture model with multi-variate Gaussian or t-distributed components.
sim_mix(n, n.comp, mix.prob, Mu, Sig, dist = "norm", df = 2)
n |
sample size |
n.comp |
number of mixture components ("comps") |
mix.prob |
mixing probablities (need to sum to 1) |
Mu |
matrix of component-specific mean vectors |
Sig |
array of component-specific covariance matrices |
dist |
'norm' for Gaussian components, 't' for t-distributed components |
df |
degrees of freedom of the t-distribution (not used for Gaussian distribution), default=2 |
a list consisting of:
S |
component assignments |
X |
observed data matrix |
n.stadler
n.comp = 4 p = 5 # dimensionality Mu = matrix(rep(0, p), p, n.comp) Sigma = array(diag(p), c(p, p, n.comp)) mix.prob = rep(0.25, n.comp) sim_mix(100, n.comp, mix.prob, Mu, Sigma)