[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: How to create a rank?

From   "Song" <>
To   <>
Subject   st: How to create a rank?
Date   Sun, 2 Mar 2008 11:25:00 -0600

Dear Statalisters,

I am trying to create 'rank' based on total revenues. I used the following command:

sort revenue
egen rank=group(revenue)

The result is that the smallest revenue is 1 and the highest revenue is 100, for example. How can I reverse the rank? I want the highest revenue to be number '1'.

Thank you,

* For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index