Automatically detect burnin based on one of several methods.

getBurnin(
  jags_out,
  threshold = 1.1,
  use.confidence = TRUE,
  method = "moving.window",
  plotfile = "/dev/null",
  ...
)

Arguments

jags_out

List of MCMC sample matrices or mcmc.list object

threshold

Maximum value of Gelman diagnostic

use.confidence

Logical. If TRUE (default), use 95% confidence interval for Gelman Diagnostic. If FALSE, use the point estimate.

method

Character string indicating method. Options are "moving.window" (default) or "gelman.plot".

plotfile

path

...

Other parameters to methods

Details

See "gelman_diag_mw" and "gelman_diag_gelmanPlot"

Author

Alexey Shiklomanov, Michael Dietze

Examples

     z1 <- coda::mcmc(c(rnorm(2500, 5), rnorm(2500, 0)))
     z2 <- coda::mcmc(c(rnorm(2500, -5), rnorm(2500, 0)))
     z <- coda::mcmc.list(z1, z2)
     burnin <- getBurnin(z, threshold = 1.05)