[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: How to create a rank?
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,
Reo.
*
*   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/