Andrew Gelman
unread,Apr 13, 2015, 9:14:23 AM4/13/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
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
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