I am receiving the following error when trying to evaluate an integral in Stan:
Chain 1: Rejecting initial value:
Chain 1: Error evaluating the log probability at the initial value.
Chain 1: Exception: integrate: error estimate of integral 1.8538e-46 exceeds the given relative tolerance times norm of integral
I have followed some advice from another thread and printed out the parameter/data values where the error occurs. Using this information I calculated the integral in R. The resulting integral (conditional on the data and parameter values that produced the first error) is:
\int_0^{9.13938} \exp(t-1-2\exp(t-1) - \exp(9.13938-t-1))dt \approx 1.533059e-43.
I have tried changing the tolerance level to 1e-100 but this does not help.
What can I do to avoid the error when my integral is close to zero?
Aside: It is interesting that the initial values for all of my parameters is 1. Is this to be expected? I have init=0
in my code.