I discovered two things that might be of interest with respect to this problem:
- It runs correctly if I replace
tau[i] ~ exponential(betas);
target += -betas*tau[i]+log(betas);
My understanding is that these should do exactly the same thing, so the fact that one crashes and the other doesn't is interesting. Not only does it not crash, it produces what look like correct results. I should mention that I get the same problem with gamma distributions, and these problems are also corrected when I replace the sampling notation by an explicit log density.
- Even though no one else seems to get these errors, I get them when I run it on another Mac. So It’s not something weird about this one laptop. It might be something weird about how I’m setting it up, but I’m not really competent to do anything particularly idiosyncratic. I recently had to install clang4, because Rcpp had started giving fatal errors after some update.