The R Journal: article published in 2013, volume 5:1

Translating Probability Density Functions: From R to BUGS and Back Again PDF download
David S. LeBauer, Michael C. Dietze and Benjamin M. Bolker , The R Journal (2013) 5:1, pages 207-209.

Abstract The ability to implement statistical models in the BUGS language facilitates Bayesian in ference by automating MCMC algorithms. Software packages that interpret the BUGS language include OpenBUGS, WinBUGS, and JAGS. R packages that link BUGS software to the R environment, including rjags and R2WinBUGS, are widely used in Bayesian analysis. Indeed, many packages in the Bayesian task view on CRAN (http://cran.r-project.org/web/views/Bayesian.html) depend on this integration. However, the R and BUGS languages use different representations of common probability density functions, creating a potential for errors to occur in the implementation or interpre tation of analyses that use both languages. Here we review different parameterizations used by the R and BUGS languages, describe how to translate between the languages, and provide an R function, r2bugs.distributions, that transforms parameterizations from R to BUGS and back again.

Received: 2013-02-082013-02-15; online 2013-06-17
CRAN packages: rjags, R2WinBUGS , CRAN Task Views implied by cited CRAN packages: Bayesian, gR, Cluster


CC BY 4.0
This article is licensed under a Creative Commons Attribution 3.0 Unported license .

@article{RJ-2013-020,
  author = {David S. LeBauer and Michael C. Dietze and Benjamin M.
          Bolker},
  title = {{Translating Probability Density Functions: From R to BUGS
          and Back Again}},
  year = {2013},
  journal = {{The R Journal}},
  url = {https://journal.r-project.org/archive/2013/RJ-2013-020/index.html},
  pages = {207--209},
  volume = {5},
  number = {1}
}