Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Sample: drawing the same "random" sample


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Sample: drawing the same "random" sample
Date   Tue, 12 Apr 2011 19:23:14 +0100

Stata's random sampling code uses a seed, which you can change.

If you don't change it, you get exactly the same sequence of random
numbers drawn in different sessions, which is part of Stata's intent
to ensure reproducibility.

So, you can change the seed, you can (better) draw lots of samples to
see what is reproducible, etc.

Nick

On Tue, Apr 12, 2011 at 7:02 PM, Laurie Molina <[email protected]> wrote:

> I hope you can help me with the following questions:
> I am running random samples in stata 9 using the command sample.
> If i close the program, open the database again and then run the
> sample again, the "random" sample is the same as the first time i gave
> stata the instruction.
> Is it really a random sample? Is it ok to use it to make inference in
> to the population? What is the algorith used to draw the sample?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index