RSGInc / RSGHB

Functions for Hierarchical Bayesian Estimation: A Flexible Approach
Other
25 stars 16 forks source link

Add DIC as an output #58

Open ghost opened 8 years ago

ghost commented 8 years ago

https://en.wikipedia.org/wiki/Deviance_information_criterion

ghost commented 8 years ago

This would be part of the summary method.

ghost commented 8 years ago

This calculation is easy to do but to do it right we need to store the upper level log-likelihood for each iteration (not just gINFOSKIP). This is currently not calculated.

ghost commented 8 years ago

We can calculate this at each step in the hb function and for only the posterior iterations. To calculate the upper-level log-likelihood, we can use the A object (properly reshaped) as the B object that is passed into the likelihood function.

ghost commented 8 years ago

This of course will slow it down because it requires calculating the log-likelihood one more time for each step in the chain.