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: Is 'sorting' a 'change'?
From
Sergiy Radyakin <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Is 'sorting' a 'change'?
Date
Wed, 14 Aug 2013 20:53:05 -0400
Dear Statalisters,
I don't have a strong preference, but it seems to me that changing the
order of observations in a dataset should be counted as a change. I
might be wrong. But there are others who think same: "Sorting is not
only computationally very intensive but also changes the data" quote
from http://personal.lse.ac.uk/lembcke/ecStata/2009/MResStataNotesFeb2009PartB.pdf
Currently, for Stata a change of the sorting order is NOT considered
to be a change to data.
sysuse auto
describe
sort price
describe
display c(changed)
The above code illustrates that. Look at the changed flag. This is,
perhaps, because of implementation, that during the sort the data
stays in place and only the pointers to observations are swapped.
Counter argument, I think, would be that "the data has not changed. It
is the way the data is stored that has changed". But if I had to
export the data to CSV before and after the sort and compare it
cell-by-cell with an external tool, pretty much any such tool would
tell me that I do have different datasets.
What do you think?
Thank you, Sergiy
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/