Code:
clear input id var1 rank 123 100 0.00 345 200 0.25 456 200 0.25 567 300 0.75 end
Code:
cumul var1, gen(rank)
Code:
clear input id var1 rank 123 100 0.25 345 200 0.5 456 200 0.75 567 300 1.00 end
I have looked at Nick's post and other postings here, but I have not found quite exactly what I wanted.
Any help would be appreciated. Thank you!
0 Response to Creating a variable that corresponds the proportion of observations that the current observation is larger than
Post a Comment