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

Original language | English (US) |
---|---|

Pages (from-to) | 207-209 |

Number of pages | 3 |

Journal | R Journal |

Volume | 5 |

Issue number | 1 |

State | Published - Sep 4 2013 |

### Fingerprint

### ASJC Scopus subject areas

- Statistics and Probability
- Numerical Analysis
- Statistics, Probability and Uncertainty

### Cite this

*R Journal*,

*5*(1), 207-209.