The mcmcoutputperm class stores MCMC samples after relabeling (permuting).
Calling mcmcpermute() on an mcmcoutput class permutes the labels of the
components and generates an object of class mcmcoutputperm. Note, the
number of samples of the mcmcoutputperm object could be less than the
original number of MCMC samples due to some samples where both components
get assigned to the same label and henceforth get eliminated from further
analysis.
The class mcmcoutputperm is a class union and includes all classes that
define objects for permuted MCMC samples and is used to dispatch methods for
mcmcoutputperm objects. For the user this detail is not important,
especially as this class has no exported constructor. Objects are solely
constructed internally within the function mcmcpermute().
An object of class mcmcoutputperm inherits all slots from its parent class
mcmcoutput. In addition it contains slots that store
data from permutation. These slots are listed below
Similar to the contained classes mcmcoutput this class comes along with a couple of methods that should give the user some comfort in handling the permuted sampling results. There are no setters for this class as the slots are only set internally.
show() shows a short summary of the object's slots.
getMperm() returns the Mperm slot.
getParperm() returns the parperm slot.
getLogperm() returns the parperm slot.
getHyperperm() returns the hyperparm slot.
getPostperm() returns the postperm slot.
getEntropyperm() returns the entropyperm slot.
getSTperm() returns the STperm slot.
getSperm() returns the Sperm slot.
getNKperm() returns the NKperm slot.
Plotting functionality for the mcmcoutputperm class is so far only
implemented for mixtures of Binomial or Poisson distributions.
plotTraces() plots traces of relabeled MCMC sampling. See plotTraces()
for further information.
plotHist() plots histograms of relabeled parameters and weights. See
plotHist() for further information.
plotDens() plots densities of relabeled parameters and weights. See
plotDens() for further information.
plotPointProc() plots the point process of relabeled component
parameters. See plotPointProc for further information.
plotSampRep() plots the sampling representation of relabeled component
parameters. See plotSampRep() for further information.
plotPostDens() plots the posterior density of component parameters. Note
that this function can only be applied for mixtures of two components. See
plotPostDens() for further information.
Mperm An integer defining the number of permuted MCMC samples.
parperm A named list containing the permuted component parameter
samples from MCMC sampling.
relabel A character specifying the relabeling algorithm used for
permuting the MCMC samples.
weightperm An array of dimension MpermxK containing the
relabeled weight parameters. This slot is not available for models with
fixed indicators as weights do not get sampled for such models.
logperm A named list containing the mixture log-likelihood, the
prior log-likelihood, and for models with unknown indicators the complete
data posterior log-likelihood for the permuted MCMC samples.
hyperperm A named list containing the (permuted) parameters of the
hierarchical prior. This slot is only available, if a hierarchical prior
had been used for sampling, i.e. the slot hier of the
prior had been set to TRUE.
postperm A named list containing a named list par with array(s) of
parameters from the posterior density. This slot is only available if
the hyperparameter storepost in the mcmc object had been
set to TRUE.
entropyperm An array of dimension Mpermx1 containing the
entropy for each MCMC permuted draw. This slot is only available for
models with unknown indicators.
STperm An array of dimension Mpermx1 containing all permuted
MCMC states, for the last observation in slot y of the fdata object
passed in to mixturemcmc() where a state is defined for non-Markov
models as the last indicator of this observation. This slot is only
available for models with unknown indicators.
Sperm An array of dimension N x storeS containing the last
storeS permuted indicators. storeS is defined in the slot storeS
of the mcmc object passed into mixturemcmc(). This slot is only
available for models with unknown indicators.
NKperm An array of dimension Mperm x K containing the numbers
of observations assigned to each component. This slot is only available for
models with unknown indicators.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.