This is to follow up on my earlier question about cutting feedback in the
following simple model:
<br />
model {<br />
for(i in 1:2) {<br />
p[i] ~ dbeta(0.5, 0.5)<br />
x[i] ~ dbin(p[i], n[i])<br />
}<br />
p.total <- p[r]<br />
r ~ dcat(q[])<br />
x.3 ~ dbin(p.total, n.3)<br />
}<br />
<br />
data<br />
list(x=c(1,1), n=c(93,45), q=c(0.5,0.5), x.3=3, n.3=687)<br />
It turns out that there appears to be a problem with the cut function in<br />
OpenBUGS, which is what I was using. The following model works just fine in<br />
WinBUGS 1.4.1:<br />
<br />
model {<br />
for(i in 1:2) {<br />
p[i] ~ dbeta(0.5, 0.5)<br />
x[i] ~ dbin(p[i], n[i])<br />
p.cut[i]<-cut(p[i])<br />
}<br />
<br />
p.total <- p.cut[r]<br />
r ~ dcat(q[])<br />
x.3 ~ dbin(p.total, n.3)<br />
}<br />
Thanks to David Spiegelhalter for prompting me to try this model in WinBUGS
1.4.1. David indicates that there have been major changes to the
architecture for OpenBUGS and that problems have been noted.
-------------------------
BUGS mail list的
--
Dana Kelly
Idaho National Laboratory
(360) 539-8388
(208) 360-0538 cell
(360) 539-8401 fax