Extending JAGS: a tutorial on adding custom distributions to JAGS (with a diffusion model example)
Related Experiment Video
Updated: May 8, 2026

Synthesis of Cyclic Polymers and Characterization of Their Diffusive Motion in the Melt State at the Single Molecule Level
Published on: September 26, 2016
Dominik Wabersich1, Joachim Vandekerckhove
1Department of Cognitive Sciences, University of California, Irvine, CA, USA, dominik.wabersich@gmail.com.
Abstract:
We demonstrate how to add a custom distribution into the general-purpose, open-source, cross-platform graphical modeling package JAGS ("Just Another Gibbs Sampler"). JAGS is intended to be modular and extensible, and modules written in the way laid out here can be loaded at runtime as needed and do not interfere with regular JAGS functionality when not loaded. Writing custom extensions requires knowledge of C++, but installing a new module can be highly automatic, depending on the operating system. As a basic example, we implement a Bernoulli distribution in JAGS. We further present our implementation of the Wiener diffusion first-passage time distribution, which is freely available at https://sourceforge.net/projects/jags-wiener/ .
More Related Videos
Related Concept Videos
Distribution and Dispersion
Probability Distributions
A discrete probability distribution is a probability distribution of discrete random variables. It can be categorized into binomial probability distribution and Poisson probability...
Distributions to Estimate Population Parameter
Introduction to Normal Distributions
Parametric Survival Analysis: Weibull and Exponential Methods
Weibull Distribution
The Weibull distribution is a flexible model used in parametric survival analysis. It can handle both increasing and decreasing hazard rates, depending on its shape parameter...
Multicompartment Models: Overview
These models offer a more comprehensive representation of drug behavior in the body than one-compartment models. They accommodate the complexity of drug distribution,...

