Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[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 <[email protected]>
To   "[email protected]" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index