Statalist The Stata Listserver

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

Re: st: perform Poisson simulations

From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: perform Poisson simulations
Date   Wed, 26 Apr 2006 19:55:20 +0900

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.


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.

Joseph Coveney

*   For searches and help try:

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