consolidate: Join clusters until the minimum degree of overlap is reached

View source: R/consolidate.R

consolidateR Documentation

Join clusters until the minimum degree of overlap is reached

Description

The function join clusters that have the minimum ratio of overlap as specified by user.

Usage

consolidate(emfit, minover)

Arguments

emfit

an object of class Mclust providing a mixture model estimation.

minover

a single numeric value between 0 and 1 specifying the degree of overlap above which two clusters will be joined into one.

Value

a list containing information about the updated clusters obtained from a mixture model estimation:

  • mu a numeric vector representing the mean for each component. If there is more than one component, the kth element is the mean of the kth component of the mixture model.

  • pro a vector whose kth component is the mixing proportion for the kth component of the mixture model. If missing, equal proportions are assumed.

  • z a numeric matrix whose [i,k]th entry is the probability that observation i in the test data belongs to the kth class.

  • groups a matrix of double, used as integer, with the number of rows corresponding to the current number of clusters while the number of columns is corresponding to the initial number of clusters. The presence of 1 in position [i,k] indicates that the initial ith cluster is now part of the new kth cluster.

  • ngroups a numeric, used as an integer, giving the final number of clusters.

  • sigmasq a numeric vector giving the common variance for each component in the mixture model "E".

Author(s)

Alexander Krasnitz, Guoli Sun

Examples


## Load Mclust object
data(EMexample)

## Group clusters that have at least 0.4% of overlap
## The inital object has 5 clusters while the return object has only 
## 4 clusters
CNprep:::consolidate(EMexample, minover=0.004)


KrasnitzLab/CNprep documentation built on May 28, 2022, 8:32 p.m.