Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: st :why one ml program doesn't give the same results twice ?


From   Valerie Orozco <Valerie.Orozco@toulouse.inra.fr>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: st :why one ml program doesn't give the same results twice ?
Date   Wed, 5 May 2010 07:46:29 +0000

The seed was the point! It explains my different results running my ML program twice in one Stata session!!!
I would like to thank very much Stas, Richard and Maarten for their helpful ideas!!!
Thank you very much!!!
valérie


--- Stas Kolenikov
 Theoretically, it is possible that -ml search- produced
 random starting values that led to a different local maximum.

--- On Tue, 4/5/10, Valerie Orozco wrote:
 The problem is that closing Stata,
 opening another Session, and running gives the same
 results.
 The difference appears when running after a previous
 estimation (of same ml program)
 
That does not preclude Stas's suggestion: the seed is reset
as you start a new session. For example type -di runiform()-
close stata, start a new session, and type -di runiform()-
again, you'll see that both give the same results.

So, to test this you'll need to start with 
set seed 12345
set sortseed 12345
macro drop _all
<your ml program>

set seed 12345
set sortseed 12345
macro drop _all
<your ml program>

Hope this helps,
Maarten



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index