Trace plot for MCMC class

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 getSample, for example parametersOnly =F, or start = 1000

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")
#> BT runMCMC: trying to find optimal start and covariance values 
#> BT runMCMC: Optimization finished, setting startValues to 0.000227125450650522 0.000317660359002085 - Setting covariance to 0.999851432961918 0.000118471378443452 0.000118471378443452 0.999915431663783
#> Running Metropolis-MCMC, chain 1 iteration 100 of 2000 . Current logp: -8.714023 Please wait! Running Metropolis-MCMC, chain 1 iteration 200 of 2000 . Current logp: -8.040798 Please wait! Running Metropolis-MCMC, chain 1 iteration 300 of 2000 . Current logp: -7.858331 Please wait! Running Metropolis-MCMC, chain 1 iteration 400 of 2000 . Current logp: -10.72035 Please wait! Running Metropolis-MCMC, chain 1 iteration 500 of 2000 . Current logp: -10.18255 Please wait! Running Metropolis-MCMC, chain 1 iteration 600 of 2000 . Current logp: -8.271992 Please wait! Running Metropolis-MCMC, chain 1 iteration 700 of 2000 . Current logp: -8.035055 Please wait! Running Metropolis-MCMC, chain 1 iteration 800 of 2000 . Current logp: -9.183765 Please wait! Running Metropolis-MCMC, chain 1 iteration 900 of 2000 . Current logp: -8.860137 Please wait! Running Metropolis-MCMC, chain 1 iteration 1000 of 2000 . Current logp: -8.636479 Please wait! Running Metropolis-MCMC, chain 1 iteration 1100 of 2000 . Current logp: -9.460943 Please wait! Running Metropolis-MCMC, chain 1 iteration 1200 of 2000 . Current logp: -8.746797 Please wait! Running Metropolis-MCMC, chain 1 iteration 1300 of 2000 . Current logp: -9.188869 Please wait! Running Metropolis-MCMC, chain 1 iteration 1400 of 2000 . Current logp: -9.092286 Please wait! Running Metropolis-MCMC, chain 1 iteration 1500 of 2000 . Current logp: -9.186178 Please wait! Running Metropolis-MCMC, chain 1 iteration 1600 of 2000 . Current logp: -9.467755 Please wait! Running Metropolis-MCMC, chain 1 iteration 1700 of 2000 . Current logp: -8.659377 Please wait! Running Metropolis-MCMC, chain 1 iteration 1800 of 2000 . Current logp: -8.451637 Please wait! Running Metropolis-MCMC, chain 1 iteration 1900 of 2000 . Current logp: -14.70914 Please wait! Running Metropolis-MCMC, chain 1 iteration 2000 of 2000 . Current logp: -7.939853 Please wait!
#> runMCMC terminated after 0.619999999999891seconds
# plot the trace tracePlot(sampler = out, thin = 10)
tracePlot(sampler = out, thin = 50)