DATA Step, Macro, Functions and more

Identifying top 1% of participants

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 138
Accepted Solution

Identifying top 1% of participants

Hi all,

I'm working with a dataset composed of an ID variable and an amount variable. I need to be able to isolate those participants in the top 1% for highest amounts, but I'm unsure how to do so. That is, I need to know the IDs of those with the top 1% of amount values--not what the 99th percentile amount is.

Any help is much appreciated!


Accepted Solutions
Solution
‎07-25-2014 02:34 PM
Trusted Advisor
Posts: 1,231

Re: Identifying top 1% of participants

Posted in reply to Walternate

Hi,

Try this.

proc rank data=have out=want descending groups=100 ties=high;

   var amount;

   ranks AmountRank;

run;

View solution in original post


All Replies
Solution
‎07-25-2014 02:34 PM
Trusted Advisor
Posts: 1,231

Re: Identifying top 1% of participants

Posted in reply to Walternate

Hi,

Try this.

proc rank data=have out=want descending groups=100 ties=high;

   var amount;

   ranks AmountRank;

run;

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 161 views
  • 0 likes
  • 2 in conversation