Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: how to generate ranked variable for each year in panel data


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: how to generate ranked variable for each year in panel data
Date   Thu, 23 Dec 2010 07:45:00 +0000

Sounds like a case for

. search rank

and

. help egen

and

. egen rank_on_myvar = rank(myvar), by(country)

Nick Cox

prakash singh
==========

> I am interested to generate a variable in panel data where I want to
> rank country for each year in the panel.
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index