Dear Statalist,
Unfortunately, I need to bother you because of a simple bar graph. I am a rookie concerning Stata and can't fix the problem by myself.
I tried to work it out for hours but without any good solution.
Here is what I want to do:
I asked in a survey individuals whether they know a certain German law (simple yes/no question). The participants are grouped into treatment and a control group. Now, I want a bar graph which displays the percentage of participants who answered the question with yes or no according to their group membership. That means, I want a graph with four bars (yes(treatment), yes(controls); no(treatments, no(controls). My problem is, that I can get either a graph which looks the way I like but with wrong percentages or a graph with correct percentages but it doesn't look the way I like.
To give you an example:

My graph should look like this, but in this graph the percentage are wrong (e.g. 84% of the treatments answered the question with yes).
I want that each bar displays not the total percentages, but the percentage of each subgroup.

In this graph, I have the correct percentages for each subgroup. But I would prefer, if the two "yes-bars" and "no-bars" would be together, so that it would be easy to compare them.
Is there a way how I can achieve this? I would be so grateful if you can give me a small example how I can work it out.
In normal circumstances I would try it by myself till I have worked it out, but the deadline for my master thesis is very soon.....
Greetings
Fabian
Unfortunately, I need to bother you because of a simple bar graph. I am a rookie concerning Stata and can't fix the problem by myself.
I tried to work it out for hours but without any good solution.
Here is what I want to do:
I asked in a survey individuals whether they know a certain German law (simple yes/no question). The participants are grouped into treatment and a control group. Now, I want a bar graph which displays the percentage of participants who answered the question with yes or no according to their group membership. That means, I want a graph with four bars (yes(treatment), yes(controls); no(treatments, no(controls). My problem is, that I can get either a graph which looks the way I like but with wrong percentages or a graph with correct percentages but it doesn't look the way I like.
To give you an example:
My graph should look like this, but in this graph the percentage are wrong (e.g. 84% of the treatments answered the question with yes).
I want that each bar displays not the total percentages, but the percentage of each subgroup.
In this graph, I have the correct percentages for each subgroup. But I would prefer, if the two "yes-bars" and "no-bars" would be together, so that it would be easy to compare them.
Is there a way how I can achieve this? I would be so grateful if you can give me a small example how I can work it out.
In normal circumstances I would try it by myself till I have worked it out, but the deadline for my master thesis is very soon.....

Greetings
Fabian
Comment