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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to