I'm trying to rank observations, but would like to give no 1 to the highest number. I have tried ranking by using the command below, but i couldn't seem to reverse the ranking in the way I want. bysort group_id (var_to_rank): gen desired_rank = sum(var_to_rank != var_to_rank[_n-1])
-
Login or Register
- Log in with
Comment