Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65094

Alternative to "egen ranks" ?

$
0
0
Dear all,

Let's assume there are only individuals 1 and 2 in my sample. These individuals provide a ranking for objects x,y,z (From 1 to 3) and ties are allowed.
Individual id object ranked rank given
1 x 1
1 y 1
1 z 3
2 x 1
2 y 2
2 z 3
now my desired ranking is to correct for ties, meaning:
individual id object ranked rank given desired rank
1 x 1 1.5
1 y 1 1.5
1 z 3 3
2 x 1 1
2 y 3 2
2 z 3 3
I know I can normally get the desired ranking via "egen = rank(rank given)".

However, this does not work for my case because the egen would rank my "rank given" without differentiating between the ranking of individual 1 and that of individual 2.


Any suggestions on how to get my desired ranking?

Thanks!

Viewing all articles
Browse latest Browse all 65094

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>