I set summarise = TRUE
in the function run.jags
, then saved the output object as save(out, file="out.RData")
.
When I later load this object I can retrieve the summaries, plots, etc.
However, when I use the exact same code and run the model, and save output on a Linux cluster, then later load the object in Windows to work with it, the summaries and plots are not available. When I type summary(out)
, print(out)
, plot(out)
, or add.summaries(out)
, I get the following error message:
Error: Invalid runjags.object provided; the output of a runjags function (with class 'runjags') must be supplied
This even though class(out)
returns "runjags"
.
In fact, names(out)
reveals that the summaries (and a lot of other stuff) is not included in the output. The help file does indicate that summaries/plots, etc, are included by default.
Is there something about running the model in Linux that 1) prevents summaries from being generated, or 2) messes up the class of the output object?
I can of course use the coda package and do out2 <- as.mcmc.list(out)
, then I can use coda function to work with the output.
The problem was not Linux (see comment by Matt Denwood), but an old version of runjags
. I updated runjags
on the Linux machine (well, I had the system admin do it), and that fixed the problem.