Zane,
See the DIC FAQ, as I mentioned earlier:
http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/dicpage.shtml#q15
point 18. WinBUGS presents DIC for k because it thinks that the 0 in
the censoring lower bound for k is actually "censored data" which you
want to model. Just ignore that contribution to the total.
There's no DIC for q1 because the parameters of its distribution are
fixed. So the deviance will be fixed at its "posterior mean", the same
as the deviance at the "posterior means" of the parameters, so DIC will
not be meaningful. If you want to calculate the fixed deviance you'll
have to do it by hand using the normal density.
DIC measures (approximately!) the ability of a model to predict a
replicate dataset. So if you've fitted a model to data x, you want the
model to be able to predict a replicate x. So you'll usually just be
interested in the DIC for x.
Chris
On 16/02/12 19:48, Zhang, Zane wrote:
> I have a few questions about calculation of Dbar, and would appreciate
> any help.
>
> For an example model as listed below, WinBugs reports Dbar for both x
> and k:
>
> *Dbar = post.mean of -2logL; Dhat = -2LogL at post.mean of stochastic
> nodes*
> *Dbar Dhat pD DIC *
> k 1.336 1.336 -0.000 1.336
> x 145.088 141.980 3.108 148.197
> total 146.425 143.316 3.108 149.533
>
> I know how log-likelihood or deviance is calculated for x, but not sure
> how deviance is calculated for k.
>
> Why no deviance is presented for q1?
>
> I believe when we report DIC, we should report total DIC, rather than
> DIC for x, only. Shall we report in this way?
>
> Zane
>
> -------------------------------------------------------------------------------------------
>
>
> model {
> for (i in 1:n) {
> x[i] ~ dnorm(x_Exp[i], tau)
> x_Exp[i] <- q[i]*k
> }
>
> for (i in 2:n) {
> q[i] <- q[i-1]*q1
> }
> q[1] <- q1
>
> tau ~ dgamma(0.001, 0.001)
> q1 ~ dbeta(1, 1)
> k ~ dnorm(1000, 0.000000001)I(0, )
> }
>
> list(tau = 1, q1 = 0.5, k = 1500)
>
> list(n = 20, x = c(807.9, 643.8, 525.7, 415.4, 343.1, 261.3, 204.2,
> 165.1, 132.5, 124.7, 73.2, 60.2, 62.2, 57.1, 31.4, 14.3, 32.1, 23.5,
> 9.7, 12.2))
>
> ps The simulated data were generated with k = 1000, q1 = 0.8, standard
> deviation = 10.
>
>
> ------------------------------------------------------------------- This
> list is for discussion of modelling issues and the BUGS software. For
> help with crashes and error messages, first mail [log in to unmask]
> <mailto:[log in to unmask]> To mail the BUGS list, mail to
> [log in to unmask] <mailto:[log in to unmask]> Before mailing, please
> check the archive at www.jiscmail.ac.uk/lists/bugs.html
> <http://www.jiscmail.ac.uk/lists/bugs.html> Please do not mail
> attachments to the list. To leave the BUGS list, send LEAVE BUGS to
> [log in to unmask] <mailto:[log in to unmask]> If this fails,
> mail [log in to unmask] <mailto:[log in to unmask]>,
> NOT the whole list
--
Christopher Jackson <[log in to unmask]>
Research Statistician, MRC Biostatistics Unit, Institute of Public
Health, Robinson Way, Cambridge, UK, CB2 0SR. +44 (1223) 330381
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|