3

I am doing several Bayesian analyses using R2WinBugs so I can put them in a for-loop. It works perfectly, R calls WinBugs, then the simulation starts and when it is done the results are saved and the next analysis starts. When I normally use WinBugs, without R, I can monitor the simulations already done in the update screen so I roughly know how fast it is going and how long it will take to finish. My question is: Is there an option with R2WinBugs, or maybe a different package, to call WinBugs in for loops and still force WinBugs to show the progress made?

I hope my question is clear :)

UserX
  • 115
  • 1
  • 1
  • 6
  • do you want to see the progress of winbugs or your for loop? It would be very easy to add a line in the loop to tell you which analysis you are doing. If there isn't an option in r2winbugs, you might have to edit the source code – rawr Feb 12 '14 at 11:37
  • The progress of WinBugs. – UserX Feb 12 '14 at 11:45
  • You could specify `debug=TRUE`? Also, I think runjags uses progress indicators, but you would have to adapt your code. Depending on your model, there are a few native R packages, such as MCMCglmm. – Maxim.K Feb 12 '14 at 12:17

1 Answers1

4

I don't think it is possible using R2WinBUGS. You can set debug=TRUE to follow the simulations in WinBUGS itself, but it will mess up your for loop as you will then need to quit WinBUGS manually after each model run.

BRugs shows the same progress as a WinBUGS log file,... as in you can run the model check, initialise parameters, compile the model and update the simulations with output printed in the R console.

guyabel
  • 8,014
  • 6
  • 57
  • 86