I am working with panel data and am trying to create a new proportional variable defined as the number of ids with greater income than the ith id in each time period. Phrased otherwise, the new variable should reflect the proportion of ids with greater income than the ith id for each time period. I am drawing a blank with how to successfully code this concept.