Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Random number seed

From   "Nick Cox" <>
To   <>
Subject   st: RE: Random number seed
Date   Thu, 20 May 2004 15:24:04 +0100

Your premise is false. Just because
the seed remains the same does not 
imply identical samples (of a given size). 
Conversely, explicitly setting the seed to the 
same number as before the last 
call does ensure an identical sample. 

However, you can indeed change the seed easily. 

. search seed 

points to ways of doing this. 

More generally, there is a great
deal of help on-line, which will 
save you time. 


> -----Original Message-----
> From:
> []On Behalf Of Subhankar
> Nayak
> Sent: 20 May 2004 15:16
> To:
> Subject: st: Random number seed
> Can the stata random number seed be itself randomized?
> I am running a program called "" in the batch mode without
> invoking/opening stata. This program carries out an analysis 
> based on a set
> of 1,000 uniform random numbers it generates.
> However, since the random seed is always the same everytime I run the
> program in batch mode, I get the same set of 1,000 random 
> numbers each time
> I run this program in batch mode. Results are identical which 
> defeats the purpose.

*   For searches and help try:

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