Open alashworth opened 5 years ago
Comment by bob-carpenter
Tuesday Feb 07, 2017 at 21:01 GMT
That's really surprising. Any idea what's going on? Is it an underflow to zero that's causing the log to become -infinity?
Comment by bob-carpenter
Tuesday Feb 07, 2017 at 21:01 GMT
Accidentally sent that. Maybe we could fix log_sum_diff to deal with the case where the second entry is -infinity.
Comment by sdewaele
Friday Mar 03, 2017 at 16:33 GMT
Thanks for looking into this. Looking forward to the fixed version so i can eliminate the workaround.
Summary:
There exists a Stan program where the two-sided truncation notation
[L,U]
results in the model failing to initialize no matter how smallinit_r
is, while doing the truncation manually in the Stan program works fine with the default value ofinit_r
.Description:
Double-sided truncation parses to
log_diff_exp(foo_cdf_log(U, ...), foo_cdf_log(L, ...))
which can turn out worse than-log(foo_cdf(U, ...) - foo_cdf(L, ...))
Reproducible Steps:
Can change the
works
variable to 1Current Output:
Initialization between (-x, x) failed after 100 attempts.
for any value ofx
Expected Output:
Additional Information:
None
Current Version:
v2.14.0