To expand on Austin's point:
There are two main overlapping sets of Stata routines for random number
generation, those produced by Joseph Hilbe and W. Linde-Zwirble and
those produced by Roberto Gutierrez. Roberto's programs are more
versatile and up-to-date than the corresponding Hilbe-Linde-Zwirble
programs, which were originally written much earlier. Neither purports
to cover all the distributions that you, J. Random Statauser, might want
to implement, but many distributions can be tackled by a few lines
whenever the cdf is invertible.
Note also various intersecting threads on random number generation in
the archives, most recently those in late September, sparked by
discussion of the Hilbe-Linde-Zwirble -rndbin-.
Nick
[email protected]
Austin Nichols
Try
findit gendist
and
findit rnd
and look inside the relevant ado code, e.g.
viewsource genpoisson.ado
and
viewsource rndpoix.ado
Martin Weiss wrote:
> > 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...
*
* 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/