Help using Base SAS procedures

Question on proc rank

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

Question on proc rank

I have variables asset, year. I want to rank asset by year, that is to rank asset within each year. There is no tie in the asset. I want to have four groups of equal sizes based upon the rank of asset.  I used proc rank procedure. I used groups=4 option. But in the result, the number of obs in each group is not equal. Why are they not equal? How to do this correctly?Thanks.


Accepted Solutions
Solution
‎11-15-2017 08:10 AM
PROC Star
Posts: 1,283

Re: Question on proc rank

Provide some example data to get a code answer Smiley Happy

View solution in original post


All Replies
Solution
‎11-15-2017 08:10 AM
PROC Star
Posts: 1,283

Re: Question on proc rank

Provide some example data to get a code answer Smiley Happy

Super User
Posts: 10,787

Re: Question on proc rank

try

proc rank data=have groups=4 tie=dense;

by year;

var asset;

run;

☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 222 views
  • 0 likes
  • 3 in conversation