Abstract
The ability to implement statistical models in the BUGS language facilitates Bayesian inference 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 interpretation 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.
Cite
CITATION STYLE
LeBauer, D. S., Dietze, M. C., & Bolker, B. M. (2013). Translating probability density functions: From R to BUGS and back again. R Journal, 5(1), 207–209. https://doi.org/10.32614/rj-2013-020
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.