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-sorting by the same variable or storing a permutation vector?


From   László Sándor <sandorl@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: re-sorting by the same variable or storing a permutation vector?
Date   Wed, 4 Apr 2012 18:04:27 -0400

Wise peers,

Allow me another question, hopefully of general interest: If I would
need to resort to re-sorting (pun intended) my data multiple times, am
I not better off if I store a permutation vector (after the first
sort, obviously) in a variable and just reapply that? Is there a
faster way to do that than invoking Mata and putting my entire data
over there? (A monster st_view() if there ever was one.) I know Mata
allows fast sorting and permutation vectors (/ subscripting). Is that
the efficient way to go?

http://stata.com/help.cgi?[M-5]+sort()
http://www.stata-journal.com/sjpdf.html?articlenum=pr0028

Thanks for any thoughts on this too,

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