|
2 | 2 | [](https://TuringLang.github.io/JuliaBUGS.jl/stable)
|
3 | 3 | [](https://TuringLang.github.io/JuliaBUGS.jl/dev)
|
4 | 4 |
|
5 |
| -A modern implementation of the [BUGS](https://en.wikipedia.org/wiki/WinBUGS) probabilistic programming language in Julia. |
| 5 | +**JuliaBUGS.jl** is a modern, high-performance implementation of the [BUGS](https://en.wikipedia.org/wiki/WinBUGS) probabilistic programming language in [Julia](https://julialang.org/). It brings the familiar BUGS modelling syntax into the Julia ecosystem, enabling Bayesian inference with speed, flexibility, and seamless integration with the scientific computing ecosystem in Julia. |
6 | 6 |
|
7 |
| -For a working example, follow this [link](https://turinglang.org/JuliaBUGS.jl/stable/example). |
| 7 | +--- |
8 | 8 |
|
9 |
| -Try [DoodleBUGS](https://turinglang.org/JuliaBUGS.jl/DoodleBUGS/) for a browser-based interface for drawing BUGS models. |
| 9 | +## Why JuliaBUGS? |
10 | 10 |
|
11 |
| -See also, [JAGS](https://sourceforge.net/p/mcmc-jags/code-0/ci/default/tree/) and [Nimble](https://r-nimble.org/). |
| 11 | +- **BUGS syntax** — write models using standard BUGS notation. |
| 12 | + |
| 13 | +- **Julia performance** — leverage Julia’s speed and just-in-time (JIT) compilation. |
| 14 | + |
| 15 | +- **Interoperability with Julia ecosystem** — works smoothly with MCMC algrorithms from [Turing.jl](https://turinglang.org/) and the broader Julia PPL ecosystem. |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## Quick Start |
| 20 | + |
| 21 | +A simple example model: |
| 22 | + |
| 23 | +```julia |
| 24 | +using JuliaBUGS, Random, AbstractMCMC |
| 25 | + |
| 26 | +model = JuliaBUGS.@bugs""" |
| 27 | +model { |
| 28 | + for (i in 1:N) { |
| 29 | + y[i] ~ dnorm(mu, tau) |
| 30 | + } |
| 31 | + mu ~ dnorm(0, 0.001) |
| 32 | + tau ~ dgamma(0.1, 0.1) |
| 33 | +} |
| 34 | +""" |
| 35 | + |
| 36 | +posterior = compile(model, (; N = 10, y = randn(10))) |
| 37 | + |
| 38 | +chain = AbstractMCMC.sample(rng, posterior, JuliaBUGS.IndependentMH(), 1000) |
| 39 | +``` |
| 40 | + |
| 41 | +For a complete walkthrough, see the [example](https://turinglang.org/JuliaBUGS.jl/stable/example). |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +## **Related Tools** |
| 46 | + |
| 47 | +- [**DoodleBUGS**](https://turinglang.org/JuliaBUGS.jl/DoodleBUGS/) — a browser-based interface for drawing BUGS models. |
| 48 | +- [**RJuliaBUGS**](https://mateusmaiads.github.io/rjuliabugs/) — an R interface to JuliaBUGS. |
| 49 | + |
| 50 | +For alternative BUGS-family tools, see [JAGS](https://sourceforge.net/p/mcmc-jags/code-0/ci/default/tree/) and [Nimble](https://r-nimble.org/). |
0 commit comments