Learn R Programming

mixAK (version 2.2)

NMixRelabel: Re-labeling the MCMC output of the mixture model

Description

This function takes an object generated by the NMixMCMC or GLMM_MCMC function and internally re-labels the mixture components using selected re-labeling algorithm. It also computes posterior summary statistics for mixture means, weights, variances which correspond to newly labeled MCMC sample. Further, posterior component probabilities (poster.comp.prob1 and poster.comp.prob2 components of the object object) are updated according to the newly labeled MCMC sample.

This function only works for models with a fixed number of mixture components.

Usage

NMixRelabel(object, type=c("mean", "weight", "stephens"), par, ...)

## S3 method for class 'default': NMixRelabel(object, type=c("mean", "weight", "stephens"), par, ...)

## S3 method for class 'NMixMCMC': NMixRelabel(object, type=c("mean", "weight","stephens"), par, prob=c(0.025, 0.5, 0.975), keep.comp.prob=FALSE, info, ...)

## S3 method for class 'GLMM_MCMC': NMixRelabel(object, type=c("mean", "weight", "stephens"), par, prob=c(0.025, 0.5, 0.975), keep.comp.prob=FALSE, info, ...)

Arguments

object
an object of apropriate class.
type
character string which specifies the type of the re-labeling algorithm.
par
additional parameters for particular re-labeling algorithms.

[object Object],[object Object],[object Object]

prob
probabilities for which the posterior quantiles of component allocation probabilities are computed.
keep.comp.prob
logical. If TRUE, posterior sample of component allocation probabilities (for each subject) is kept in the resulting object.
info
number which specifies frequency used to re-display the iteration counter during the computation.
...
optional additional arguments.

Value

  • An object being equal to the value of the object argument in which the following components are updated according to new labeling of the mixture components.

References

Celeux, G. (1998). Bayesian inference for mixtures: The label-switching problem. In: COMPSTAT 98 (eds. R. Payne and P. Green), pp. 227-232. Heidelberg: Physica-Verlag.

Jasra, A., Holmes, C. C., and Stephens, D. A. (2005). Markov chain Monte Carlo methods and the label switching problem in Bayesian mixture modeling. Statistical Science, 20, 50-67. Stephens, M. (1997). Bayesian methods for mixtures of normal distributions. DPhil Thesis. Oxford: University of Oxford. (Available from: http://www.stat.washington.edu/stephens/papers.html (accessed on 08/02/2010)). Stephens, M. (2000). Dealing with label switching in mixture models. Journal of the Royal Statistical Society, Series B, 62, 795-809.

See Also

NMixMCMC, GLMM_MCMC.

Examples

Run this code
## See also additional material available in 
## YOUR_R_DIR/library/mixAK/doc/
## or YOUR_R_DIR/site-library/mixAK/doc/
## - files PBCseq.pdf,
##         PBCseq.R
## ==============================================

Run the code above in your browser using DataLab