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.
Thanks for pointing this out, I'd just assumed I was getting reproducible
pseudorandom numbers when in fact I wasn't - i hadn't thought to check!