It is helpful to see how these can arise.
Binomial parameter theta, data r=1 out of n=2, with three different ways
of putting a uniform prior on theta , generated by putting appropriate
priors on theta, theta^5 and theta^20
model{
r <- 1; n<- 2
a[1]<-1 ; a[2] <- 5; a[3] <- 20
for (i in 1:3){
a.inv[i]<- 1/a[i]
theta[i] <- pow(psi[i], a.inv[i])
psi[i] ~ dbeta(a.inv[i] , 1) # each produces a uniform prior on theta
}
r1<- r; r2<-r ; r3 <- r
r1 ~ dbin(theta[1],n)
r2 ~ dbin(theta[2],n)
r3 ~ dbin(theta[3],n)
}
}
Dbar = post.mean of -2logL; Dhat = -2LogL at post.mean of stochastic nodes
Dbar Dhat pD DIC
r1 1.969 1.386 0.583 2.552
r2 1.868 1.509 0.359 2.227
r3 1.720 2.318 -0.598 1.122
node mean sd
theta[1] 0.4931 0.2265
theta[2] 0.4978 0.2232
theta[3] 0.4465 0.2218
The posteriors for all theta's are the same, but the pD becomes negative
when the prior is put on theta^20
This is due to the unfortunate lack of invariance of pD. It might
perhaps be better if WinBUGS used the posterior mean of the expectation
of Y to give a 'plug-in' deviance, rather than the posterior means of
the stochastic parents. Users are free to calculate this themselves!
An alternative measure of the effective number of parameters, which is
invariant and very robust, is half the variance of the deviance. This
was mentioned in earlier drafts of Spiegelhalter et al (2002) but seems
to have got dropped from the published version because we could not
think of a good enough theoretical justification for it in hierarchical
models, and in fact was explicitly reported in earlier versions of the
DIC in WinBUGS but again has perhaps unfortunately been dropped. This
suggestion is also discussed in Gelman et al 2nd Ed (2004) p 182. I
would recommend calculating this quantity as well as pD - if they are
very different then it might suggest care in interpreting pD.
David Spiegelhalter
-------------------------------------------------------------------
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
|