0

I have looked everywhere and I still cannot find a function in R that can help me write a coda file from a mcmc object. I am running OpenBUGS in R using the R2OpenBUGS package:

output <- bugs(...)

Then after some manipulation, I am left with an object called chain_mat that has class mcmc. This object is rather long (over 2 million rows) so I want to create a coda file to save the draws. I am aware you can create coda files directly from the bugs function but I need to do some manipulations first, before I can create the file.

Any ideas would be greatly appreciated.

Santiago
  • 37
  • 5
  • 1
    It would be easier to help if you provided a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). See [how to ask a good question](http://stackoverflow.com/help/how-to-ask). – MrFlick Sep 05 '14 at 04:15
  • `mcmclist2coda` in the sirt package? – guyabel Sep 05 '14 at 07:59
  • 1
    @gjabel I was able to write my own function using the function you provided in your comment, thank you! – Santiago Sep 09 '14 at 20:25

0 Answers0