On Thu, 7 Apr 2005, Joseph Coveney wrote:
> Joao Pedro Wagner de Azevedo Wrote (excerpted):
>
> I would like to know if it is possible, and if so how, to have Stata and SAS
> generating the same sequence of random numbers.
>
> --------------------------------------------------------------------------------
>
> Given a seed, if you know the package's algorithm, shouldn't it be possible to
> reproduce its sequence of pseudorandom numbers?
I think most random number generators are designed to be as sensitive to a
change in the last bit as to a change in the first bit. So unless the
arithmetic were identical in both cases, the sequence should diverge the
first time a rounding decision goes differently (which might not happen,
of course - integers, IEEE floats, same hardware).
>
> Stata reveals its algorithm in its manuals. SAS probably does the same in
> sufficient detail somewhere in its documentation to be able to reproduce its
> sequences.
>
> Joseph Coveney
>
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/