4

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.

Jaap
  • 81,064
  • 34
  • 182
  • 193
rackhamup
  • 598
  • 1
  • 5
  • 16

1 Answers1

2

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.

rackhamup
  • 598
  • 1
  • 5
  • 16
  • Good catch. The same thing happens with rstan. I'll probably get in the habit of prefixing it with the namespace, e.g., rstan:::extract. – Ben Ogorek Dec 04 '16 at 23:33