Learn R Programming

mclust (version 3.1-0)

defaultPrior: Default conjugate prior for Gaussian mixtures.

Description

Default conjugate prior specification for Gaussian mixtures.

Usage

defaultPrior(data, G, modelName, ...)

Arguments

data
The name of the function specifying the conjgate prior. The default function is defaultPrior, which can be used a template for
G
The number of mixture components.
modelName
A character string indicating the model: "E": equal variance (one-dimensional) "V": variable variance (one-dimensional) "EII": spherical, equal volume "VII": spherical, unequal volume "EEI": diagonal, equal volume and shape "VEI": diagonal, varying v
...
One or more of the following:
  • dof
{ The degrees of freedom for the prior on the variance. The default is d + 2, where d is the dimension of the data. } scale

Value

  • A list giving the prior degrees of freedom, scale, shrinkage, and mean.

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 (2005). Bayesian regularization for normal mixture estimation and model-based clustering. Technical Report, Department of Statistics, University of Washington.

C. Fraley and A. E. Raftery (2006). MCLUST Version 3 for R: Normal Mixture Modeling and Model-Based Clustering, Technical Report no. 504, Department of Statistics, University of Washington.

Details

defaultPrior is as a default prior specification for EM within MCLUST. It is usually not necessary to invoke defaultPrior explicitly (it does not appear in the examples below because it is the default function name in priorControl). This function allows considerable flexibility in the prior specification, and can be used as a template for further users that want to specify their own conjugate prior beyond what the arguments will allow.

See Also

mclustBIC, me, mstep, priorControl

Examples

Run this code
# default prior
irisBIC <- mclustBIC(iris[,-5], prior = priorControl())
summary(irisBIC, iris[,-5])

# equivalent to previous example
irisBIC <- mclustBIC(iris[,-5], 
                     prior = priorControl(functionName = "defaultPrior"))
summary(irisBIC, iris[,-5])

# no prior on the mean; default prior on variance
irisBIC <- mclustBIC(iris[,-5], prior = priorControl(shrinkage = 0))
summary(irisBIC, iris[,-5])

# equivalent to previous example
irisBIC <- mclustBIC(iris[,-5], prior =
                     priorControl(functionName="defaultPrior", shrinkage=0))
summary(irisBIC, iris[,-5])

Run the code above in your browser using DataLab