# # mimic_allvotes.bug # # ANALYZING SPATIAL MODELS OF CHOICE AND JUDGMENT WITH R # Dave Armstrong, Ryan Bakker, Royce Carroll, Christopher Hare, Keith T. Poole, and Howard Rosenthal # http://voteview.com/asmcjr.asp # # model{ for(i in 1:N){ # ## roll calls (key votes) for(j in 1:Q){ y[i,j] ~ dbern(pi[i,j]) logit(pi[i,j]) <- ideo[i]*beta[j] - alpha[j] } } # # ## constrain ideal point #1 to be negative, #2 to be negative ideo[1] ~ dnorm(0,.1)T(,0) ideo[2] ~ dnorm(0,.1)T(0,) for (i in 3:N){ ideo[i] ~ dnorm(0,.1) } # ## priors on the IRT parameters (beta and alpha), a, b, and tau for(j in 1:Q){ alpha[j] ~ dnorm(0,.1) beta[j] ~ dnorm(0,.1) }} #