Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Spencer Graves
On my Mac: str(.Machine) ... $ integer.max  : int 2147483647  $ sizeof.long  : int 8  $ sizeof.longlong  : int 8  $ sizeof.longdouble    : int 16  $ sizeof.pointer   : int 8   On a Windows 10 machine I have, $ sizeof.long : int 4; otherwise the same as on my Ma

Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Avraham Adler
Floor (maybe round) of non-negative numerics, though. Poisson should never have anything after decimal. Still think it’s worth allowing long long for R64 bit, just for purity sake. Avi On Sun, Jan 19, 2020 at 4:38 PM Spencer Graves wrote: > > > On 2020-01-19 13:01, Avraham Adler wrote: > > Cra

Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Spencer Graves
On 2020-01-19 13:01, Avraham Adler wrote: > Crazy thought, but being that a sum of Poissons is Poisson in the sum, > can you break your “big” simulation into the sum of a few smaller > ones? Or is the order of magnitude difference just too great?   I don't perceive that as feasible.  On

Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Avraham Adler
Crazy thought, but being that a sum of Poissons is Poisson in the sum, can you break your “big” simulation into the sum of a few smaller ones? Or is the order of magnitude difference just too great? On Sun, Jan 19, 2020 at 1:58 PM Spencer Graves wrote: > This issue arose for me in simulati

Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Spencer Graves
  This issue arose for me in simulations to estimate confidence, prediction, and tolerance intervals from glm(., family=poisson) fits embedded in a BMA::bic.glm fit using a simulate.bic.glm function I added to the development version of Ecfun, available at "https://github.com/sbgraves237/E

Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Avraham Adler
Technically, lambda can always be numeric. It is the observations which must be integral. Would hitting everything larger than maxint or maxlonglong with floor or round fundamentally change the distribution? Well, yes, but enough that it would matter over process risk? Avi On Sun, Jan 19, 2020 a

Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Benjamin Tyner
So imagine rpois is changed, such that the storage mode of its return value is sometimes integer and sometimes numeric. Then imagine the case where lambda is itself a realization of a random variable. Do we really want the storage mode to inherit that randomness? On 1/19/20 10:47 AM, Avraham

Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Avraham Adler
Maybe there should be code for 64 bit R to use long long or the like? On Sun, Jan 19, 2020 at 10:45 AM Spencer Graves wrote: > > > On 2020-01-19 09:34, Benjamin Tyner wrote: > >> > >> Hello, All: > >> > >> > >> Cons

Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Spencer Graves
On 2020-01-19 09:34, Benjamin Tyner wrote: Hello, All:     Consider: Browse[2]> set.seed(1) Browse[2]> rpois(9, 1e10) NAs produced[1] NA NA NA NA NA NA NA NA NA     Should this happen?     I think that

Re: [Rd] rpois(9, 1e10)

2020-01-19 Thread Benjamin Tyner
Hello, All:   Consider: Browse[2]> set.seed(1) Browse[2]> rpois(9, 1e10) NAs produced[1] NA NA NA NA NA NA NA NA NA   Should this happen?   I think that for, say, lambda>1e6, rpois should return rnor

[Rd] rpois(9, 1e10)

2020-01-19 Thread Spencer Graves
Hello, All:   Consider: Browse[2]> set.seed(1) Browse[2]> rpois(9, 1e10) NAs produced[1] NA NA NA NA NA NA NA NA NA   Should this happen?   I think that for, say, lambda>1e6, rpois should return rnorm(., lambda, sqrt(lambda)).   For my particular Monte Carlo, I have rep