runjags object is too big

本小妞迷上赌 提交于 2019-12-05 22:30:57
Matt Denwood

Objects of class runjags are pretty big, mostly because they store all the information (model/data/RNG states) required to continue a simulation where they left off. If all you want is the MCMC chains then you can get rid of most of this using:

as.mcmc.list(yourrunjagsobject)

...or to convert to something you can use with the rjags package directly:

as.jags(yourrunjagsobject)

See also ?runjagsclass

Or, if you have print/summary related storage problems and want to retain the model/data/RNG state, try summarise=FALSE and plot=FALSE to run.jags(), which will prevent pre-generation/storage of these during the initial function call.

You could also hack the class object to get rid of big components I guess, but much better to use the conversion methods provided...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!