On 2/20/12 2:54 PM, Jiqiang Guo wrote:
> In Bugs example vol1/inhalers, the response is modeled as
> categorical distribution, i.e.,
> y ~ categorical(p).
>
> Currently if p is of length N, the support for y is {0, 1, ..., N-1}.
> In Bugs/JAGS, it is {1, 2, ..., N}.
> Should we follow Bugs/JAGS convention?
We followed the conventions in BDA (which match
the Wikipedia in this case).
It seems to make more sense to use 1...N
rather than 0...(N-1) because we index from 1
and then the categorical will match the multinomial.
But then the Bernoulli uses 0 and 1. Can't tell
what BDA would do for that because it only has
the binomial.
What does everyone else think?
If we follow BDA, we need to doc this in a section
BUGS/JAGS vs. Stan conventions.
> Now using the exact data from Bugs example, I am using
> y - 1 ~ categorical(p)
That should work for now (and in the future if we stick
with the BDA convention).
- Bob