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)
var.norMix(x, ...)
## S3 method for class 'norMix':
mean(x, \dots)
## S3 method for class 'norMix':
print(x, \dots)
name attribute
should use punctuation and hence be slightly larger than by default.norMix.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."norMix", are constructed by norMix and tested for by
is.norMix. m.norMix() returns the number of mixture
components; the mean() method (for class "norMix"
returns the mu vector of means and var.norMix() (not a
method, call the function explicitly!) the sig2 vector of
variances.For further methods see below.
dnorMix for the density,
pnorMix for the cumulative distribution
and the quantile function (qnorMix), and
rnorMix for random numbers and
plot.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"Run the code above in your browser using DataLab