Hello, I have a question. Suppose I have a dataset as follows,
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int(villageid expenditure) float medianexp byte decileexpend 3101 500 585 3 3101 600 585 5 3101 570 585 4 3101 960 585 10 3102 850 542.5 8 3102 400 542.5 2 3102 685 542.5 6 3102 375 542.5 1 3103 900 695 9 3103 100 695 1 3103 620 695 6 3103 770 695 7 end
Where medianexp is the median expenditure for each village (based on villageid) and decileexpend is the decile of each expenditure data belonging to the whole distribution (including villageid 3101 3102 3103). My question is, is there a way to find out to which decile does the median expenditure belongs, based on the whole expenditure distribution? Thank you very much.
Comment