Bob Carpenter
unread,Nov 12, 2012, 4:31:48 PM11/12/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to stan...@googlegroups.com
The categorical and multinomial distributions in Stan
are currently coded for outcomes in 0:(N-1). But
they're documented in the manual as taking outcomes
1:N, so something has to be done to make the doc consistent
with the implementation.
Should we change categorical and multinomial are in 1:N?
Pro: would bring Stan in line with BDA, R, and BUGs
Con: breaks backward compatiblity for existing categorical()
and multinomial()
Over the long haul, I think it's worth changing. I think
we could fudge updating major version number by calling
it a bug fix, but I'm not too hung up on version numbering one
way or another.
In terms of models, only the BUGS model
src/models/bugs_examples/vol1/inhalers/inhalers.stan
uses it, and uses the following line to bring it back in
line with the BUGS data:
response[i, t] - 1 ~ categorical(p[i, t]);
It's also used in eyes.stan as is (without the -1):
src/models/bugs_examples/vol2/eyes/eyes.stan
The multinomial() isn't used anywhere. It could've been used
in:
src/models/bugs_examples/vol2/endo/endo2.stan
but the model was coded directly in terms of its probability
function using lp__ instead of multinomial() -- was this because
mulitnomial()'s behavior was confusing?
- Bob