model {
for (i in 1:N) {
Score[i] ~ dcat(p[i,])
p[i,1] <- 1 - Q[i,1] for (r in 2:5) { p[i,r] <- Q[i,r-1] - Q[i,r] } p[i,6] <- Q[i,5] for (r in 1:5) { logit(Q[i,r]) <- b.apd*lAPD[i] - c[r] } } for (i in 1:5) { dc[i] ~ dunif(0, 20) } c[1] <- dc[1] for (i in 2:5) { c[i] <- c[i-1] + dc[i] } b.apd ~ dnorm(0, 1.0E-03) or.apd <- exp(b.apd) } Data:
list(Score=c(4, 3, 1, 3, 4, 3, 2, 1, 1, 1, 1, 1, 2, 4, 4, 2, 1, 4, 1, 2, 5, 1, 4, 3, 5, 1, 1, 2, 1, 1, 3, 4, 2, 1, 1, 1, 2, 2, 4, 3, 6, 3, 1, 2, 2, 2, 1, 1, 1, 4, 6, 1, 2, 3, 4, 4, 1, 1, 4, 3, 6, 1, 6, 3, 3, 1, 1, 1, 6, 2, 1, 5, 1, 1, 4, 1, 2, 5, 1, 1, 3, 4, 2, 1, 1, 1, 2, 5, 1, 2, 2, 2, 2, 6, 1, 1, 1, 1, 1, 3, 6, 4, 3, 1, 3, 2, 1, 1, 1, 1, 1, 4, 2, 1, 4, 1, 5, 1, 4, 4, 5, 2, 1, 1, 2, 3, 4, 2, 1, 1, 2, 2, 2, 4, 3, 6, 3, 2, 2, 2, 1, 1, 1, 1, 4, 6, 1, 2, 5, 4, 1, 1, 6, 1, 6, 3, 3, 1, 1, 1, 2, 2, 1, 1, 4, 1, 2, 5, 1, 3, 2, 4, 1, 1, 2, 5, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 4, 3, 6), lAPD=c(3.89182029811063, 2.07944154167984, 2.39789527279837, 3.2188758248682, 4.06044301054642, 4.4188406077966, 2.19722457733622, 2.70805020110221, -1.38629436111989, 1.09861228866811, 4.91998092582813, 6.05208916892442, 3.52636052461616, 4.97673374242057, 6.282266746896, 1.94591014905531, 1.6094379124341, 6.3578422665081, 2.99573227355399, 3.29583686600433, 0.693147180559945, -1.38629436111989, -1.38629436111989, 4.53259949315326, 6.68959926917897, -1.38629436111989, 3.52636052461616, 3.17805383034795, 2.30258509299405, 3.2188758248682, 3.04452243772342, 4.969813299576, 3.85014760171006, 3.25809653802148, 5.99645208861902, 4.35670882668959, 2.484906649788, 3.49650756146648, 5.92157841964382, 2.89037175789616, 7.55485852104068, 2.19722457733622, 2.30258509299405, 2.07944154167984, -1.38629436111989, 1.6094379124341, 3.89182029811063, 2.99573227355399, 2.19722457733622, 3.40119738166216, 3.55534806148941, 2.19722457733622, 2.70805020110221, 6.5875500148248, 2.63905732961526, 3.58351893845611, 1.94591014905531, 2.484906649788, 5.41610040220442, 3.46573590279973, 3.58351893845611, 2.94443897916644, 4.49980967033027, 2.19722457733622, 5.39362754635236, 2.56494935746154, 2.99573227355399, 2.77258872223978, -1.38629436111989, 2.484906649788, 3.89182029811063, 3.8286413964891, 2.99573227355399, 3.40119738166216, 5.48063892334199, 2.19722457733622, 5.12989871492307, 2.39789527279837, 2.70805020110221, 2.19722457733622, 3.87120101090789, 3.71357206670431, -1.38629436111989, 3.17805383034795, 2.89037175789616, 3.13549421592915, 1.09861228866811, 3.40119738166216, 2.99573227355399, 3.13549421592915, 2.83321334405622, 2.484906649788, 5.11799381241676, 4.77068462446567, 2.77258872223978, 2.56494935746154, 2.30258509299405, 2.63905732961526, 3.36729582998647, 2.70805020110221, 4.70953020131233, 3.89182029811063, 2.07944154167984, 2.39789527279837, 3.2188758248682, 2.19722457733622, 2.70805020110221, -1.38629436111989, 1.09861228866811, 4.91998092582813, 6.05208916892442, 6.282266746896, 1.94591014905531, 1.6094379124341, 6.3578422665081, 2.99573227355399, 0.693147180559945, -1.38629436111989, -1.38629436111989, 4.53259949315326, 6.68959926917897, 3.52636052461616, 3.17805383034795, 2.30258509299405, 3.2188758248682, 3.04452243772342, 4.969813299576, 3.85014760171006, 3.25809653802148, 5.99645208861902, 4.35670882668959, 2.484906649788, 3.49650756146648, 5.92157841964382, 2.89037175789616, 7.55485852104068, 2.19722457733622, 2.30258509299405, 2.07944154167984, -1.38629436111989, 1.6094379124341, 3.89182029811063, 2.99573227355399, 2.19722457733622, 3.40119738166216, 3.55534806148941, 2.19722457733622, 2.70805020110221, 4.89034912822175, 3.58351893845611, 1.94591014905531, 2.484906649788, 3.58351893845611, 2.94443897916644, 4.49980967033027, 2.19722457733622, 5.39362754635236, 2.56494935746154, 2.99573227355399, 2.77258872223978, 2.484906649788, 3.89182029811063, 2.99573227355399, 3.40119738166216, 5.48063892334199, 2.19722457733622, 5.12989871492307, 2.39789527279837, 2.19722457733622, 3.87120101090789, -1.38629436111989, 4.21950770517611, 3.17805383034795, 2.89037175789616, 1.09861228866811, 3.40119738166216, 2.99573227355399, 3.29583686600433, 3.13549421592915, 2.83321334405622, 2.484906649788, 2.77258872223978, 2.89037175789616, 2.56494935746154, 2.30258509299405, 2.63905732961526, 3.36729582998647, 1.79175946922805, 2.70805020110221, 4.70953020131233), N=190)

Inits:
list(b.apd=0, dc=c(1, 1, 1, 1, 1))

node mean sd MC error 2.5% median 97.5% start sample
b.apd 0.3749 0.08755 0.002768 0.2096 0.3723 0.5552 501 10000
c[1] 0.7507 0.2994 0.009379 0.1869 0.7397 1.362 501 10000
c[2] 1.716 0.3239 0.009713 1.117 1.699 2.386 501 10000
c[3] 2.352 0.3521 0.01042 1.699 2.336 3.074 501 10000
c[4] 3.409 0.4068 0.01104 2.65 3.396 4.252 501 10000
c[5] 4.163 0.4639 0.01144 3.309 4.148 5.097 501 10000
or.apd 1.46 0.1291 0.004081 1.233 1.451 1.742 501 10000