Re-labeling the MCMC output of the mixture model
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.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 re-labeling algorithm. |
par |
additional parameters for particular re-labeling 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 re-display 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:
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 x n*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 re-labelled 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:
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 x I*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 re-labelled 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 x I*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 re-labelled 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[AT]mff.cuni.cz
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://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, 795-809.
## See also additional material available in ## YOUR_R_DIR/library/mixAK/doc/ ## or YOUR_R_DIR/site-library/mixAK/doc/ ## - file PBCseq.R and ## http://www.karlin.mff.cuni.cz/~komarek/software/mixAK/PBCseq.pdf ## ## ==============================================
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.