[R] Calculating DIC from MCMC output

Duncan Murdoch murdoch at stats.uwo.ca
Tue Apr 3 14:50:36 CEST 2007


On 4/2/2007 10:07 PM, Kyle Edwards wrote:
> Greetings all,
> 
> I'm a newcomer to Bayesian stats, and I'm trying to calculate the  
> Deviance Information Criterion "by hand" from some MCMC output.  
> However, having consulted several sources, I am left confused as to  
> the exact terms to use. The most common formula can be written as
> 
> DIC = 2*Mean(Deviance over the whole sampled posterior distribution)  
> - Deviance(Mean posterior parameter values)
> 
> However, I have also seen this as
> 
> DIC = 2*Mean(Deviance over the whole sampled posterior distribution)  
> - Min(Deviance over the whole sampled posterior)
> 
> Now, my understanding is that for some distributions, the deviance at  
> the parameter means will be equal to the minimum deviance (i.e. these  
> are the maximum likelihood parameter values). But, in other cases  
> this will not be true. I have also read that the choice of exactly  
> which point estimate of the parameters to use is somewhat arbitrary  
> (i.e. one could use the mean, the mode, the median). It would be much  
> easier for me to analyze this data if I can just use the formula with  
> Min(Deviance). Could anyone comment on the difference between these  
> and recommend the best course?

The Spiegelhalter et al (2002) gives both of those as possibilities, as 
well as the posterior median.  I don't have any experience with DIC to 
offer direct advice, but if you don't get any here, I can offer the 
indirect advice to ask on the BUGS mailing list, where David 
Spiegelhalter and Nicky Best are active.  There's also some advice here: 
<http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/dicpage.shtml>.

Duncan Murdoch



More information about the R-help mailing list