It would be interesting to learn how another
approach compares: computing the ranks using
-egen, rank()- and then computing the Spearman
via -egen, corr()- from -egenmore- from SSC.
You should only need to -sort- once.
Nick
[email protected]
David Airey
> Just to follow up, I had complained about the slowness of statsby
> when the number of "by groups" is large, as in gene microarray data.
> In my case the number of by groups was about 22,000 and the rows
> about 300,000. I wanted to run a spearman correlation, and
> return the
> results to a file using statsby. I chose to break the file into
> smaller files of 500 "by groups" each. I then found statsby was
> performing at a speed that I could tolerate. That speed was 11
> minutes for the main loop of about 22,000 tests, (2000 test every
> minute or .03 seconds per test). Since statsby is a very convenient
> command, this seems a reasonable approach to recommend to others.
>
*
* 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/