| norMix {nor1mix} | R Documentation |
Objects of class norMix represent finite mixtures of
(univariate) normal (aka Gaussian) distributions. Methods for
construction, printing, plotting, and basic computations are provided.
norMix(mu, sig2 = rep(1,m), w = NULL, name = NULL, long.name = FALSE) is.norMix(obj) m.norMix(obj) mean.norMix(x, ...) var.norMix(x, ...) ## S3 method for class 'norMix': print(x, ...)
mu |
numeric vector of length K, say, specifying the means μ of the K normal components. |
sig2 |
numeric vector of length K, specifying the variances σ^2 of the K normal components. |
w |
numeric vector of length K, specifying the mixture proportions p[j] of the normal components, j = 1,...,K. Defaults to equal proportions |
name |
optional name tag of the result (used for printing). |
long.name |
~~Describe long.name here~~ |
obj,x |
an object of class norMix. |
... |
further arguments passed to methods. |
The (one dimensional) normal mixtures, R objects of class
"norMix", are constructed by norMix and tested for by
is.norMix. m.norMix() returns the number of mixture
components,
....
For further methods see below.
norMix returns objects of class "norMix" which are
currently implemented as 3-column matrix with column names mu,
sig2, and w, and further attributes.
The user should rarely need to access the underlying structure
directly.
Martin Maechler
dnorMix for the density, rnorMix
for random numbers and print.norMix, the plot method.
MarronWand has the Marron-Wand densities as normal mixtures.
ex <- norMix(mu = c(1,2,5))# s^2 = 1, equal proportions ex plot(ex)# looks like a mixture of only 2 plot(ex, log = "y")# maybe "revealing"