This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
binomial_tpe
- From: James Theiler <jt at lanl dot gov>
- To: Chris Paulse <cpaulse at aecom dot yu dot edu>
- Cc: gsl-discuss <gsl-discuss at sources dot redhat dot com>
- Date: Wed, 17 Aug 2005 12:06:45 -0600 (MDT)
- Subject: binomial_tpe
Thanks, that is an interesting approach.
The code I was talking about is available in GSL as
gsl_ran_binomial_tpe(rng,p,n), and the source code
is in the file randist/binomial_tpe.c
by the way, i noticed that this is not mentioned
in the revised second edition of the manual; i think
users might like to know that we have a much faster
version available. (actually, what i think is that
the btpe version should be the standard.)
jt
On Wed, 17 Aug 2005, Chris Paulse wrote:
] This may interest you:
] http://statistik.wu-wien.ac.at/unuran/index.html
]
] chris
]
] -----Original Message-----
] From: James P. Theiler [mailto:jtheiler@lanl.gov]
] Sent: Thursday, August 11, 2005 1:57 AM
] To: Chris Paulse
] Subject: Re: GSL suggestion
]
] Hi Chris,
] and thanks for your comments. In fact, I noticed that the standard GSL
] implementation for binomial variates was way slow, and incorporated what
] I think is just the scheme you describe. In fact, I corresponded with
] both of the authors of that paper, and started to work on a faster
] Poisson distribution as well. But Brian decided to put the new version
] in with a different API, I can't remember what it is exactly. (I'm
] basing all this on memory, since I'm on travel and don't have access to
] the details.) I should double-check on that and get back to you with
] more specifics.
]
] thanks again,
] jt
]
]
] > Hi James,
] >
] > I noticed that the c library for low level probability functions uses a
] > different (newer) method for drawing from a binomial distribution than the
] > GSL. The relevant reference for the newer implementation is
] >
] >
] >
] > Kachitvichyanukul, V. and Schmeiser, B. W. (1988).
] >
] > Binomial random variate generation.
] >
] > Communications of the ACM 31, p216.
] >
] > (Algorithm BTPEC).
] >
] >
] >
] > The implementation of this is in the file rbinom.c in the source
] > distribution for the R package (www.r-project.org
] > <http://www.r-project.org/> ).
] >
] >
] >
] > Chris Paulse
] >
] >
]
]
--
James Theiler Space and Remote Sensing Sciences
MS-B244, ISR-2, LANL Los Alamos National Laboratory
Los Alamos, NM 87545 http://nis-www.lanl.gov/~jt