collpcm.undo.label.switching {collpcm}R Documentation

Correct samples of label vectors for label switching.

Description

collpcm.undo.label.switching is used to correct sampled label vectors for label switching using the method proposed by Nobile and Fearnside (2007) which relies on the assignment algorithm of Carpaneto and Toth (1980).

Usage

collpcm.undo.label.switching( Z, Gsamp = NULL )

Arguments

Z

A matrix of dimensions (num samples) by n giving the sampled label vectors for each iteration of the MCMC run.

Gsamp

A vector of length (num samples) giving the corresponding number of groups for each iteration of the MCMC run.

Value

collpcm.undo.label.switching returns a list with the following slots.

call

The function call.

relab

The post processed Z matrix after label switching has been corrected for

label.probs

List giving the probability of belonging to each group for each item, each entry of the list corresponding to a given number of components.

permutation

The permutation applied to each row to correct for label switching.

Author(s)

Jason Wyse

References

Nobile, A. and Fearnside A. T. (2007). Bayesian finite mixtures with an unknown number of components: The allocation sampler Statistics and Computing, Vol. 17, 147-162 <doi:10.1007/s11222-006-9014-7>

Carpaneto, G. and Toth, P. (1980). Algorithm 548: Solution of the Assignment Problem [H] ACM Transactions on Mathematical Software, Vol. 6, 104-111 <doi:10.1145/355873.355883>


[Package collpcm version 1.4 Index]