model{ for(i in 1:N){ k[i]~dbin(theta[i],n) } # Priors for(i in 1:N){ g[i]~dbern(0.5) } phi~dbeta(1,1)T(0.5,1) for(i in 1:N){ theta[i]<-0.5*(g[i]==0)+phi*(g[i]==1) } }