Description Arguments Details Value See Also Examples
plotDens()
is a class method for mcmcoutput and
mcmcoutputperm objects. For the former class it
plots densities of MCMC samples and for the latter of the corresponding
permuted samples coming from relabeling.
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 |
... |
Further arguments to be passed to the plotting function. |
Calling plotDens()
plots densities of the sampled parameters and weights
from MCMC sampling. Note, for relabeled MCMC samples this method is so far
only implemented for mixtures of Poisson and Binomial distributions.
In case that hierarchical priors had been used in MCMC sampling densities of the sampled parameters of the hierarchical prior are added to the plot.
In case that posterior density parameters had been stored in MCMC sampling, densities of these parameters are added to the plot.
Densities of the MCMC samples.
mixturemcmc()
for performing MCMC sampling
mcmcpermute()
for permuting MCMC samples
plotTraces()
for plotting the traces 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
mcmcoutput for the class definition of mcmcoutput
mcmcoutputperm for the class definition of mcmcoutputperm
1 2 3 4 5 6 7 8 9 10 11 12 | # Define a Poisson mixture model with two components.
f_model <- model("poisson", par = list(lambda = c(0.3, 1.2)), K = 2)
# 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)
# Start MCMC sampling.
f_output <- mixturemcmc(f_data, f_model, f_prior, f_mcmc)
f_outputperm <- mcmcpermute(f_output)
plotDens(f_outputperm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.