conv.diag {BGVAR}R Documentation

MCMC Convergence Diagnostics

Description

This function invokes Geweke's CD using the coda package. Geweke (1992) proposed a convergence diagnostic for Markov chains based on a test for equality of the means of the first and last part of a Markov chain (by default we use the first 10% and the last 50%). If the samples are drawn from the stationary distribution of the chain, the two means are equal and Geweke's statistic has an asymptotically standard normal distribution.

The test statistic is a standard Z-score: the difference between the two sample means divided by its estimated standard error. The standard error is estimated from the spectral density at zero and so takes into account any autocorrelation.

Usage

conv.diag(gvar.obj)

Arguments

gvar.obj

An objected fitted by function bgvar.

Value

Note

Depends on the coda package.

Author(s)

Martin Feldkircher

References

Geweke, J. (1992) Evaluating the accuracy of sampling-based approaches to calculating posterior moments. In Bayesian Statistics 4 (ed JM Bernado, JO Berger, AP Dawid and AFM Smith). Clarendon Press, Oxford, UK.

See Also

geweke.diag in the coda package.

Examples

library(BGVAR)
data(monthlyData)
model.sims<-bgvar(Data=new.data,W=W,saves=100,burns=100,plag=1,hyperparm=NULL,Cpu=1,prior="SIMS",save_thin=1,eigen=TRUE,logfile=FALSE,stats=TRUE,trim=1.05)
geweke<-conv.diag(model.sims)

[Package BGVAR version 1.1.3 Index]