[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: panel data- assigning rank by country and year
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