[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: seed command with rndbin
> 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.
Hmm. You are using -rndbin-, a user-written program by Joe Hilbe and
Walter Linde-Zwirble, which is for Stata 3.1.
As documented at the help for -version- the random number
generator changed in Stata after version 3.1.
Therefore, there is no connection between
-set seed- in an interactive session under Stata 7,
and what happens when you run -rndbin-, because
different generators are concerned, the new and
the old (under -version-).
I think you need to edit a copy of -rndbin- and
-set seed- within that.
* For searches and help try: