B Programming in R

Ruth King, Byron Morgan, Olivier Gimenez, Steve Brooks · 2009

We give a brief introduction to the computer package R, with particular focus on the coding of (RJ)MCMC algorithms. The example codes provided are intended to act as a building block, providing the basic structure of general (RJ)MCMC code, an understanding of the MCMC updating steps and their corresponding implementation. Unlike WinBUGS and MARK, all aspects of the MCMC algorithm need to be explicitly coded, using the R language. However, this does provide complete control over the MCMC simulations, with no constraints on the models fitted to the data. To demonstrate how to write an (RJ)MCMC program, we provide a general structure for the algorithms, which complements the detailed description of R code for the examples in Chapter 7. All R codes can be downloaded from the book’s Web site.

Read the paper · More papers on PaperTik