The mcmcoutput class stores all MCMC samples and corresponding information.
Calling mixturemcmc() on appropriate input arguments performs MCMC
sampling and returns an mcmcoutput object that stores all samples and
corresponding information like hyper-parameters, the finite mixture model
specified in a model object and the prior that specifies the prior
distribution. All slots are listed below. Note that not all slots must be
available in a object of class mcmcoutput. Some slots get only occupied,
if a hierarchical prior had been used in MCMC sampling, or if posterior
samples should be stored. Furthermore, the slots also look different, if
MCMC sampling had been performed for a model with fixed indicators (see for
subclasses for example mcmcoutputfix, mcmcoutputbase,
mcmcoutputhier or mcmcoutputpost).
The class mcmcoutput is a class union and includes all classes that
define objects to store MCMC samples and is used to dispatch methods for
mcmcoutput 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 mixturemcmc().
This class comes along with a couple of methods that should give the user some comfort in handling the MCMC 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.
getM() returns the M slot.
getBurnin() returns the burnin slot.
getRanperm() returns the ranperm slot.
getPar() returns the par slot.
gteWeight() returns the weight slot, if available.
getLog() returns the log slot.
getEntropy() returns the entropy slot, if available.
getHyper() returns the hyper slot, if available.
getPost() returns the post slot, if available.
getST() returns the ST slot, if available.
getS() returns the S slot, if available.
getNK() returns the NK slot, if available.
getClust() returns the clust slot, if available.
getModel() returns the model slot.
getPrior() returns the prior slot.
Plotting functionality for the mcmcoutput helps the user to inspect MCMC
results.
plotTraces() plots traces of MCMC samples. See plotTraces() for
further information.
plotHist() plots histograms of parameters and weights. See plotHist()
for further information.
plotDens() plots densities of parameters and weights. See plotDens()
for further information.
plotPointProc() plots the point process of component parameters. See
plotPointProc for further information.
plotSampRep() plots the sampling representation of 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.
M An integer defining the number of iterations in MCMC sampling.
burnin An integer defining the number of iterations in the burn-in
phase of MCMC sampling. These number of sampling steps are not stored
in the output.
ranperm A logical indicating, if MCMC sampling has been performed
with random permutations of components.
par A named list containing the sampled component parameters.
weight An array of dimension M x K containing the sampled
weights.
log A named list containing the values of the mixture log-likelihood,
mixture prior log-likelihood, and the complete data posterior
log-likelihood.
hyper A list storing the sampled parameters from the hierarchical
prior.
post A named list containing a list par that contains the posterior
parameters as named arrays.
entropy An array of dimension M x 1 containing the entropy
for each MCMC draw.
ST An array of dimension M x 1 containing all 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.
S An array of dimension N x storeS containing the last
storeS indicators sampled. storeS is defined in the slot storeS of
the mcmc object passed into mixturemcmc().
NK An array of dimension M x K containing the number of
observations assigned to each component for each MCMC draw.
clust An array of dimension N x 1 containing the recent
indicators defining the last "clustering" of observations into the
mixture components.
model The model object that specifies the finite mixture model for
which MCMC sampling has been performed.
prior The prior object defining the prior distributions for the
component parameters that has been used in MCMC sampling.
mcmcoutputperm for the corresponding class defined for relabeled MCMC samples
mcmcoutputfix for the mcmcoutput sub-class for models with
fixed indicators
mcmcoutputbase for the mcmcoutput sub-class for models with
unknown indicators
mcmcoutputhier for the mcmcoutput sub-class for MCMC samples
with hierarchical priors
mcmcoutputpost for the mcmcoutput sub-class for MCMC samples
with stored posterior density parameters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.