Hello,
The color of the fourth bar is not pure yellow, and I really don't know what the real name of this color is.
Also, the color of the 3rd bar is not pure green.
Can someone tell me the truth?
Thank you!
clear
input byte race outcome minor medium severe
1 1 .7048 .5184 .3047
2 1 .7004 .4876 .1779
3 1 .7232 .5578 .3354
4 1 .7284 .5508 .2053
1 2 .2429 .3565 .4077
2 2 .2461 .3705 .3543
3 2 .2297 .3363 .4086
4 2 .2258 .3401 .3744
1 3 .0522 .1251 .2875
2 3 .0535 .1419 .4687
3 3 .0471 .1059 .2561
4 3 .0457 .1091 .4204
end
// Set graph style
grstyle init
// Add race labels
label define race_label 1 ///
"Black" 2 "Hispanic" ///
3 "White" 4 "Other"
label values race race_label
// Add outcome labels
label define outcome_label 1 ///
"Low Disciplinary Action" ///
2 "Medium Disciplinary Action" ///
3 "High Disciplinary Action"
label values outcome outcome_label
g outcomeracee = race if outcome == 1
replace outcomeracee = race+5 if outcome == 2
replace outcomeracee = race+10 if outcome == 3
sort outcomeracee
list outcomeracee outcome race, sepby(outcome)
set scheme s1color
// Medium Infractions Graph with symbols that show statistical significance.
tw (bar medium outcomeracee if race==1, bcolor(blue)) ///
(bar medium outcomeracee if race==2, bcolor(red)) ///
(bar medium outcomeracee if race==3, bcolor(green)) ///
(bar medium outcomeracee if race==4, bcolor(yellow)), ///
legend(row(4) position(right) ///
order(1 "Hispanic" 2 "Black" 3 "White" 4 "Other")) ///
legend(region(lstyle(none))) ///
xlabel(0(5) 15) ylabel(0(0.2) 0.8) ///
xlabel( 3 "Low" 8 "Middle" 13 "High", noticks) ///
ytitle("Predicted Probability of Disciplinary Action") ///
title("Minor Infractions") xtitle("") ///
plotregion(style(none))
Comment