model{ # Likelihood for(i in 1:m1){ k1[i]~dbin(theta1,N) } for(i in 1:m2){ k2[i]~dbin(theta2,N) } # Prior theta1~dbeta(1,1) theta2~dbeta(1,1) Deltheta<-theta1-theta2 # Posterior predictive postk1~dbin(theta1,N) postk2~dbin(theta2,N) }