[logo]
The BUGS Project
The BUGS Project
CODA readme
((((
Welcome Page
Latest News
Contact us/BUGS list
WinBUGS
New WinBUGS examples
The BUGS Book
FAQs
DIC
GeoBUGS
PKBUGS
Running from other software
BUGS resources online
WinBUGS development site
OpenBUGS site

Contents

What is CODA?

CODA stands for Convergence Diagnostic and Output Analysis software, and is a menu-driven set of S-Plus functions which serves as an output processor for the BUGS software. It may also be used in conjuction with Markov chain Monte Carlo output from a user's own programs, providing the output is formatted appropriately (see the CODA manual for details). CODA computes convergence diagnostics and statistical and graphical summaries for the samples produced by the Gibbs sampler.

IMPORTANT! CODA version 0.4 in S-Plus Version 5.0

CODA Version 0.4 crashes in Splus Version 5.0. If you are using S-plus Version 5.0 or above, you should not download CODA Version 0.4 from this page.

Three options are currently available:

  • Coda for R.

    Martyn Plummer has translated and further developed CODA for R, the freeware equivalent of S-plus. CODA version 0.5-1 for R can be obtained from his website.

    Directions on how to install R "packages" are given in the R FAQ.

  • BOA.

    Brian Smith has produced the BOA (Bayesian Output Analysis) suite of S-plus/R functions for analysis of MCMC output, which reads in output from Classic BUGS or WinBUGS. Version 0.5.0 is now available.

  • Amendments to Version 0.4.

    Brian Smith has very kindly made substantial revisions to CODA Version 0.4 to get rid of the problems caused by the use of global variables.

    The revised files can be seen as coda04bs1.s and globals04bs1.s. Both files need to be sourced into S-PLUS to get CODA working - i.e. with commands source("coda04bs1.s") and source("globals04bs1.s") The first is the core CODA v0.40 program with modifications to the way global variables are assigned and called. The second contains the library of functions needed to manage the global variables. It's best to save the files directly off the web site, just by clicking on the links above, or the alternatives coda04bs1.ssc and globals04bs1.ssc for DOS.

List of current facilities available in CODA

Graphical analyses

  • Plots of the sample trace for each variable in each chain
  • Plots of the kernel density estimate for each variable
  • Plots of the autocorrelation function for each variable in each chain
  • Plots of the cross-correlations between variables
  • Plots of Geweke (1992)'s diagnostic vs starting iteration number
  • Plots of Gelman and Rubin (1992)'s diagnostic vs final iteration number

Summary statistics

  • Empirical means, standard deviations and quantiles
  • Standard error of the mean using:
    • naive methods (assuming independent samples)
    • time-series methods to account for within-chain correlations
    • batch means method to account for within-chain correlations

Convergence diagnostics

  • Geweke (1992)
  • Gelman & Rubin (1992)
  • Raftery & Lewis (1992)
  • Heidelberger & Welch (1983)
  • Autocorrelations for each variable in each chain
  • Cross-correlations between variables

What do you get?

CODA is written as a suite of menu-driven S-Plus functions. It runs under S-Plus (copyright 1988, 1993 Statistical Sciences, Inc., Seattle, Washington, USA) version 3.0 and above, and is suitable for PC and UNIX environments. CODA users do not need any prior experience in using S-Plus since CODA is entirely menu-driven. The program is distributed as an ASCII textfile cdaprg04 which is loaded into S-Plus. A CODA manual is provided which gives details of each facility available in the program, and illustrates these with a simple example.

Obtaining files for UNIX systems

Directly from the Web page

Go to the download page and click on the relevant icon. A window will then appear giving you the option to save the file to a selected directory.

Unpacking files

You will need to uncompress and untar the file by typing
  uncompress cdaprg04.tar.Z
  tar xvpf cdaprg04.tar 
which will unpack the file into your current directory.

Obtaining files for PC WINDOWS systems

Directly from the Web page

Go to the download page and click on the relevant icon. A window will then appear giving you the option to save the file to a selected directory.

Unpacking files

Unpack the file by typing
cdaprg04 -o -d  <return>
The file contents will be extracted automatically and placed in your current directory. In some window systems it may be possible unpack the file by simply trying to open it.

© 1996-2012 BUGS
Hosted by the MRC Biostatistics Unit, Cambridge, UK
Site designed by Alastair Stevens
TOP