dealWithLabelSwitchingMissing: Label switching algorithms for the case of missing data

Description Usage Arguments Details Author(s) References


This is a wrapper for the label.switching package. It is used to post-process the generated MCMC sample in order to undo the label switching problem. This function is called internally to the coupledMetropolis command.


dealWithLabelSwitchingMissing(outDir, reorderModels, binaryData, z.true)



The directory where the output of coupledMetropolis was previously produced.


Boolean value indicating whether to reorder the MCMC corresponding to each distinct generated value of number of clusters or not.


The input data.


An optional vector of cluster assignments considered as the ground-truth clustering of the observations. Useful for simulations.


See the label.switching package.


Panagiotis Papastamoulis


Papastamoulis P. and Iliopoulos G. (2010). An artificial allocations based solution to the label switching problem in Bayesian analysis of mixtures of distributions. Journal of Computational and Graphical Statistics, 19: 313-331.

Papastamoulis P. and Iliopoulos G. (2013). On the convergence rate of Random Permutation Sampler and ECR algorithm in missing data models. Methodology and Computing in Applied Probability, 15(2): 293-304.

Papastamoulis P. (2014). Handling the label switching problem in latent class models via the ECR algorithm. Communications in Statistics, Simulation and Computation, 43(4): 913-927.

Papastamoulis P (2016): label.switching: An R package for dealing with the label switching problem in MCMC outputs. Journal of Statistical Software, 69(1): 1-24.

Search within the BayesBinMix package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.