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)
Clustering Standard errors at industry versus company levelDear Statalist members I am running a regression with Log stock returns on 1st quarter of 2020 as my…
Negative Innovations using IRF functionsHello, I want to create an IRF for a negative innovation. I read that the standard innovation is a p…
Variable ProblemHi, everybody, How can I change observations with non-numerical content? I have a variable that is n…
Cleaning DataHello, everybody. I've got numerical variables, but where some observations are "1oooo" "150 kg for…
Post hoc test after Fisher Exact testDear users, I am new to the Stata world, and I am not an expert statistician at all. In my master's…
Subscribe to:
Post Comments (Atom)
0 Response to (possibly) simple bar graph comparing two variables (not one variable over the other)
Post a Comment