Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: rank error?


From   Jeph Herrin <[email protected]>
To   statalist <[email protected]>
Subject   st: rank error?
Date   Tue, 27 May 2003 18:18:41 -0400

Hi all,

According to the documentation, egen's -rank- function should,
with -field- or -track- switches, give me consecutive ranks. Yet
when I try:

. egen rank=rank(var1), track

I get non-consecutive ranks:

. tab rank

 track rank |
 of (beta1) |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |          5        0.83        0.83
          6 |          5        0.83        1.66
         11 |          6        1.00        2.66
         17 |          8        1.33        3.99
         25 |          8        1.33        5.32
         33 |          4        0.67        5.99
         .
         .
         .

I've been looking at this for half an hour and finally figured
either there's something wrong with egen's rank, or there's something
wrong with me.

Any opinions?

cheers,
Jeph
--
Jeph Herrin
[email protected]

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