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

Re: st: RE: rank error?


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: RE: rank error?
Date   Wed, 28 May 2003 07:29:28 -0400

Nick Cox wrote:
I think Melony is correct.

The documentation is terse, but I don't think either it or the code is
in error.

I'll allow that the documentation is ambiguous: "the track
option calculates the track rank of -exp-; the lowest value
is ranked 1, and there is no correction for ties. Two values that
are tied for 2nd remain rank 2". One reading of this is that
two values tied for lowest would both be ranked 1; values tied
for the next lowest value would be ranked 2. I see now that
one doesn't have to read it that way.

I think what Jeph may be looking for is the -unique- option.

Not at all; -unique- assigns different ranks to values of -var1-
having the same value. I want all values of -var1- to have the
same rank, and I want to the ranks to be consecutive integers.

If one wants to do a certain operation on all obs with -var1-==X,
indexing through all the values of X, and do so in order of increasing
X, then the value of such a ranking becomes obvious.

thanks,
Jeph


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