Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

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

From   Nick Cox <>
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.


On Tue, Apr 12, 2011 at 7:02 PM, Laurie Molina <> 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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index