Statalist


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

Re: st: panel data- assigning rank by country and year


From   [email protected]
To   [email protected]
Subject   Re: st: panel data- assigning rank by country and year
Date   Thu, 15 Jan 2009 12:42:39 +1000

Further to my query below:
I just found that I have a number of missing and negative values. Is there anyway I can exclude these cases when I assign the country ranks?

----- Original Message -----
From: [email protected]
Date: Thursday, January 15, 2009 11:42 am
Subject: st: panel data- assigning rank by country and year
To: "[email protected]" <[email protected]>

> Hi,
> I am trying to assign ranks to country observations within 
> years. By this I mean that I want to assign a score for each 
> observation (within a country) within that specific year. 
> So far, I have calculated:
> egen rank_var = rank(var) ---- this seems to provide ranks to 
> countries, but does not take into account yearly changes.  
> I tried: 
> bysort year Count: egen rank_var= rank(var)--- but this does not 
> seem to work either. Is this something to do with subscripting? 
> Any suggestions would be most welcome.
> Thanks
> 
> 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index