merge_classes: Merge CLIMB classes into parent groups.

View source: R/downstream.R

merge_classesR Documentation

Merge CLIMB classes into parent groups.

Description

Use a theoretical distance between estimated classes to merge them together. This can be useful for more parsimonious visualizations.

Usage

merge_classes(n_groups, chain, burnin)

Arguments

n_groups

Integer. How many parent groups to merge the classes into?

chain

An object output from the extract_chains function.

burnin

Iterations to be used as burn-in.

multichain

Logical. Defaults to FALSE. Set to true if analyzing multiple different MCMC outputs together. 'chain' should be a list of objects output from the extract_chains function.

method

Agglomeration method to be used. See hclust.

...

Other arguments to be passed to hclust.

Value

merged_z

New group labels assigned to each observation

merged_mu

A matrix of merged class means with each column corresponding to a dimension and each row corresponding to a group.

merged_prop

Merged class mixing weights.

An object output from hclust, showing hierarchical relationship among the non-empty classes.

Author(s)

hbk5086@psu.edu


hillarykoch/CLIMB documentation built on Oct. 24, 2022, 4:27 a.m.