NMixRelabel  R Documentation 
This function takes an object generated by the NMixMCMC
or GLMM_MCMC
function and internally relabels the mixture
components using selected relabeling 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.prob_u
and
poster.comp.prob_b
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.
NMixRelabel(object, type=c("mean", "weight", "stephens"), par, ...)
## Default S3 method:
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 'NMixMCMClist'
NMixRelabel(object, type = c("mean", "weight","stephens"), par,
prob=c(0.025, 0.5, 0.975), keep.comp.prob = FALSE, info,
silent = FALSE, parallel = FALSE, ...)
## 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,
silent = FALSE, ...)
## S3 method for class 'GLMM_MCMClist'
NMixRelabel(object, type = c("mean", "weight", "stephens"), par,
prob = c(0.025, 0.5, 0.975), keep.comp.prob = FALSE, jointly = FALSE,
info, silent = FALSE, parallel = FALSE, ...)
object 
an object of apropriate class. 
type 
character string which specifies the type of the relabeling algorithm. 
par 
additional parameters for particular relabeling algorithms.

prob 
probabilities for which the posterior quantiles of component allocation probabilities are computed. 
keep.comp.prob 
logical. If 
jointly 
a logical value. If it is 
info 
number which specifies frequency used to redisplay the iteration counter during the computation. 
silent 
a logical value indicating whether the information on the MCMC progress is to be supressed. 
parallel 
a logical value indicating whether parallel
computation (based on a package 
... 
optional additional arguments. 
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.
When the argument object
is of class NMixMCMC
, the
resulting object is equal to object
with the following
components being modified:
see NMixMCMC
see NMixMCMC
see NMixMCMC
see NMixMCMC
see NMixMCMC
see NMixMCMC
see NMixMCMC
see NMixMCMC
see NMixMCMC
see NMixMCMC
Additionally, new components are added, namely
a list with the posterior quantiles of
component probabilities. One list
component for each
quantile specified by prob
argument.
posterior sample of individual component
probabilities (also given random effects). It is an M \times
n\cdot K
matrix where M
is the length of the
posterior sample, n
is the number of subjects, and K
is the number of mixture components. Component labels correspond
to the relabelled sample. It is included in the
resulting object only if keep.comp.prob
argument is
TRUE
.
When the argument object
is of class GLMM_MCMC
, the
resulting object is equal to object
with the following
components being modified:
see GLMM_MCMC
see GLMM_MCMC
see GLMM_MCMC
see GLMM_MCMC
see GLMM_MCMC
see GLMM_MCMC
see GLMM_MCMC
see GLMM_MCMC
see GLMM_MCMC
see GLMM_MCMC
Additionally, new components are added, namely
a list with the posterior quantiles of
component probabilities. One list
component for each
quantile specified by prob
argument.
posterior sample of individual component
probabilities (also given random effects). It is an M \times
I\cdot K
matrix where M
is the length of the
posterior sample, I
is the number of subjects, and K
is the number of mixture components. Component labels correspond
to the relabelled sample. It is included in the
resulting object only if keep.comp.prob
argument is
TRUE
.
a matrix with the posterior means of component probabilities which are calculated with random effects integrated out.
a list with the posterior quantiles of
component probabilities. One list
component for each
quantile specified by prob
argument.
posterior sample of individual component
probabilities (with random effects integrated out). It is an M \times
I\cdot K
matrix where M
is the length of the
posterior sample, I
is the number of subjects, and K
is the number of mixture components. Component labels correspond
to the relabelled sample. It is included in the
resulting object only if keep.comp.prob
argument is
TRUE
.
Remark. These are the component probabilities which should normally be used for clustering purposes.
Arnošt Komárek arnost.komarek@mff.cuni.cz
Celeux, G. (1998). Bayesian inference for mixtures: The labelswitching problem. In: COMPSTAT 98 (eds. R. Payne and P. Green), pp. 227232. Heidelberg: PhysicaVerlag.
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, 5067.
Stephens, M. (1997). Bayesian methods for mixtures of normal distributions. DPhil Thesis. Oxford: University of Oxford. (Available from: http://stephenslab.uchicago.edu/publications.html (accessed on 05/02/2014)).
Stephens, M. (2000). Dealing with label switching in mixture models. Journal of the Royal Statistical Society, Series B, 62, 795809.
NMixMCMC
, GLMM_MCMC
.
## See also additional material available in
## YOUR_R_DIR/library/mixAK/doc/
## or YOUR_R_DIR/sitelibrary/mixAK/doc/
##  file PBCseq.R and
## https://www2.karlin.mff.cuni.cz/~komarek/software/mixAK/PBCseq.pdf
##
## ==============================================
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.