model{ for(i in 1:N){ Resp[i]~dbin(pA[i],Nk) Pred[i]~dbin(pA[i],Nk) percept[i]<-a*st[i,1]+b*st[i,2] pA[i]<-pnorm(percept[i],c,tau) } # priors tau<-pow(sigma,-2) sigma~dunif(0,50) a~dnorm(0,0.001) b~dnorm(0,0.001) c~dnorm(0,0.001) }