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)
Adjusting the dataset to create a Panel Data AnalysisHello everybody, I have probably a rather simple question, but I still spent hours to solve it, so …
xtdpd and Hansen testHello, Is there any command to run Hansen test after xtdpd? I know I could use xtabond2 to do so, b…
statistical test and regressionHello everyone, I have a time series dataset spannig from 1950 to 2018. I also have a dummy variable…
insufficient observation error on using xtreg re and all variables omitted in xtreg feDear Experts, I am using xtreg fe and xtreg re on my panel dataset of 2921 firms. have declared the …
Plotting survival curves from stpm2I'm looking to plot differences in survival between treatment groups. The KM curves are far from pro…
Subscribe to:
Post Comments (Atom)
0 Response to (possibly) simple bar graph comparing two variables (not one variable over the other)
Post a Comment