Learn R Programming

mclust (version 1.1-7)

loglik: Loglikelihood for model-based hierarchical clustering.

Description

Gives the loglikelihood for each stage of model-based hierarchical clustering.

Usage

loglik(tree, data, ...)

Arguments

tree
an "mhtree" object.
data
the data used to produce the "mhtree" object.
...
Other arguments, depending on the method that is appropriate. In particular Vinv, the approximate reciprocal hypervolume of the region from which the data is drawn. The default (for those methods that need this quantity) is determined by the

Value

  • the loglikelihood corresponding to the initial partition and to each stage of merging in hierarchical clustering, together with the following attribute:
  • nmergethe number of clusters merged at each stage.

NOTES

The value given is equal to the loglikelihood up to an additive constant. For those models in which they arise, indeterminate terms are assigned the value -k*log(volume), where k is the number of observations associated with the term. If you scaled your data before using mhtree, be sure to use the same scaling when supplying the data to loglik.

See Also

mhtree, awe

Examples

Run this code
data(iris)
loglik(mhtree(iris[,1:4]),iris[,1:4])

Run the code above in your browser using DataLab