model{ theta ~ dbeta(1,1) for(j in 1:7){y[j] ~ dbin(theta,m[j])} for(j in 9:J){y[j] ~ dbin(theta,m[j])} #predicted number of deaths in the 8th hospital y8.pred ~ dbin(theta,m[8]) P <- step(y8.pred-y[8]-0.001)+0.5*equals(y8.pred,y[8]) }