6

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!

dave
  • 1,344
  • 10
  • 16
Jija
  • 995
  • 8
  • 13

3 Answers3

3

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.)

John
  • 31
  • 1
2

From the feedback on the newsgroup, it seems that JAGS is better suited for known distributions and composition of known distributions. Its faster / easier writing your own sampler in R for the rest.

Jija
  • 995
  • 8
  • 13
-1

Have you looked into WBDev?

http://www.winbugs-development.org.uk/

dave
  • 1,344
  • 10
  • 16
  • Here's something I found for Mac: http://quote.ucsd.edu/blogs/rogblog/2008/01/21/winbugs-on-mac-os-x-finally/ – dave Aug 11 '10 at 15:06
  • More... http://cddesjardins.wordpress.com/2009/06/15/openbugs-and-winbugs-on-mac-os-x/; http://hlplab.wordpress.com/2009/02/27/using-winbugs-on-an-ppc-osx-laptop-connected-to-a-linux-server/ – dave Aug 11 '10 at 15:07
  • From the feedback on the newsgroup, it seems that JAGS is better suited for known distributions and composition of known distributions. Its faster / easier writing your own sampler in R for the rest. – Jija Aug 21 '10 at 04:14