An alternative in this case is Bobby Gutierrez's
-genpoisson-.
. findit genpoisson
Nick
[email protected]
Joseph Coveney
> Zhiqiang Feng wrote:
>
> I try to do Poisson simulations using STATA.
>
> Firstly I fit Poisson model with the observed values.
>
> Poisson y x1, x2, ...xn
>
> predict yhat, n.
>
> The I try to derive Poisson random numbers using the predicted values
> as means.
>
> y_random=??(yhat)
>
> However, I can not find a way to derived Poisson random numbers in
> STATA. I do find a similar function in SAS (ranpoi) though. I also
> know there is such a function in GLIM.
>
> --------------------------------------------------------------
> ------------------
>
> You can do it in Stata, too. The easiest way is to download
> and install
> Joseph Hilbe and Walter Linde-Zwirble's -rnd- suite, and use
> one of its two
> Poisson random number generating commands, -rndpoi- and -rndpoix-.
>
> Type "findit rnd" in Stata's command line window in order to
> see where you
> can download the suite from. You can perform the entire
> downloading and
> installation from within Stata.
>
> Be aware that the commands in the suite use Stata's older
> random number
> generator, and so this means that you type -set seed0-
> instead of -set seed-
> in order to set the random number generator seed for these commands.
*
* 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/