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: slow execution of duplicates drop varlist, force


From   Kristoffer Milonas <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: slow execution of duplicates drop varlist, force
Date   Tue, 26 Jun 2012 15:16:52 +0000

Dear list users,
I wonder why the syntax duplicates drop varlist,force takes so long time on large datasets compared to doing it manually. 

Suppose for instance that varlist is groupvar1 groupvar2 ... groupvark. It seems to me that I can then drop duplicates manually by typing 
sort groupvar1 ... groupvark
keep if groupvar1!=groupvar1[_n-1] | ... | groupvark!=groupvark[_n-1].

The latter is much faster when I try (using both versions 10 and 11 of Stata). Am I missing some finer points that the duplicates drop command takes into account?

Thanks,

Kristoffer Milonas

Ph.D. Student in Finance
Stockholm School of Economics



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