Hi,
I recently asked a question about the calculation of the DIC in WinBugs for
two differnt model.
In the case of the first model, a simple Poisson model, WinBugs does the
calculations: Menu Inference/DIC or for Batch mode dic.set() and dic.stats()
.
For the second model, a beta-binomial-Poisson mixture model given below,
this option is not available in WinBugs. In this case David Spiegelhalter
recomended to monitor 'deviance' to get Dbarr. To estimate Dhat plug in
posterior means for 'abundance' and 'p' into the deviance formula (-2loglik
with all constants) calculated outside WinBUGS. These Dbarr and Dhat are
then used to calculate the DIC.
Thank you very much everybody.
Verena
model 2;
{
#priors
alpha ~ dunif(0.01,1)
beta~dunif(0.01 ,100)
lambda ~ dgamma(0.001,0.001)
for( i in 1 : 31 ) {
abundance[i] ~ dpois(lambda)
p[i] ~ dbeta(alpha,beta)
catch[i] ~ dbin(p[i],abundance[i])
}
}
-------------------------------------------------------------------
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
|