[R] MCMC

Douglas Bates bates at stat.wisc.edu
Thu Mar 16 17:17:29 CET 2000


Martyn Plummer <plummer at iarc.fr> writes:

> On 16-Mar-00 John Logsdon wrote:

> > Does anyone know of any R coding/functions for MCMC approaches?  I am
> > currently using BUGS but I wonder if the bazaar has produced anything?  I
> > think I am pushing BUGS to it's limit and possibly past it at the moment.

> I don't think you will find anything as polished as BUGS, but the
> components are available for you to write your own custom MCMC program.
> You have to do a lot of work by hand that is normally done by BUGS, e.g.
> specifying full conditionals, writing the functions for logical
> nodes, recognizing conjugate distributions, tuning the Gibbs sampler, etc.

> * libnmath contained within R provides plenty of functions for simulating
>   random variables from commonly used distributions.  Brian Ripley has
>   kindly modified this so that it can be built separately. Using this you
>   can handle conjugate distributions.

> * Wally Gilks has made publically available software for doing Adaptive
>   Rejection Metropolis sampling which can be downloaded from the MRC-BSU
>   web site.  Using this you can handle more difficult cases:
>   http://www.mrc-bsu.cam.ac.uk/Software/arsregister.shtml
>   Some tuning is required for optimal performance.

> I have used this approach on a small problem, and have an increased
> appreciation of BUGS for having done so.

I don't know of any R code or packages presently available for MCMC.
However, it would be a very interesting project to design such code,
either for R or for omegahat.  The concept of a function closure in R
could be quite helpful.  I think Ross Ihaka and/or Robert Gentleman
wrote a paper once on how a Bayesian model would naturally be
expressed as a function closure.  

It took me a long time to understand what a function closure is and
why it would be useful (my thanks for Robert Gentleman and Duncan
Temple Lang for explaining it to me - repeatedly) but for applications
like this it is definitely worth the time to learn about it.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list