tracePlot {BayesianTools} | R Documentation |
Trace plot for MCMC class
Description
Trace plot for MCMC class
Usage
tracePlot(sampler, thin = "auto", ...)
Arguments
sampler |
an object of class MCMC sampler |
thin |
determines the thinning intervall of the chain |
... |
additional parameters to pass on to the |
See Also
marginalPlot
plotTimeSeries
correlationPlot
Examples
# set up and run the MCMC
ll <- function(x) sum(dnorm(x, log = TRUE))
setup <- createBayesianSetup(likelihood = ll, lower = c(-10, -10), upper = c(10,10))
settings <- list(iterations = 2000)
out <- runMCMC(bayesianSetup = setup, settings = settings, sampler = "Metropolis")
# plot the trace
tracePlot(sampler = out, thin = 10)
tracePlot(sampler = out, thin = 50)
# additional parameters can be passed on to getSample (see help)
tracePlot(sampler = out, thin = 10, start = 500)
# select parameter by index
tracePlot(sampler = out, thin = 10, start = 500, whichParameters = 2)
[Package BayesianTools version 0.1.8 Index]