jtimonen/lgpr

Numerical stability of negative binomial random numbers

jtimonen opened this issue · 1 comments

When using do_yrng = TRUE with the negative binomial model,
and error can occur due to numerical problems (see here). This problem should addressed in a future release to allow more stable prior and posterior predictive sampling.

A common error message is

23] "  Exception: neg_binomial_2_log_rng: Random number that came from gamma distribution is 8.79585e+09, but must be less than 1.07374e+09  (in 'chunks/generated.stan' at line 34; included from 'model_lgp' at line 52)"
error occurred during calling the sampler; sampling not done

Predictive distribution related random number generation is now in version 1.1 done in R so this problem is avoided.