I just want to make sure my understanding of how we estimate DIC using MCMC output is correct, as the wikipedia page is somewhat confusing.
Defining DIC by
$$DIC = p_D + \bar{D}$$
with
$$D(\theta) = -2 \log p(y|\theta) + C$$
$$p_D = \bar{D} - D(\bar{\theta})$$
I have a few questions about this:
Firstly, as far as I can tell, the Wikipedia page never actually explicitly defines $\bar{D}$, but I am guessing that it is the expected value of $D$ wrt $\theta$? ie
$$\bar{D} = E_\theta [D(\theta)]$$
Is this correct?
Secondly, $\bar{\theta}$ is defined as the "expectation of $\theta$". Does this mean we take $\bar{\theta}$ as our posterior estimate of $\theta$, the posterior sample mean? As that would be our best estimate of the posterior expectation of $\theta$.
Thirdly, if indeed $\bar{D} = E_\theta [D(\theta)]$, then given our posterior sample
$$\theta_1, \theta_2, \dots, \theta_n$$
Is $\bar{D}$ simply estimated by calculating $D(\theta_i)$ for each $\theta_i$ in our posterior sample, and then averaging them?
Thanks in advance. I'm still new to Bayesian so even these simple ideas confuse me.