Statalist The Stata Listserver


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

RE: st: perform Poisson simulations


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: perform Poisson simulations
Date   Wed, 26 Apr 2006 12:21:12 +0100

An alternative in this case is Bobby Gutierrez's 
-genpoisson-. 

. findit genpoisson 

Nick 
n.j.cox@durham.ac.uk 

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/



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