Hi,
I want to create a percentage bar graph showing education level by gender. However, I cannot add confidence intervals to it. If I use this guide: https://www.stata-journal.com/sjpdf....iclenum=gr0045, I am able to get the means. However, I cannot modify it to include percentages. Similarly, I have followed the thread: https://www.statalist.org/forums/for...dence-interval. This has also failed.
I tried catplot and it failed to work.
The code:
Example of the dataset
I want to create a percentage bar graph showing education level by gender. However, I cannot add confidence intervals to it. If I use this guide: https://www.stata-journal.com/sjpdf....iclenum=gr0045, I am able to get the means. However, I cannot modify it to include percentages. Similarly, I have followed the thread: https://www.statalist.org/forums/for...dence-interval. This has also failed.
I tried catplot and it failed to work.
The code:
Code:
catplot gender education, percent(gender) recast(bar) var2opts(label(labsize(small) angle(90))) asyvars bargap(5) blabel(bar , format(%4.1f))
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(gender education) 1 4 1 4 1 5 1 5 1 3 1 2 1 1 1 4 1 4 1 2 1 3 1 5 1 4 1 3 1 5 1 4 1 2 1 3 1 3 1 4 1 2 1 2 1 4 1 3 1 5 1 2 1 4 1 4 1 5 1 2 1 4 1 4 1 2 1 4 1 5 1 3 1 4 1 5 1 1 1 3 1 4 1 3 1 4 1 1 1 4 0 3 0 4 0 3 0 2 0 4 0 2 0 4 0 4 0 5 0 1 0 5 0 5 0 3 0 5 0 4 0 4 0 4 0 1 0 2 0 2 0 5 0 5 0 1 0 3 0 4 0 3 0 5 0 4 0 4 0 4 0 4 0 3 0 4 0 5 0 2 0 3 0 5 0 4 0 3 0 4 0 4 0 4 0 1 0 1 0 3 0 3 0 5 0 4 0 2 0 2 0 2 0 3 0 1 0 2 0 3 end

Comment