coda_diag: Create multiple diagnostic graphics for a single parameter

Description Usage Arguments Value Author(s) See Also Examples

Description

coda_diag creates a graphic that includes three diagnostic plots to help monitor convergence of an MCMC chain for a parameter. By default the function will loop through all parameters in an mcmc.list object and create a single graphic of three diagnostic plots for each parameter.

Usage

1
coda_diag(coda.object, parameters = NULL)

Arguments

coda.object

an mcmc.list object

parameters

character vector of parameter names to create diagnostic plots for. If none are supplied all monitored parameters are included.

Value

A graphic with three diagnostic plots:

Author(s)

Michael Malick

See Also

traceplot density

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(coda)
data(line)

coda_diag(line)

coda_diag(line, parameters = "alpha")

coda_diag(line, parameters = "beta")

coda_diag(line, parameters = c("alpha", "beta"))

coda_diag(line, parameters = grep("sig", varnames(line), value = TRUE))

coda_diag(line, parameters = grep("a", varnames(line), value = TRUE))

coda_diag(line, parameters = c("alpha", grep("sig", varnames(line),
          value = TRUE)))

MichaelMalick/r-codatools documentation built on May 8, 2019, 9:56 a.m.