Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Stata implementation of alias method


From   Richard Gates <rgates@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Stata implementation of alias method
Date   Thu, 09 Aug 2012 12:11:57 -0500

Jesse,

See

. help mf_rdiscrete.

-Rich
rgates@stata.com

On 08/09/2012 11:16 AM, Jesse McCrosky wrote:
Hi all,

I've been looking for an implementation in Stata of the alias method (for sampling from an arbitrary discrete distribution) and very surprised not to find one.  If it really hasn't been done, I'll write it myself, but just thought I'd check here first.

For those unfamiliar with the method, but curious, the method is described about halfway down here: http://www.keithschwarz.com/darts-dice-coins/ and the best implementation is in this paper: http://www.jstor.org/stable/10.2307/2683739

Anyone seen or written this in Stata?

Best,

Jesse McCrosky





*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index