Many thanks you all for the valuable comments and suggestions.
I did a little bit of more digging, and found out that the references on the
"pseudo-random number generator" on the Stata 8 manuals and the SAS 5
manuals are quite different.
While Stata talks about using George Marsalis (1994) 32-bits pseudo-random
number generator, SAS actually has two different functions RANUNI [Fishman
and Moore, 1982] and UNIFORM [Lewis, Goodman and Miller (1969) and Kennedy
and Gentle (1980)].
Unfortunately the SAS manuals did not present a section with the full
references, and the Stata one only said:
Marsaglia, G (1994). Personal communication
I would like to know if anyone familiar with this literature could advise me
how feasible it is to create a compatible pseudo-random number generator
which would be compatible across these two packages?
Cheers,
JP
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Joseph Coveney
Sent: 06 April 2005 22:05
To: Statalist
Subject: Re: st: Stata vs. SAS (random number generation)
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?
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/