Site icon R-bloggers

General-purpose MCMC draw saver for R

[This article was first published on [the] joint posterior distribution, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
If you do MCMC with R, you probably know how nasty “bookkeeping” of draws can be. So I quickly coded up a small function which does everything for you. Every parameter has to begin with “mcmc_” or another to-be-defined string, then just run mcmcsave( ITERATION , # ITERATIONS).

I also though about using lists. However, since this code actually costs speed I guess it’s for quick shots only anyway.


To leave a comment for the author, please follow the link and comment on their blog: [the] joint posterior distribution.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.