[R] how to update a bugs-model from inside R using R2WinBUGS

Frederic Holzwarth frederic.holzwarth at uni-leipzig.de
Thu Dec 2 13:01:03 CET 2010


I found a very simple way:
you start winbugs from R and state: debug=TRUE, start maybe with few
iterations, like 10.
If everything goes fine, open a new & empty "odc" document in winbugs. Now
scan the log file and find something like this:

update(10)
coda(*,C:/DOKUME~1/Frederic/LOKALE~1/Temp/Rtmp0Ey62L/coda)
stats(*)
history(*,C:/DOKUME~1/Frederic/LOKALE~1/Temp/Rtmp0Ey62L/history.odc)
save(C:/DOKUME~1/Frederic/LOKALE~1/Temp/Rtmp0Ey62L/log.odc)
save(C:/DOKUME~1/Frederic/LOKALE~1/Temp/Rtmp0Ey62L/log.txt)

copy all the lines (found in this order but interrupted by output) into the
new document.
Then start the document as script (model-> script). The only important
thing, however, is only the line "coda...", the update() can be filled with
howmany iterations you like.
On you go and, when you close winbugs, all the output should be read in by
R2winbugs into the R-object you indicated.

Frederic
-- 
View this message in context: http://r.789695.n4.nabble.com/how-to-update-a-bugs-model-from-inside-R-using-R2WinBUGS-tp2288880p3068980.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list