Hello,
I've spent hours since yesterday to plot a simple bar chart which displays two variables with grouped bars.
However I have not made significant progess and that is why I am asking for Your help now.
(I have not found any prior post here that touches on a problem similar to mine)
The variables are both numerical and discrete in Stata, both only contain values of 1, 2, 3, 4, 5, or 6.
I want to have the bars grouped so the number of observations with A=1 relative to the total observations (i.e. bars with percent values) is right next to the bar with the same for Variable B.
The graph below shows what I would like to archieve in Stata.
Every advice I found concerned problems where one would graph A over B.
That is the same problem that I ran into when trying to get to my desired graph with the graphics editor.
However, that is not what I am looking for and I did not manage to come up with any feasible workaround
I would be really thankful for any advice on my problem.
All I am asking for is the strucure of the command that groupes these bars with percent on the y-axis.
I hope I have been clear and precise enough to solve my problem.
I am sorry if that should not be the case and will correct my post.
Array
Related Posts with (possibly) simple bar graph comparing two variables (not one variable over the other)
Query regarding the Hansen statistic obtained after xtabond2Hello, I have a question regarding running the xtabond2 command, with alternating years of data. I …
Cleaning dataHi, first post on stata forum here: Hello. I have a survey dataset with lots of -5, -4, -3, -2, -1 f…
Lag string variablesHello, I lagged (almost) all my variables, and I noticed that my one string variable is now all mis…
Missing values generated after trying to generate ln function Before trying to generate my variable I had this variable. Code: * Example generated by -datae…
panel data graphHey there, I have a problem with a panel data graph. I have 24 countries in my data but stata only …
Subscribe to:
Post Comments (Atom)
0 Response to (possibly) simple bar graph comparing two variables (not one variable over the other)
Post a Comment