Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

geweke.plot

Geweke-Brooks plot


Description

If geweke.diag indicates that the first and last part of a sample from a Markov chain are not drawn from the same distribution, it may be useful to discard the first few iterations to see if the rest of the chain has "converged". This plot shows what happens to Geweke's Z-score when successively larger numbers of iterations are discarded from the beginning of the chain. To preserve the asymptotic conditions required for Geweke's diagnostic, the plot never discards more than half the chain.

The first half of the Markov chain is divided into nbins - 1 segments, then Geweke's Z-score is repeatedly calculated. The first Z-score is calculated with all iterations in the chain, the second after discarding the first segment, the third after discarding the first two segments, and so on. The last Z-score is calculated using only the samples in the second half of the chain.

Usage

geweke.plot(x, frac1 = 0.1, frac2 = 0.5, nbins = 20,
            pvalue = 0.05, auto.layout = TRUE, ask, ...)

Arguments

x

an mcmc object

frac1

fraction to use from beginning of chain.

frac2

fraction to use from end of chain.

nbins

Number of segments.

pvalue

p-value used to plot confidence limits for the null hypothesis.

auto.layout

If TRUE then, set up own layout for plots, otherwise use existing one.

ask

If TRUE then prompt user before displaying each page of plots. Default is dev.interactive() in R and interactive() in S-PLUS.

...

Graphical parameters.

Note

The graphical implementation of Geweke's diagnostic was suggested by Steve Brooks.

See Also


coda

Output Analysis and Diagnostics for MCMC

v0.19-4
GPL (>= 2)
Authors
Martyn Plummer [aut, cre, trl], Nicky Best [aut], Kate Cowles [aut], Karen Vines [aut], Deepayan Sarkar [aut], Douglas Bates [aut], Russell Almond [aut], Arni Magnusson [aut]
Initial release
2020-09-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.