Open ghost opened 8 years ago
This would be part of the summary method.
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.
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.
This of course will slow it down because it requires calculating the log-likelihood one more time for each step in the chain.
https://en.wikipedia.org/wiki/Deviance_information_criterion