[R] R, Coda, and OpenBUGS

Frank E Harrell Jr f.harrell at vanderbilt.edu
Wed Oct 7 14:48:50 CEST 2009


Have you tried the rjags package which uses the jags system?  It is much 
more integrated into R and works quite well.  It uses the same modeling 
language as BUGS.  It is also better supported than OpenBUGS.

Frank

Bill Halteman wrote:
> Hi All,
> 
>   I am trying to figure out how to use R-Coda with the output from 
> OpenBugs. I have installed and loaded the packages BRugs and R2WinBUGS.  
> I have successfully run a simple Bayes model in WinBUGS using R2WinBUGS' 
> "bugs" and have used "read.bugs" to build the coda object.  I can 
> successfully switch to OpenBugs and run the same model and get the basic 
> summary back.  However, I cannot build the coda object.  From what I 
> have read "read.openbugs" should do the trick.  However, I have 
> discovered the current version of OpenBUGS (v 3.03) doesn't write any 
> output files in spite of setting codaPkg=TRUE in the "bugs" call.  
> "Str(openbugs.object)" reveals a large collection of elements, one of 
> which is an array that contains the MCMC chains.  Is there a function to 
> build the coda object?
> 
> Thanks in advance for any suggestions,
> 
> Bill Halteman
> 

-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University




More information about the R-help mailing list