[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: RE: Stata vs. SAS (random number generation)
I'm not terribly familiar with the literature, but if you don't want to
use Tim's solution (which I think is an excellent one), then you might
adapt code from Numerical Recipes (Press, Flannery, Teukolsky, and
Vetterling) to Stata and SAS.
On Apr 6, 2005, at 5:56 PM, McKenna, Timothy wrote:
In general I don't think you can get SAS and Stata to do this.
A simple, although embarrassingly inelegant, solution would be to have
Stata (or SAS) generate the random numbers. Then output them to a text
file and have the other program read them in. You would need to be
careful about precision issues, but otherwise it should work fine.
[mailto:email@example.com] On Behalf Of Joao Pedro
Wagner de Azevedo
Sent: Wednesday, April 06, 2005 5:12 PM
Subject: st: Stata vs. SAS (random number generation)
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.
I've tried setting the same seed value in both packages with no
success (see example of the command and output below).
* For searches and help try: