I am debugging a larger set of nested models that only run into problems during optimization. During the process of zeroing on what I believe is causing the errors I've come across unusual behavior in the rpois()
function.
It seems that with very large mean values, rpois()
returns NA
instead of a value. This problem does not generate a warning. See below for a reproducible set of code.
> rpois(1,3000000000)
[1] NA
My question is two fold:
1 - why is it showing this behavior (is there a max limit on the size of an integer for the rpois function?) and
2 - is there a work around to prevent the generation of NA (even if that's to limit the size of the mean input to some smaller value)?
I am running 32x R version 3.0.2 in 64x Windows 7.