Learn R Programming

mclust (version 4.1)

mclust.options: Default values for use with MCLUST package

Description

Set or retrieve default values for use with MCLUST package.

Usage

mclust.options(...)

Arguments

...
one or more arguments provided in the name = value form, or no argument at all may be given. Available arguments are described in the Details section below.

Value

  • If the argument list is empty the function returns the current list of values. If the argument list is not empty, the returned list is invisible.

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, A. E. Raftery, T. B. Murphy and L. Scrucca (2012). mclust Version 4 for R: Normal Mixture Modeling for Model-Based Clustering, Classification, and Density Estimation. Technical Report No. 597, Department of Statistics, University of Washington.

Details

mclust.options is provided for assigning values to the .mclust variable list, which is used to supply default values to various functions in MCLUST. Available options are: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

The parameter values set via a call to this function will remain in effect for the rest of the session, affecting the subsequent behaviour of the functions for which the given parameters are relevant.

See Also

Mclust, MclustDA, densityMclust, emControl

Examples

Run this code
opt <- mclust.options() # save default values
irisBIC <- mclustBIC(iris[,-5])
summary(irisBIC, iris[,-5])

mclust.options(emModelNames = c("EII", "EEI", "EEE"))
irisBIC <- mclustBIC(iris[,-5])
summary(irisBIC, iris[,-5])

mclust.options(opt)    # restore default values
mclust.options()

oldpar <- par(mfrow = c(2,1), no.readonly = TRUE)
n <- with(mclust.options(), 
          max(sapply(list(bicPlotSymbols, bicPlotColors),length)))
plot(seq(n), rep(1,n), ylab = "", xlab = "", yaxt = "n", 
     pch = mclust.options("bicPlotSymbols"), 
     col = mclust.options("bicPlotColors"))
title("mclust.options("bicPlotSymbols") 
 mclust.options("bicPlotColors")")
n <- with(mclust.options(), 
          max(sapply(list(classPlotSymbols, classPlotColors),length)))
plot(seq(n), rep(1,n), ylab = "", xlab = "", yaxt = "n", 
     pch = mclust.options("classPlotSymbols"), 
     col = mclust.options("classPlotColors"))
title("mclust.options("classPlotSymbols") 
 mclust.options("classPlotColors")")
par(oldpar)

Run the code above in your browser using DataLab