BUGS on the Web

There are an increasing number of sites that feature BUGS or WinBUGS examples. Here are the ones we know of. Please let us know of any other sites you're aware of.

Please also remember to thank the authors of these sites for generously sharing their hard-won expertise.

**See the remote-running page for how to call WinBUGS from other software.**

### Undergraduate and graduate courses on Bayesian methods, many using BUGS

(Our thanks to David Madigan for many of these)

- Kate Cowles's course at Iowa.
- Francesca Dominici's course at Johns Hopkins.
- Sujit Ghosh's course at NCSU.
- Dave Madigan's course at Rutgers.
- Ioannis Ntzoufras has made available the material (in Greek) for a course of Bayesian Statistics in the Msc in Biostatistics in the Medical School of Athens (taught jointly with Petros Dellaportas).
- Zhiyong Zhang's paper Linking WinBUGS and SAS,
- Mauro Gasparini's course at the Politecnico di Torino.
- The University of Minnesota offers Brad Carlin's courses on Spatial Biostatistics and Decision Theory/Data Analysis.
- Andrew Thomas and Bob O'Hara teach Probabilistic Modelling With WinBugs at the University of Helsinki. Lecture slides and WinBUGS examples are available (in English).
- Brani Vidakovic at Georgia Institute of Technology, Atlanta, offers an introductory course on Bayesian Statistics for Engineers
- Peter Lenk teaches Bayesian inference and MCMC at University of Michigan Business School

## Other tutorial material, usergroups, and books:

- Archive of the BUGS discussion list are searchable, containing several years worth of questions and answers about modelling with BUGS and WinBUGS.
- Peter Congdon's book Bayesian Statistical Modelling, now in its new second edition, uses WinBUGS in a very wide series of examples. Peter now has a second volume, Applied Bayesian Modelling, and a third book Bayesian Models for Categorical Data. It is possible to download the programs and data used in the books.
- Many of the methods used in the book Bayesian Survival Analysis, by Joseph Ibrahim, Ming-Hui Chen, and Debajyoti Sinha are implemented using BUGS and WinBUGS14; the book's website contains examples of code and data.
- Working Group "Bayes Methods" (formerly DEBUG) of the Biometric Society, German Region, offers an online search of relevant articles, book chapters, books and programs.
- Ioannis Ntzoufras has made available (in English) the MCMC tutorial of the 17th International Workshop on Statistical Modelling.
- Andrew Lawson, Bill Browne and Carmen Vidal Rodeiro have written Disease mapping with WinBUGS and MLwiN, for which a number of WinBUGS datasets and programs are available.
- George G. Woodworth has written
**Biostatistics: A Bayesian Introduction. Hoboken, N.J.: John Wiley & Sons, 2004**with extensive use of WinBugs examples and a 28-page Appendix, "Introduction to WinBUGS", and a web site with examples, data etc.. - Broemeling, L. D. (2007) Bayesian Biostatistics and Diagnostic Medicine, CRC Press
- Lawson, A. B. (2008) Bayesian Disease Mapping: hierarchical modeling in spatial epidemiology, CRC press, New York
- There is now a webpage for Ioannis Ntzoufras' "Bayesian Modeling Using WinBUGS" book; please click here to be taken to the site.
- Lunn, D., Jackson, C., Best, N., Thomas, A. and Spiegelhalter, D. (2012) The BUGS Book: A Practical Introduction to Bayesian Analysis, Chapman and Hall.

## Sites on particular topics include:

**Social science:**Simon Jackman's MCMC Resource for Social Scientists features a wide range of models concerned with ordered outcomes, missing data, random coefficients, generalized link functions, latent autoregressive structure and so on. WinBUGS code and Splus data files are provided, as well as tutorial papers on MCMC for social scientists.**Pharmacokinetics:**David Lunn's PKBugs Page contains details of an `add-on' to WinBUGS for pharmacokinetic modelling, developed by David Lunn at Imperial College. This can be run using WinBUGS 1.3.**Actuarial science:**Actuarial Modelling with MCMC and BUGS has been provided by David Scollnik in Calgary, and has a range of worked examples designed for an actuarial context but using models of much wider applicability. An excellent tutorial paper on WinBUGS can also be downloaded - better than the WinBUGS documentation!**Population genetics:**Kent Holsinger's Population Genetics course has a whole set of examples using WinBUGS for estimating inbreeding coefficients, selfing rates, analysing variability selection and so on. Kent also has a set of notes and WinBUGS code from the Summer Institute for Statistical Genetics at NC State, which form an introduction to using WinBUGS in population genetics.**Programs for analysing imperfect diagnostic tests:**The Epidemiologic Diagnostics group at UC Davis provide WinBUGS code and examples for analyzing data derived from imperfect diagnostic tests.**Complex epidemiological modelling:**Tom Smith at the Swiss Tropical Institute has models and documentation for 1) A latent class model for non-parametric resolution of a two component mixture, with a training set available for one component: 2) Two-state Hidden Markov Model with covariates 3) A non-linear regression model with Poisson errors in both x and y.

Brad Carlin's software page also has a variety of examples for longitudinal and spatial models**Archeology:**Andrew Millard's `WinBUGS and Bayesian tools for Archaeology' site shows how to use WinBUGS to analyse many Bayesian examples from the archeological literature.

## Software to run with BUGS:

Our own remote running page lists software that enables WinBUGS and OpenBUGS to be called from other programs. Below we list some other BUGS utilities which users have written.

- The CODA R package for convergence diagnostics and output analysis, maintained by Martyn Plummer, is available from CRAN.
- Brian Smith's Bayesian Output Analysis program can be used instead of CODA for analysing output from Classic BUGS or WinBUGS.
- SAS Macros for converting between BUGS and WinBUGS input and output files and SAS datasets have been written by Matt Hayat and Rodney Sparapani - with some recent updates by Rodney.
- A paper describing SAS Macros to convert SAS data to WinBUGS data by Zhiyong Zhang.
- Gene Hahn's BUS program is a Windows application that assists in exporting the results of a BUGS or WinBUGS run to other software packages such as Mathematica or Excel.
- Terry Elrod's R/S functions for writing R/S data in files suitable for WinBUGS.
- Sanjog Misra's Excel 2 Bugs add-in for writing Excel data in Bugs format.
- ESS (Emacs Speaks Statistics) is an intelligent interface for writing BUGS code using the Emacs or XEmacs editors. ESS knows the syntax and grammar of BUGS and provides consistent display and editing features automatically.
- This discussion explains various ways to import map data in the form of ArcView "shape files" into WinBUGS for spatial modelling.
- Wayne Thogmartin and colleagues have developed an extension for ArcGIS that helps users of WinBUGS develop the adjacency matrices they need for their CAR spatial models.
- Zhiyong Zhang's BAUW program converts text data into WinBUGS format: Zhiyong also has provided a complete SAS script for a Monte Carlo simulation study.

## Discussions about BUGS:

- Trends and Controversies article from IEEE on BUGS as a code generator program.