Blame | Last modification | View Log | Download | RSS feed
\name{geweke.diag}\alias{geweke.diag}%\alias{print.geweke.diag}\title{Geweke's convergence diagnostic}\usage{geweke.diag(x, frac1=0.1, frac2=0.5)}\arguments{\item{x}{an mcmc object}\item{frac1}{fraction to use from beginning of chain}\item{frac2}{fraction to use from end of chain}}\value{Z-scores for a test of equality of meansbetween the first and last parts of the chain. A separatestatistic is calculated for each variable in each chain.}\description{Geweke (1992) proposed a convergence diagnostic for Markov chainsbased on a test for equality of the means of the first and last partof a Markov chain (by default the first 10\% and the last 50\%). If thesamples are drawn from the stationary distribution of the chain, the twomeans are equal and Geweke's statistic has an asymptotically standardnormal distribution.The test statistic is a standard Z-score: the difference between thetwo sample means divided by its estimated standard error. The standarderror is estimated from the spectral density at zero and so takes intoaccount any autocorrelation.The Z-score is calculated under the assumption that the two parts ofthe chain are asymptotically independent, which requires that the sumof \code{frac1} and \code{frac2} be strictly less than 1.}\seealso{\code{\link{geweke.plot}}.}\references{Geweke, J. Evaluating the accuracy of sampling-based approachesto calculating posterior moments. In \emph{Bayesian Statistics 4}(ed JM Bernado, JO Berger, AP Dawid and AFM Smith). Clarendon Press,Oxford, UK.}\keyword{htest}