Statalist The Stata Listserver


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

st: RE: set seed and gsample


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: set seed and gsample
Date   Wed, 7 Mar 2007 23:11:08 -0000

You must -set seed- immediately before calling -gsample-. 

If that doesn't explain, show us the exact code. To 
quote the FAQ:  

"Say exactly what you typed and exactly what 
Stata typed (or did) in response. N.B. exactly!"

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

shigesong@gmail.com
 
> I am trying to draw a PPS sample using the "gsample" command.  I want
> to make sure I get the same sample each time I invoke the gsample
> command by using the "set seed" command. However, even after I set the
> random seed using "set seed" command, I still get different sample
> each time. Has anybody encountered this problem? Thanks!

*
*   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