Draft:BUGS language
Review waiting, please be patient.
This may take 4 months or more, since drafts are reviewed in no specific order. There are 4,514 pending submissions waiting for review.
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
Reviewer tools
|
| BUGS | |
|---|---|
| Paradigm | Declarative, probabilistic programming |
| Designed by | David Spiegelhalter, Andrew Thomas, Nicky Best, Wally Gilks |
| Developer | MRC Biostatistics Unit, University of Cambridge |
| First appeared | 1989 |
| Influenced by | |
| Gibbs sampling, Bayesian inference | |
| Influenced | |
| JAGS, Stan, NIMBLE, Turing | |
BUGS (Bayesian inference Using Gibbs Sampling) is a declarative programming language and associated software framework for specifying and fitting complex Bayesian statistical models via Markov chain Monte Carlo (MCMC) methods. Conceived in 1989 at the MRC Biostatistics Unit, University of Cambridge, BUGS has been influential for over 30 years in enabling routine use of Bayesian methods across many scientific disciplines.
Overview
[edit]The BUGS language allows users to specify graphical models in a declarative style: the user describes the probabilistic structure of a model and the software automatically selects appropriate MCMC algorithms — primarily Gibbs sampling — to estimate the posterior distribution of model parameters.
The language is built around two core concepts:
- A declarative model specification, in which the user describes conditional relationships among variables rather than writing procedural simulation code.
- Automatic MCMC, in which the software selects updating algorithms based on the structure of the model, without requiring the user to implement samplers manually.
History
[edit]The BUGS project began in 1989 at the MRC Biostatistics Unit in Cambridge, UK [1]. The first implementation, ClassicBUGS, was described by Spiegelhalter et al. in 1996 [2]. Development subsequently produced WinBUGS, released in 1997 [3], which introduced a graphical interface including a "Doodle Editor" for constructing models visually. OpenBUGS, an open-source implementation, followed in 2005. The most recent major implementation, MultiBUGS, adds support for parallel computation [4]. The BUGS language and its use for statistical modelling is described in detail in a dedicated textbook.[5]
Implementations
[edit]ClassicBUGS
[edit]The original implementation of the BUGS language, available for Unix systems. Described by Spiegelhalter et al. (1996).
WinBUGS
[edit]Released in 1997 by the BUGS Project — a team of British researchers at the MRC Biostatistics Unit, Cambridge, and Imperial College School of Medicine, London — WinBUGS was the first widely adopted implementation. It introduced graphical model specification via "Doodles" and ran under Microsoft Windows. The final version, 1.4.3, was released in August 2007 and is no longer under active development.
OpenBUGS
[edit]OpenBUGS is the open-source successor to WinBUGS, initially released in 2005 and developed by the OpenBUGS Foundation. It runs on Windows, Linux, and macOS (via Wine), and is licensed under the GNU General Public License. The stable release is version 3.2.3 (2014); it is no longer actively developed.
MultiBUGS
[edit]MultiBUGS extends the OpenBUGS codebase with support for parallel computation, enabling faster Bayesian inference on modern multi-core hardware. It automatically parallelises the MCMC algorithm without requiring users to write parallel code. It is hosted on GitHub and described in Goudie et al. (2020) [4].
Language syntax
[edit]BUGS model specifications are written in a declarative style. Stochastic relationships are expressed using the ~ symbol (indicating a probability distribution), while deterministic relationships use <-. A simple example:
model {
# Likelihood
for (i in 1:N) {
y[i] ~ dnorm(mu, tau)
}
# Priors
mu ~ dnorm(0, 0.001)
tau ~ dgamma(0.001, 0.001)
sigma <- 1 / sqrt(tau)
}
Interfaces with R
[edit]Several R packages provide interfaces to BUGS implementations:
- R2WinBUGS – interface to WinBUGS
- R2OpenBUGS – interface to OpenBUGS
- R2jags – interface to JAGS, a BUGS-compatible alternative
- R2MultiBUGS – interface to MultiBUGS
Legacy and influence
[edit]The BUGS project has been highly influential in enabling the routine use of Bayesian methods across many scientific disciplines.[6] The core implementations (WinBUGS and OpenBUGS) are no longer actively developed, though they remain available and are still used in teaching and legacy research workflows.
The declarative modelling approach pioneered by BUGS has been widely adopted by successor probabilistic programming frameworks. The BUGS language itself continues to be supported through JAGS, which accepts BUGS-syntax model specifications and is actively maintained as a cross-platform alternative [7]. Other actively developed successors include:
- Stan – uses gradient-based Hamiltonian Monte Carlo sampling and has a large community of users[8].
- NIMBLE – adopts and extends the BUGS language, additionally allowing users to write and customise their own sampling algorithms [9].
- Turing – a probabilistic programming framework for the Julia language [10].
References
[edit]- ^ Lunn, David; Spiegelhalter, David; Thomas, Andrew; Best, Nicky (2009). "The BUGS project: Evolution, critique and future directions". Statistics in Medicine. 28 (25): 3049–3067. doi:10.1002/sim.3680. PMID 19630097.
- ^ Spiegelhalter, David J.; Thomas, Andrew; Best, Nicky G.; Gilks, Wally R. (1996). BUGS 0.5: Bayesian inference using Gibbs sampling manual (version ii). Cambridge: MRC Biostatistics Unit.
- ^ Lunn, David J.; Thomas, Andrew; Best, Nicky; Spiegelhalter, David (2000). "WinBUGS – A Bayesian modelling framework: concepts, structure, and extensibility". Statistics and Computing. 10 (4): 325–337. doi:10.1023/A:1008929526011.
- ^ a b Goudie, Robert J.B.; Turner, Rebecca M.; De Angelis, Daniela; Thomas, Andrew (2020). "MultiBUGS: A Parallel Implementation of the BUGS Modeling Framework for Faster Bayesian Inference". Journal of Statistical Software. 95 (7): 1–20. doi:10.18637/jss.v095.i07. PMC 7116196. PMID 33071678.
- ^ Lunn, David; Jackson, Chris; Best, Nicky; Thomas, Andrew; Spiegelhalter, David (2012). The BUGS Book: A Practical Introduction to Bayesian Analysis. CRC Press. ISBN 978-1-58488-849-9.
- ^ "The BUGS Project". MRC Biostatistics Unit, University of Cambridge. 5 December 2024. Retrieved 2026-06-15.
- ^ "JAGS: Just Another Gibbs Sampler". Retrieved 2026-06-15.
- ^ "Stan: Software for Bayesian Data Analysis". Retrieved 2026-06-15.
- ^ "NIMBLE: An R Package for Programming with BUGS Models". Retrieved 2026-06-15.
- ^ "The Turing Language". Retrieved 2026-06-15.
External links
[edit]- The BUGS Project – MRC Biostatistics Unit, University of Cambridge
- MultiBUGS
- BUGS mailing list
Category:Bayesian statistics Category:Statistical software Category:Domain-specific programming languages
