[Jprogramming] Negative binomial random numbers

Mike Day mike_liz.day at tiscali.co.uk
Fri Apr 4 17:10:02 UTC 2014


I haven't rolled my own - at least not in a long while - might have done 
in APL yonks ago!

But I see that R has a function rnegbin which is a
"Function to generate random outcomes from a Negative Binomial 
distribution, with mean|mu|and variance|mu + mu^2/theta|."

And J's addons include an R server.

So, faute de mieux,  R might serve your purpose.  Likely to be better in 
native J if you're doing lots, of course.

Ewart has probably rolled this in all sorts of ways,  so I'm copying to him.

Mike

On 04/04/2014 16:55, John Baker wrote:
> As far as I can tell there is no negative binomial random number generator
> in stats/distribs. Before rolling my own I thought a quick query to the
> J'verse would be helpful.
>
> Does anyone have an reasonably efficient generator for negative binomials?
>
> Thanks in advance.
>



---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com


More information about the Programming mailing list