2010/1/26 Ben Bolker <bol...@ufl.edu> > julien martin <julemartin0320 <at> gmail.com> writes: > > > > > I am generating 1000 replicate data sets in R, each data set is then > > analyzed with WinBUGS in batch mode using R2WinBUGS. Unfortunately, > > occasionally some data sets lead WinBUGS to open a "trap" window; and the > > simulations are interrupted as result of the message. Is there any ways > to > > set R2WinBUGS so that it would ignore the trap message and proceed with > the > > simulations? > > I'm not sure -- I don't think so -- I don't remember if R hangs > or returns an error on a trap -- but you could try (1) try() > and (2) JAGS/R2jags > > A practical suggestion - run this in a loop, and save the output to a file at the end of each loop.
Also, if you're getting several trap messages with 100 replicates, you might want to tweak the what you're doing. e.g. set up initial values close to the posterior, and make sure your priors aren't too vague. Bob -- Bob O'Hara Biodiversity and Climate Research Centre Senckenberganlage 25 D-60325 Frankfurt am Main, Germany Tel: +49 69 798 40216 Mobile: +49 1515 888 5440 WWW: http://www.RNI.Helsinki.FI/~boh/ Blog: http://network.nature.com/blogs/user/boboh Google Wave: rni....@googlewave.com Journal of Negative Results - EEB: www.jnr-eeb.org [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.