plotBgr {BRugs}R Documentation

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.

Details

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

Value

Data frame with elements

Iteration

end iteration of corresponding bin

pooledChain80pct)

80pct interval (normalized) of pooled chains

withinChain80pct

80pct interval (normalized) of mean within chain

bgrRatio

BGR ratio

See Also

samplesBgr, BRugs, help.WinBUGS


[Package BRugs version 0.9-2.1 Index]