Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Aggregate constant to scalar and local


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: Aggregate constant to scalar and local
Date   Fri, 13 Oct 2006 14:38:20 +0200

Nick Cox wrote:
> Uli is right. -_pctile- is faster than -summarize, detail-
> to get the median. But, interestingly, not much: a few
> quick experiments indicate ~10% faster. The story,
> presumably, is that most of the work is in the sorting,
> and the fact that -summarize, detail- calculates so much
> more is secondary.

Hm. If I needed the median from data that is not machine readable, I would 
only sort until the half is reached, and would leave the upper half unsorted. 
If Stata did the same the speed increase could be stronger. However, I guess 
Stata is very efficient in sorting. For me, personally, it is always quite a 
burden to sort student's examinations alphabetically, for example. It always 
requires all desks and even the floor of my tiny little office. Wonder if I 
can learn something from how Stata does it. 

Uli

-- 
[email protected]
+49 (030) 25491-361
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index