EDITOR’S PROOF
Modeling Elections with Varying Party Bundles 313
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
m[region[i],k] + ed[region[i], education[i], k] +
ag[region[i],education[i],age[i],k]
expv[i,k] <- exp(v[i,k])
pv[i,k] <- expv[i,k]/sum(expv[i,1:K])
vote[i] ~ dcat(pv[i, 1:K])
}}
beta[1] ~ dnorm(0,taub[1])I(-5,5)
alpha[1] <- 0
alpha[2] ~ dnorm(0,taua[2])
alpha[3] ~ dnorm(0,taua[3])
alpha[4] ~ dnorm(0,taua[4])
alpha[5] ~ dnorm(0,taua[5])
m[1,1] <- 0
m[1,2] ~ dnorm(0,taum[1,2])
m[1,3] ~ dnorm(0,taum[1,3])
m[1,4] ~ dnorm(0,taum[1,4])
m[1,5] <- -100000
m[2,1] <- 0
m[2,2] ~ dnorm(0,taum[2,2])
m[2,3] ~ dnorm(0,taum[2,3])
m[2,4] ~ dnorm(0,taum[2,4])
m[2,5] ~ dnorm(0,taum[2,5])
taub[1] ~ dgamma(.1,.1)I(.1,10)
taua[2] ~ dgamma(.1,.1)I(.1,10)
taua[3] ~ dgamma(.1,.1)I(.1,10)
taua[4] ~ dgamma(.1,.1)I(.1,10)
taua[5] ~ dgamma(.1,.1)I(.1,10)
taum[1,2]~dgamma(.1,.1)I(.1,10)
taum[1,3]~dgamma(.1,.1)I(.1,10)
taum[1,4]~dgamma(.1,.1)I(.1,10)
taum[2,2]~dgamma(.1,.1)I(.1,10)
taum[2,3]~dgamma(.1,.1)I(.1,10)
taum[2,4]~dgamma(.1,.1)I(.1,10)
taum[2,5]~dgamma(.1,.1)I(.1,10)
for(f in 1:e){
ed[1,f,5] <- -10000
}
for(f in 1:e){
for(z in 1:4){
ed[1,f,z] ~ dnorm(0,taued[1,f,z])
taued[1,f,z] ~ dgamma(.01,.01)I(.01,10)
}}