rnormmix: Generate Random Samples from a Normal Mixture Model
Description
Generate random samples from a normal mixture model.
Usage
rnormmix(n, prop, mu, sigma)
Value
A matrix with each row corresponding to one sample. The first column are
sample values from a normal mixture model; the second column are the
components from which observations come.
Arguments
n
number of observations.
prop
a vector of proportions of different components.
mu
a vector of means of different components.
sigma
a vector of standard deviations of different components