#
# MDS Model for Nations Data
#
model{
#
# Fix Respondent E at the origin
#
z[5,1] <- 0.000
z[5,2] <- 0.000
#
# Fix Respondent F 2nd Dimension
#
z[6,2] <- 0.000
#
for (i in 1:N-1){
for (j in i+1:N){
#
#
dstar[i,j] ~ dlnorm(mu[i,j],tau)
mu[i,j] <- log(sqrt((z[i,1]-z[j,1])*(z[i,1]-z[j,1])+(z[i,2]-z[j,2])*(z[i,2]-z[j,2])))
}
}
#
## priors
#
tau ~ dunif(0,10)
#
z[1,2] ~ dnorm(0.0,0.01)
z[2,1] ~ dnorm(0.0,0.01)
z[2,2] ~ dnorm(0.0,0.01)
z[3,1] ~ dnorm(0.0,0.01)
z[4,1] ~ dnorm(0.0,0.01)
z[6,1] ~ dnorm(0.0,0.01)
z[7,1] ~ dnorm(0.0,0.01)
z[7,2] ~ dnorm(0.0,0.01)
z[8,2] ~ dnorm(0.0,0.01)
z[9,1] ~ dnorm(0.0,0.01)
z[9,2] ~ dnorm(0.0,0.01)
#
# Kludge to fix rotation -- set 1st and 2nd dimension coordinates of
# 4 Respondents to fix the sign flips
z[1,1] ~ dnorm(0.0,0.01)I(,0)
z[8,1] ~ dnorm(0.0,0.01)I(0,)
z[4,2] ~ dnorm(0.0,0.01)I(,0)
z[3,2] ~ dnorm(0.0,0.01)I(0,)
}