Could anyone please suggest a way to rank groups by the frequency of values in another variable.
In the mock example below, how could I obtain the variable "rankfreq"?
In the mock example below, how could I obtain the variable "rankfreq"?
Code:
clear input str1 to_rankfreq float rankfreq "a" 1 "a" 1 "a" 1 "b" 2 "b" 2 "c" 3 end
Comment