Dear All, Suppose that I have data on Gini coefficient.
I'd like to separate the data into four categories, with 30, 40, and 50 as the threshold. Clearly, these four segments include (gini<=30), (30<gini<=40), (40<gini<=50), and (gini>50). My question is how to draw a histogram in such a case? Thanks.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float gini 59 48.9 35 57 40 36.7 57.3 49 60 51.3 50.1 54 52.5 59.1 38.3 51 43 57 43 45.5 53.3 59.5 38.2 44.5 39.9 39.7 44.5 57 47.8 42.9 56.5 51.6 43.8 26 63 46 47.6 25.7 63.3 48.2 37.9 57 48.4 50.6 44.1 35.7 42.4 23.1 38.1 39.9 34.6 19.5 31.5 35.7 41 33.3 42.8 30 24.9 32.1 31.3 27.4 28.1 30.7 28 35 26.9 20.2 48.5 31.6 27.8 22.9 32 35.5 34.4 end
Comment