Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Query on -set seed-


From   Richard Goldstein <richgold@ix.netcom.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Query on -set seed-
Date   Mon, 07 Feb 2005 16:51:03 -0500

I'm confused -- what is illegal about this seed? it is clearly much smaller than 2^31 -1

Rich

Roger Newson wrote:


Fellow Statalisters (especially StataCorp):

According to -[R] functions-, the -set seed- command can take any seed from 0 to 2^31-1 inclusive, and, if I specify a seed with one of these values in a do-file under -version- control and then use the -uniform()- function, then the same result will be produced every time I execute that do-file with the same input data. My query is, will this still be the case if I set the seed to an even higher integer? I ask because, last July, I inadvertently wrote a do-file containing the statements

set seed 4753533809;
gene double ranord2=uniform();

and executed it on 15 July 2004 under Stata 8.2 under Windows 2000, producing some random-looking results and no complaints about the illegally high seed. However, when I re-executed the same do-file today (7 September 2005) with the same input dataset under the Stata 8.2 update dated 10 January 2005, it produced a completely different set of random-looking results, and still no complaints about the same illegally high seed. Have there been any unpublicised revisions to -set seed- or to -uniform()- affecting the response to an illegally high seed?

Best wishes (and thanks in advance)

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: roger.newson@kcl.ac.uk
Website: http://phs.kcl.ac.uk/rogernewson/

Opinions expressed are those of the author, not the institution.

*
* 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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index