Someone pointed this out to me before and I forgot, but there's another problem with what I posted. Use this instead:
a[1:3} ~ dmulti(x.a[], N.a) N.a <- sum(n.a[])
# priors
y.a[1] ~ dexp(1)
y.a[2] ~ dexp(1)
y.a[3] ~ dexp(1)
x.a[1] <- y.a[1]/sum(y.a[])
x.a[2] <- y.a[2]/sum(y.a[])
x.a[3] <- y.a[3]/sum(y.a[])
Once again, I'm sorry for the confusion. That's what I get for writing code at a computer that doesn't have WinBUGS installed on it so that I can't check it.
If you're wondering what the difference is: (a) there was a desp() in one line instead of a dexp() and (b) all of the dexp() lines should be dexp(1).
Posted by Kent at October 4, 2006 5:43 PM | TrackBack