Hi everyone,
I would like to create in Stata a figure similar to the one shown at the end of this post, using the example dataset provided below (generated with dataex).
The figure consists of four panels arranged in a 2×2 layout:
• The top panels show horizontal bar charts with the share of workers in three categories:
(i) wage increases, (ii) same wage, and (iii) wage declines
Each category has two bars, corresponding to two groups: BF and Non-BF.
• The bottom panels show coefficient plots with point estimates and 95% confidence intervals.
These coefficients represent the difference (in percentage points) between BF and Non-BF for each category.
• The left column corresponds to job stayers, while the right column corresponds to job movers.
• The y-axis categories are shared across panels and ordered from top to bottom as:
wage increases, same wage, and wage declines.
Ideally, I would like:
1. The bars in the top panels to be horizontal and grouped by category.
2. The coefficient plots in the bottom panels to also be horizontal (with x-axis in percentage points).
3. The y-axis categories to align perfectly across the top and bottom panels.
4. A vertical reference line at zero in the bottom panels.
5. A clean layout where the two columns correspond to "Job Stayers" and "Job Movers".
Could you please advise on how to implement this type of multi-panel figure in Stata?
Many thanks in advance!
Best,
Otavio
I would like to create in Stata a figure similar to the one shown at the end of this post, using the example dataset provided below (generated with dataex).
The figure consists of four panels arranged in a 2×2 layout:
• The top panels show horizontal bar charts with the share of workers in three categories:
(i) wage increases, (ii) same wage, and (iii) wage declines
Each category has two bars, corresponding to two groups: BF and Non-BF.
• The bottom panels show coefficient plots with point estimates and 95% confidence intervals.
These coefficients represent the difference (in percentage points) between BF and Non-BF for each category.
• The left column corresponds to job stayers, while the right column corresponds to job movers.
• The y-axis categories are shared across panels and ordered from top to bottom as:
wage increases, same wage, and wage declines.
Ideally, I would like:
1. The bars in the top panels to be horizontal and grouped by category.
2. The coefficient plots in the bottom panels to also be horizontal (with x-axis in percentage points).
3. The y-axis categories to align perfectly across the top and bottom panels.
4. A vertical reference line at zero in the bottom panels.
5. A clean layout where the two columns correspond to "Job Stayers" and "Job Movers".
Could you please advise on how to implement this type of multi-panel figure in Stata?
Many thanks in advance!
Best,
Otavio
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str8 panel str6 group str20 category float(share coef ci_low ci_high) "Stayers" "NonBF" "wage increases" 0.50 0.05 0.02 0.07 "Stayers" "BF" "wage increases" 0.55 0.05 0.02 0.07 "Stayers" "NonBF" "same wage" 0.30 -0.02 -0.04 0.00 "Stayers" "BF" "same wage" 0.25 -0.02 -0.04 0.00 "Stayers" "NonBF" "wage declines" 0.20 0.03 0.01 0.05 "Stayers" "BF" "wage declines" 0.20 0.03 0.01 0.05 "Movers" "NonBF" "wage increases" 0.40 0.04 0.02 0.06 "Movers" "BF" "wage increases" 0.45 0.04 0.02 0.06 "Movers" "NonBF" "same wage" 0.25 -0.01 -0.03 0.01 "Movers" "BF" "same wage" 0.20 -0.01 -0.03 0.01 "Movers" "NonBF" "wage declines" 0.35 0.02 0.00 0.04 "Movers" "BF" "wage declines" 0.35 0.02 0.00 0.04 end

Comment