How to get started with BUGS:  

Bayesian Inference Using Gibbs Sampling

You can get the software from the BUGS website.  There is a Windows version, WinBUGS, and a UNIX versions, Classic BUGS.  To have access to the full version of WinBUGS you need to register you copy, registration is free.

There are many helpful documents on the BUGS website that are useful in getting started. 

  1. The manuals for BUGS and CODA. 
  2. The surgical example is a good way to get familiar with Classic BUGS.
  3. Saghir Bashir has produced a set of tutorial slides on using Doodles and running WinBUGS 1.3, which can be downloaded as a pdf file.
  4. The FAQ page on the BUGS website is very useful.
  5. A tutorial by David Spiegelhalter on Bayesian Statistics and BUGS.
  6. References.

For posterior analysis there is CODA and BOA.

  1. CODA version 0.5-1 for R is now available from Martyn Plummer.
  2. Brian Smith has produced a new version of the BOA (Bayesian Output Analysis) suite of S-plus/R functions for analysis of MCMC output. Version 0.5.0 is now available.

The BUGS listserv

  1. An e-mail discussion list has been set up: send a one line message
    join bugs firstname(s) lastname to mailbase@mailbase.ac.uk

To get started with WinBUGS. 

  • Here are links to the regression example given in the BUGS manual.  RegressionBugs and RegressionDoodle.  You should download these files and then open them in WinBUGS.
  • The file RegressionBugs.odc contains a BUGS program.  The program contains a data, initial values, and model sections.
  • The file RegressionDoodle.odc contain a doodle of the regression model.
  • Here is another example.  AR3 and AR3Doodle.  Again you download these files and then open them in WinBUGS.
  • The file AR3.odc contains a BUGS program.  The program contains a data, initial values, and model sections.
  • The file AR3Doodle.odc contain a doodle of the regression model.
  • See Saghir Bashir's tutorial to get started.

To get started with Classic Bugs.

  • Here are links to the files need to run Classic BUGS.  reg.dat, reg.in, reg.bug, reg.cmd, reg.r, regcoda.r
  • Three files are needed to run Classic BUGS.  The four files are the *.dat file, which contains a list of the data, the *.in file, which contains the list of initial values, the *.bug file, which contains the BUGS program, and the *.cmd file, which contains the commands used to run Classic Bugs. 
  • The file regcoda.r is and R program (Splus program) which can be used with the library CODA to perform posterior analysis on the MCMC output.
  • A very useful R command (Splus command) is the dput( ) function which writes to a file a data object such as a matrix to a file.