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

st: RE: seed command with rndbin

From   "Steichen, Thomas" <>
To   <>
Subject   st: RE: seed command with rndbin
Date   Tue, 12 Aug 2003 10:32:31 -0400

Gwen Allardice writes:

> I have recently found a problem in  stata v7 . I have been 
> using the rndbin program extensively in some simulations I am running.
> I would like to be able to replicate  my results and find 
> that the seed command does not seem to work; I keep getting 
> different results.
> e.g. a simple example should illustrate my problem. the 
> following three lines of stata will generate and show me an 
> appropriate random number but repeating the three commands 
> then gives me a different number. I want it to give me the 
> same number. 
> set seed 2
> rndbin 1 0.33  6
> display   xb
> Can someone show me how to run the rndin command more than 
> once and get the same result each time. 

This apparently has something to with the fact that -rndbin- is
a Stata version 3.1 program.  If you change the version # within
-rndbin- to 5 then the -set seed #- is honored (and the program
seems to still work correctly). 

Someone from StataCorp will need to explain why this behaves the 
way it does under version 3.1; my memory is not good enough to
know how -set seed- and random numbers worked back then!


CONFIDENTIALITY NOTE:  This e-mail message, including any
attachment(s), contains information that may be confidential,
protected by the attorney-client or other legal privileges, and/or
proprietary non-public information.  If you are not an intended
recipient of this message or an authorized assistant to an intended
recipient, please notify the sender by replying to this message and
then delete it from your system.  Use, dissemination, distribution,
or reproduction of this message and/or any of its attachments (if
any) by unintended recipients is not authorized and may be unlawful.

*   For searches and help try:

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