model { Tau <- 20 for (j in 1:N.loser) { B1 ~ dbern(win1[j]) B2[j] ~ dbern(win2[j]) logit(win1[j]) <- x[T.b1, Loser[j]] - x[T.b1, Winner1[j]] logit(win2[j]) <- x[T.b2[j], Loser[j]] - x[T.b2[j], Winner2[j]] for (t in 1:T.max) { x[t, Loser[j]] ~ dnorm(meanL[t], Tau) x[t, Winner1[j]] ~ dnorm(0.0, Tau) } } meanL[T.b1] <- 0.0 meanL[T.b1 + 1] <- ab for (t in 3:T.max) { meanL[t] <- meanL[t - 1] * a } logit(a) <- logit.a logit.a ~ dnorm(0.0, 1.0E-4) ab ~ dnorm(0.0, 1.0E-4) }