On 4 April 2012 05:35, Jack Tanner <ihok@hotmail.com> wrote:

> (Using BRugs 0.7-5, R 2.14.2 32-bit on 64-bit Windows 7, OpenBUGS 3.2.1)
>
> 1. BRugs crashes R for me as follows. Sorry about the lack of detail;
> please let
> me know if / how to supply a more useful bug report on this issue.
>
> fit <- BRugsFit(...)
> # BRugs and OpenBUGS runs fine, the parameter estimates are reasonable
> # across 3 chains
> samplesBgr("beta") # crash
> samplesBgr("beta", plot=FALSE) # also crash
>
> Have you plotted your histories? I haven't used samplesBgr() much, so I
don't know how stable it is (although I do know it's slow).



> 2. I'd like to run a bunch of models via BRugs, saving the state after
> each one,
> like so:
>
> for (m in models) {
>  fit <- BRugsFit(paste(m$modelname, ".bug"), ...)
>  save(fit, paste(m$modelname, ".RData))
> }
>
> After I load the saved fitted objects in a new R process, BRugs functions
> like
> samplesStats() no longer work. Is it possible to somehow load the saved
> objects
> and use samplesStats and other BRugs functions?
>
> samplesStats() calls internal OpenBUGS functions (not R functions), so
that would mean saving the whole BUGS run (like externalise in OpenBUGS
itself. From you code fit$Stats should give you the same as
sampleStats('*'): if you want more use BRugsFit(..., coda=T) and work with
the coda object it produces (check the documentation for BRugsFit and coda).

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.bik-f.de/root/index.php?page_id=219
Blog: http://blogs.nature.com/boboh
Journal of Negative Results - EEB: www.jnr-eeb.org

	[[alternative HTML version deleted]]

