From: Rodney S. <rsp...@mc...> - 2009-03-03 19:53:52
|
Hi Gang: I didn't know if you had seen this. It sounds like it might be interesting. Rodney -------- Original Message -------- Subject: storing WinBUGS simulations in a R list] Date: Tue, 3 Mar 2009 00:03:37 +0000 From: BUGS automatic digest system <LIS...@JI...> Reply-To: lau...@YA... To: BU...@JI... Dear BUGS users, I have written a R function to store the MCMC simulations produced by WinBUGS in a R list. The code is available from here: http://forums.cirad.fr/logiciel-R/viewtopic.php?t=1749 I have nothing to gain from sharing this code - just hope this could help. Below are some explanations: By default, the R function bugs() from the R2WinBUGS package, 1) runs WinBUGS, 2) stores simulations in R, 3) produces summary statistics on simulations. The bugs() function could crash whereas WinBUGS works well. Or one could be interested only in running WinBUGS and storing the simulations; this could be achieved with option codaPkg=TRUE in the bugs() function and then applying the read.bugs() function for further output analysis using the coda package. The function read.winbugs() given in the document allows a more straightforward storing of the simulations in a R list, and this list allows a particularly easy access to the simulations, nice for further 'bare-hand' treatment of the simulations. Of course it is also possible to use both an available R function as well as my function read.winbugs() to get this friendly list. Hope this could help, Stéphane -- Rodney Sparapani Center for Patient Care & Outcomes Research (PCOR) Sr. Biostatistician http://www.mcw.edu/pcor 4 wheels good, 2 wheels better! Medical College of Wisconsin (MCW) WWLD?: What Would Lombardi Do? Milwaukee, WI, USA |