rmixmvnorm:
Random vectors from mixtures of multivariate normal
distributions.
Description
Generates random vectors from mixtures of multivariate normal
distributions.
Usage
rmixmvnorm(n,dm,nmix,means,covs,wts=rep(1/nmix,nmix))
Arguments
n
Number of random vectors to generate.
dm
Dimension i.e. length of each random vector.
nmix
Number of components in the mixture.
means
Mean vectors of the MV normal distributions; an R list
of nmix vectors of length dm each
covs
Covariance matrices of the MV normal distributions; an R
list of nmix , each dm x dm.
wts
Mixture probabilities.
Value
An n by dm matrix of random vectors of length dm,
grouped by MV normal distribution of origin.