Learn R Programming

mclust (version 3.4.7)

densityMclust: Density Estimation via Model-Based Clustering

Description

Produces a density estimate for each data point using the optimal mixture model from Mclust.

Usage

densityMclust(x, ...)

Arguments

x
A numeric vector, matrix, or data frame of observations. Categorical variables are not allowed. If a matrix or data frame, rows correspond to observations and columns correspond to variables.
...
Additional arguments for the Mclust function.

Value

  • An object of class densityMclust, which is the density of the input $x$ according to the optimal model from Mclust, accompanied by the following attributes:
  • modelNameA character string denoting the model at which the optimal BIC occurs.
  • parametersThe parameters of the Mclust model.
  • rangeThe range of the input data (used as a default for plotting).

References

C. Fraley and A. E. Raftery (2002). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611:631. C. Fraley and A. E. Raftery (2006, revised in 2010). MCLUST Version 3 for R: Normal Mixture Modeling and Model-Based Clustering, Technical Report no. 504, Department of Statistics, University of Washington.

Details

If x is univariate, there is an associated plot method.

See Also

Mclust, plot.densityMclust,

Examples

Run this code
densityMclust(rivers)
plot(densityMclust(rivers))
 plot(densityMclust(rivers), data = rivers, xlim = c(0,1500))

Run the code above in your browser using DataLab