Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: AW: AW: AW: AW: Error in egen rank(), unique?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: AW: AW: AW: AW: Error in egen rank(), unique?
Date   Tue, 3 Nov 2009 17:04:41 -0000

This is the same problem as bit you last time. See my earlier post. 

You are overwriting the results of -egen, rank()- with your own
-replace-. You are responsible for this, not -egen-. 

Nick 
[email protected] 

Kaulisch, Marc

I see the problem or a counter-intuitive result as follows:
The egen rank(), unique gives the following ranks:
1 2 3 3
If the sequence is 2007m8 2008m5 . 2009m3

In my opinion it is counter-intuitive because
1) I understand unique as giving not identical ranks - but it does if a
missing is inserted
2) I would think that a rank command sorts the values in the var on its
own and does not need help to perform this


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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