# JAGS

> Just Another Gibbs Sampler: MCMC for Bayesian hierarchical models

Source: https://talira.ai/catalog/jags-f2sywqaj
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library
- Categories: [libraries / math / statistics](https://talira.ai/categories/libraries/math/statistics), [languages / r](https://talira.ai/categories/languages/r)
- Licence: GPL-2.0-only[^3][^4]
- Pricing: Free and open source[^3]
- Free tier: yes[^3]
- Backed by: [Martyn Plummer](https://talira.ai/orgs/martyn-plummer.md)

JAGS (Just Another Gibbs Sampler) is a program for analysing Bayesian hierarchical models with Markov chain Monte Carlo simulation, much like BUGS. It was written as a cross-platform engine for the BUGS modelling language, to be extensible with user-written functions, distributions and samplers, and as a platform for experimenting with Bayesian modelling. Its author, Martyn Plummer, also maintains rjags, the R interface on CRAN.

## Links

- Website: https://mcmc-jags.sourceforge.io/
- Docs: https://mcmc-jags.sourceforge.io/

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/jags>[^1]
- [APT](https://talira.ai/catalog/apt-d7essv0z.md): <https://packages.debian.org/stable/jags>[^2]

## Problems it solves

- fit a Bayesian hierarchical model with Gibbs sampling
- run BUGS models on Linux or macOS
- Bayesian MCMC from R with a BUGS-style model

## Features

- MCMC (Gibbs sampling) for Bayesian hierarchical models
- BUGS modelling language
- extensible with custom functions, distributions and samplers
- rjags R interface

## Trust

Overall: 0.44 out of 1.
Signals: maintenance 0.73, adoption 0.57, backing 0.30, extensibility 0.00.

- latest package release 9 days ago (CRAN rjags 5-5)
- packages released for 18 years
- 33k package downloads a month (CRAN)
- 98 Homebrew installs in 30 days
- backed by Martyn Plummer

## Alternatives

- [Stan](https://talira.ai/catalog/stan-rerqryze.md): Probabilistic programming language for Bayesian statistical modelling
- [CmdStan](https://talira.ai/catalog/cmdstan-0kddshy5.md): Command-line interface to Stan for compiling and running Bayesian models
- [RStan](https://talira.ai/catalog/rstan-0xp4m55p.md): R interface to Stan, for Bayesian inference

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 29 Nov 2026)
[^2]: https://deb.debian.org/debian/dists/stable/main/source/Sources.xz (checked 29 Nov 2026)
[^3]: https://mcmc-jags.sourceforge.io/ (checked 29 Nov 2026)
[^4]: https://cran.r-project.org/web/packages/rjags/index.html (checked 29 Nov 2026)
