Search code examples
rjagsrunjags

Unable to extract DIC


I am using runjags and am trying to get the DIC for my model.

I know that if I print the runjags object it will return the model summary which would include the DIC, but my model a lot of variables, so calculating the summary statistics is taking a long time. When I use summarise=FALSE the DIC is not returned.

I have tried using: extract(runJagsObj, what='dic')

But it returns this error message: "Error: Please supply column name"

Is there a way to either see the DIC in the summary information without having to calculate the summary statistics for every variable? Or why is extract not working?

I'm using method=parallel if that is helpful information.


Solution

  • I finally figured out the "Error: Please supply column name" error.

    I was using ggmcmc for plotting which requires tidyr. Tidyr has a naming overlap with extract. I was able to resolve the naming conflict by loading runjags after ggmcmc which resolved the error.