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

st: re: ranking test scores


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: ranking test scores
Date   Sun, 20 Mar 2005 22:11:39 -0500

. egen rank =rank(score) ,field

Raphael wrote

I would like to create the variable rank based on the
variable score as given below.  This has proved more
difficult than previously thought. Can any one help?

         id       score       rank
  1.        8        90          1
  2.        7        40          2
  3.        6        20          3
  4.        5        20          3
  5.        4        20          3
  6.        3         8          6
  7.        2         6          7
  8.        1         6          7

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html

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