Extending JAGS: A tutorial on adding custom distributions to JAGS (with a diffusion model example) - Wabersich, Dominik; Vandekerckhove, Joachim (Behavior Research Methods, 2014)