Description Usage Arguments Value Author(s) Examples
Helper function to simulate the normal mixtures with varying hyperparameters (means and variances).
1 2 | pickNormalMix(N, nMix = NULL, propMix = NULL, muMix = NULL,
sigMix = NULL)
|
N |
number of observations to simulate from the mixture of normals |
nMix |
number of mixtures. Default is 3. |
propMix |
mixture proportions. If NULL (default), a mixture distribution with propMix = c(0.4, 0.2, 0.4) is simulated. Otherwise user must supply propMix. Length should equal nMix. |
muMix |
mean of nMix distributions. If NULL (default), a mixture distribution with muMix = c(-3, 1, 3) is simulated. Otherwise user must supply propMix. Length should equal nMix. |
sigMix |
variance of nMix distributions. If NULL (default), a mixture distribution with sigMix = c(3, .4, 3) is simulated. Otherwise user must supply sigMix. Length should equal nMix. |
A list with elements
trueParams |
A data frame with the input parameters used to simulate the mixture distribution (propMix, muMix and sigMix) |
simObs |
A data frame containing trueMix (indicator specifying which distribution the observation came from) and normObs (the observed value from the mixture distribution). |
Stephanie Hicks
1 | pickNormalMix(N = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.