Hi,
I wrote a code snippet below to create a vertical bar chart by severity of disciplinary action. Now, I want to add brackets to indicate there is a statistical difference in the mean value between the blue bar (mean=0.5184)and red bar (mean=0.4876) for students who received minor disciplinary actions. Although there is a thread that provided some hints at https://www.statalist.org/forums/for...l-significance, I still don't know how to do this in Stata.
clear
input byte race outcome infraction1 infraction2 infraction3
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
grstyle init
label define race_label 1 "Black" 2 "Hispanic" 3 "White" 4 "Other"
label values race race_label
label define outcome_label 1 "Low" 2 "Medium" 3 "High"
label values outcome outcome_label
graph bar (mean) infraction2, over(race, label(angle(45) format(%9.0g))) over(outcome) asyvars blabel(total) ytitle("Predicted Probability of Disciplinary Action") title ("Medium Infractions")
graph export "Medium Infractions.gph", replace
Thank you for your help!
I wrote a code snippet below to create a vertical bar chart by severity of disciplinary action. Now, I want to add brackets to indicate there is a statistical difference in the mean value between the blue bar (mean=0.5184)and red bar (mean=0.4876) for students who received minor disciplinary actions. Although there is a thread that provided some hints at https://www.statalist.org/forums/for...l-significance, I still don't know how to do this in Stata.
clear
input byte race outcome infraction1 infraction2 infraction3
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
grstyle init
label define race_label 1 "Black" 2 "Hispanic" 3 "White" 4 "Other"
label values race race_label
label define outcome_label 1 "Low" 2 "Medium" 3 "High"
label values outcome outcome_label
graph bar (mean) infraction2, over(race, label(angle(45) format(%9.0g))) over(outcome) asyvars blabel(total) ytitle("Predicted Probability of Disciplinary Action") title ("Medium Infractions")
graph export "Medium Infractions.gph", replace
Thank you for your help!
Comment