In my stan program integrals are involved, and stan returns errors like
integrate: error estimate of integral 1.4822e-323 exceeds the given relative tolerance times norm of integral
I have tried to set rather loose relative tolerance, like 10^{-2}
integrate_1d(functionintegrand, 1e-6,x,{mu, lambda}, {1.0}, x_i,1e-2)
But then the error still exists, and this time the error estimate becomes larger, like
integrate: error estimate of integral 0.0018877 exceeds the given relative tolerance times norm of integral
Is this caused by looser relative tolerance causes Stan to execute Gauss–Kronrod algorithm also in a ‘looser‘ way and therefore producing larger error estimate? Would it be possible to use other ways to solve the error of error estimate of integral exceeding given relative tolerance times norm of integral?
Thanks in advance!