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: Default sortseed


From   "Tsivanidis, Nick" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Default sortseed
Date   Tue, 10 Jan 2012 23:06:17 +0000

Hi all,

I am working with a dataset that has been sorted on non-unique variables before dropping duplicates. I am trying to clean this up so that I can recreate the duplicates that were dropped, but without the obvious bugs present in this method.

I'm observing an strange pattern - when I run the do file from the shell (i.e. Stata is not already open), the sort is exactly the same every time. This is unexpected since Stata breaks ties randomly in the case of non-unique sorts. On the contrary, when I run the same do file twice within one Stata session, the sorted data is different as expected.

One reason I can think of to explain this is that the sortseed is set to its default every time Stata is launched. So whenever this do file is run in a new Stata session, the sortseed is the same (default) which gives me the same order in the sorted data. This would explain why the data differs when the do file is run twice within the same session - Stata changes the sortseed if it is not fixed by the user.

My question is: does anyone know the default sortseed?

Many thanks,

Nick


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