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]
Re: st: Routine from do-file that every time it's run gives a different result
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Routine from do-file that every time it's run gives a different result
Date
Thu, 7 Nov 2013 18:16:45 +0000
No. -xtile- sorts the data for you if they are not sorted, but
whatever it changes is done only temporarily.
As Sergiy implies, subdivision by quantiles (e.g. quintiles) is
reproducible if you use the same rules for calculating quantiles.
See also e.g. Hyndman and Fan on quantile calculation. There is a copy
(licit or not) at
https://www.amherst.edu/media/view/129116/original/Sample+Quantiles.pdf
Nick
[email protected]
On 7 November 2013 18:05, Clarice Martins <[email protected]> wrote:
> After Nick's comment: (Thanks, Nick also!)
>>> And -xtile- is written -sortpreserve-
>>> so it doesn't change the sort order of your data.
>
>
> Do this means that I need to be aware of how data is sorted before using -xtile- ?
*
* 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/