Dear all,
I would like to ask for your help to create a horizontal graph showing two dots and a line connecting them, one dot for individuals in group 1 and another dot (in a different color) for individuals of group 2. This graph is like a "graph dot" but I think it is known as a dumbell graph.
The rows in the graph would indicate different characteristics of these individuals, as represented by binary variables. For example, one row would indicate the share of men in groups 1 and 2, while another row would indicate the share of individuals in each group that have a given schooling level (i.e., less than primary complete, primary complete, attended secondary or secondary or more complete).
My data set is already collapsed to show these statistics for groups 1 and 2. Below you can see an example of a Stata graph that is similar to what I want to do, with the difference that the blue dots would indicate group #1, red dots would indicate group #2 and each row would indicate each binary variables (e.g., Female, Male, Less than primary complete, Primary complete, Attended secondary, Secondary or more complete, Rural, and Urban). And ideally there would exist a line connecting the dots and not need of other dots as in the figure below (I mean: ideally for each row I would like to have the red and blue dots and a line connecting them to make the graph visually clean).
Any help is greatly appreciated.
Thanks.
I would like to ask for your help to create a horizontal graph showing two dots and a line connecting them, one dot for individuals in group 1 and another dot (in a different color) for individuals of group 2. This graph is like a "graph dot" but I think it is known as a dumbell graph.
The rows in the graph would indicate different characteristics of these individuals, as represented by binary variables. For example, one row would indicate the share of men in groups 1 and 2, while another row would indicate the share of individuals in each group that have a given schooling level (i.e., less than primary complete, primary complete, attended secondary or secondary or more complete).
My data set is already collapsed to show these statistics for groups 1 and 2. Below you can see an example of a Stata graph that is similar to what I want to do, with the difference that the blue dots would indicate group #1, red dots would indicate group #2 and each row would indicate each binary variables (e.g., Female, Male, Less than primary complete, Primary complete, Attended secondary, Secondary or more complete, Rural, and Urban). And ideally there would exist a line connecting the dots and not need of other dots as in the figure below (I mean: ideally for each row I would like to have the red and blue dots and a line connecting them to make the graph visually clean).
Any help is greatly appreciated.
Thanks.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str38 vars float(group1 group2) "Female" 32.9 50.6 "Male" 67.1 49.4 "educ_level==Less than primary complete" 27.3 21.2 "educ_level==Primary complete" 72.3 78.4 "educ_level==Attended secondary" 14.1 26.6 "educ_level==Secondary or more complete" 58.6 46.4 "Rural" 26.7 25.3 "Urban" 73.3 74.7 end
Comment