Learn R Programming

EMC2 (version 2.0.2)

plot_mcmc: Plot MCMC

Description

Uses the coda plot functions that are applied per chain

Usage

plot_mcmc(
  emc,
  selection = "mu",
  fun = "cumuplot",
  layout = NA,
  chain = 1,
  plot_type = NULL,
  ...
)

Value

A coda plot

Arguments

emc

An emc object

selection

A Character string. Indicates which parameter type to plot (e.g., alpha, mu, sigma2, correlation).

fun

A plot function that takes a vector/mcmc object as input, e.g. cumuplot, acf

layout

A vector indicating which layout to use as in par(mfrow = layout). If NA, will automatically generate an appropriate layout.

chain

Integer, which chain to include, if more than 1 will make separate plots per chain.

plot_type

type argument passed on to coda fun.

...

Optional arguments that can be passed to get_pars, the chosen coda plot function, or plot.default (see par())