Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Poisson Number Generation


From   "E. Paul Wileyto" <[email protected]>
To   [email protected]
Subject   Re: st: Poisson Number Generation
Date   Thu, 21 Feb 2008 08:45:16 -0500

I don't think there is any way other than by brute force. Generate the uniform random number, and then go through the cumulative distribution of Poisson counts with a lot of comparisons. You will need to pick a place to stop (largest count possible) or you could just keep going. Logical functions will be more efficient than if/thens.

Paul

Martin Weiss wrote:

Dear Statalisters,

to pick up the recent discussion of random number generation in Stata, how
would one go about generating poisson random numbers without calling any
external programs? I am certainly not as adept as others on the list
inverting cumulative distribution functions, so I would appreciate any
suggestions...


Martin Weiss



*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

--
E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA 19104-3309

215-746-7147
Fax: 215-746-7140
[email protected]
http://mail.med.upenn.edu/~epw/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index