Description Usage Arguments Value See Also Examples
Calling plotTraces()
plots the MCMC traces of the mixture log-likelihood
, the mixture log-likelihood of the prior distribution, the log-likelihood
of the complete data posterior, or the weights and parameters if lik
is
set to 1
.s
If lik
is set to 0
the parameters of the components and the posterior
parameters are plotted together with K-1
weights.
1 2 | ## S4 method for signature 'mcmcoutputpermfixpost'
plotTraces(x, dev = TRUE, lik = 1, col = FALSE, ...)
|
x |
An |
dev |
A logical indicating, if the plots should be shown by a graphical
device. If plots should be stored to a file set |
lik |
An integer indicating, if the log-likelihood traces should be
plotted (default). If set to |
col |
A logical indicating, if the plot should be colored. |
... |
Further arguments to be passed to the plotting function. |
A plot of the traces of the MCMC samples.
mixturemcmc()
for performing MCMC sampling
mcmcpermute()
for permuting MCMC samples
plotHist()
for plotting histograms of sampled values
plotDens()
for plotting densities of sampled values
plotSampRep()
for plotting sampling representations of sampled values
plotPointProc()
for plotting point processes for sampled values
plotPostDens()
for plotting the posterior density of component parameters
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# Define a Poisson mixture model with two components.
f_model <- model("poisson", par = list(lambda = c(0.3, 1.2)), K = 2,
indicfix = TRUE)
# Simulate data from the mixture model.
f_data <- simulate(f_model)
# Define the hyper-parameters for MCMC sampling.
f_mcmc <- mcmc()
# Define the prior distribution by relying on the data.
f_prior <- priordefine(f_data, f_model)
# Do not use an hierarchical prior.
setHier(f_prior) <- FALSE
# Start MCMC sampling.
f_output <- mixturemcmc(f_data, f_model, f_prior, f_mcmc)
f_outputperm <- mcmcpermute(f_output)
plotTraces(f_outputperm, lik = 0)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.