Learn R Programming

BRugs (version 0.8-0)

plotBgr: Plot the Gelman-Rubin convergence statistic for a scalar variable

Description

This function calculates and plots the Gelman-Rubin convergence statistic for a scalar variable, as modified by Brooks and Gelman (1998).

Usage

plotBgr(node, plot = TRUE, main = NULL, xlab = "iteration", 
    ylab = "bgr", col = c("red", "blue", "green"), bins = 50, 
    ...)

Arguments

node
Character, name of a scalar variable in the model.
plot
Logical, whether to plot the BGR statistics or only return the values. If TRUE, values are returned invisibly.
main, xlab, ylab
annotation, see plot.default
col
Colours, see Details Section in samplesBgr.
bins
Number of blocks
...
Further graphical parameters as in par.

Value

  • Data frame with elements
  • Iterationend iteration of corresponding bin
  • pooledChain80pct)80pct interval (normalized) of pooled chains
  • withinChain80pct80pct interval (normalized) of mean within chain
  • bgrRatioBGR ratio

Details

Acts on a scalar variable. See the wrapper function samplesBgr for more details.

See Also

samplesBgr, BRugs, help.WinBUGS