bad error msg for logit

56 views
Skip to first unread message

Andrew Gelman

unread,
Apr 13, 2015, 9:14:23 AM4/13/15
to stan...@googlegroups.com
Hi, I was doing logit and got this message:

TRANSLATING MODEL 'logit' FROM Stan CODE TO C++ CODE NOW.
Show Traceback

Rerun with Debug
Error in stanc(file = file, model_code = model_code, model_name = model_name, :
failed to parse Stan model 'logit' with error message:
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
no matches for function name="bernoulli_logit_log"
arg 0 type=vector
arg 1 type=vector
available function signatures for bernoulli_logit_log:
0. bernoulli_logit_log(int, real) : real
1. bernoulli_logit_log(int, real[1]) : real
2. bernoulli_logit_log(int, vector) : real
3. bernoulli_logit_log(int, row vector) : real
4. bernoulli_logit_log(int[1], real) : real
5. bernoulli_logit_log(int[1], real[1]) : real
6. bernoulli_logit_log(int[1], vector) : real
7. bernoulli_logit_log(int[1], row vector) : real
unknown distribution=bernoulli_logit

ERROR at line 11
9: }
10: model {
11: y ~ bernoulli_logit(b[1] + b[2]*x);
^
12: }


WTF?

OK, I figured it out, I’d mistakenly declared y as a vector, thus “real,” not integer. But the err message says “unknown distribution=bernoulli_logit”. That’s confusing.

See you
A

Bob Carpenter

unread,
Apr 14, 2015, 12:44:59 AM4/14/15
to stan...@googlegroups.com
I agree that we should fix this. It's better now,
but still has three issues I list here:

https://github.com/stan-dev/stan/issues/1425

Please comment if you don't like my proposed changes.

- Bob
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

Reply all
Reply to author
Forward
0 new messages