Scott,
Yes, this is possible, if you save all the parameters in your model.
You run for X iterations, then you use the simulated values as your
initial values in your next Bugs run. However, Bugs doesn't "know" that
you're doing this, so you have to burn-in again (to allow for its
adaptive algorithms to settle down).
Another possibility is to work within OpenBugs which is more flexible
this way.
Probably the easiest approach, though, is to run 5 chains, but one at a
time: i.e., set n.chains=1 in the bugs() run, then once all 5 calls to
Bugs have been finished, it's possible to combine the simulations
"manually" into a 3-way array and check convergence, grab simulations, etc.
Our function as.bugs.array() can actually be used for this.
Andrew
P.S. I'm cc-ing the Bugs list because others have thoughts on this.
Scott Desposato wrote:
> Hi Andrew:
>
> I've emailed you before for help, but it's been a while...
>
> Can you tell me if there is a way to save "work in progress" while
> running R2WinBUGS? I'm simulating a messy model with lots of data, and
> expect it will run for a week or two. I'd like to save out results
> every hour or two to make sure I don't lose everything if the lights
> go out in California.
>
> Thanks for any thoughts,
>
> Scott Desposato
> Assistant Professor
> Department of Political Science, UCSD
> 9500 Gilman Drive
> La Jolla, CA 92093-0521
> Phone: 858-534-0198
> FAX: 858-534-7130
> [log in to unmask]
> http://swd.ucsd.edu
--
Andrew Gelman
Professor, Department of Statistics
Professor, Department of Political Science
[log in to unmask]
www.stat.columbia.edu/~gelman
Statistics department office:
Social Work Bldg (Amsterdam Ave at 122 St), Room 1016
212-851-2142
Political Science department office:
International Affairs Bldg (Amsterdam Ave at 118 St), Room 731
212-854-7075
Mailing address:
1255 Amsterdam Ave, Room 1016
Columbia University
New York, NY 10027-5904
212-851-2142
(fax) 212-851-2164
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|