Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to define custom distributions in JAGS?

Tags:

linux

macos

mcmc

I am using JAGS for simulating some MCMC distributions. I see the support for a sizeable set of distributions. But, I would like to sample out of a specific distribution that is not defiend in JAGS. Does anyone know how to write our own custom distributions?

Thanks!

like image 896
Jija Avatar asked Jul 27 '10 08:07

Jija


1 Answers

Either the "zeroes trick" or the "ones trick" will do the job for you; see the WinBUGS documentation online for how to set these up. (WinBUGS is, as you almost certainly know, almost identical to JAGS syntatically, with a few exceptions noted in the JAGS documentation and irrelevant to the two tricks above.)

like image 158
John Avatar answered Oct 06 '22 00:10

John