Hi all, can someone please assist me with how to add error bars to the bar graph attached. Thanks.
-
Login or Register
- Log in with
graph bar response_time, over(younger) over(blur) asyvars
webuse nlswork, clear
keep if ind_code == 8
statsby, by(collgrad south) clear : ci means ln_wage
gen x1 = south - 0.1
gen x2 = south + 0.1
twoway rcap ub lb x1 if collgrad == 0, lcolor(orange) || ///
rcap ub lb x2 if collgrad == 1, lcolor(blue) || ///
scatter mean x1 if collgrad == 0, ms(O) mc(orange) || ///
scatter mean x2 if collgrad == 1, ms(T) mc(blue) ///
ytitle(ln_wage) xla(0 "North" 1 "South") ///
legend(order(3 "not graduate" 4 "graduate")) aspect(1) xsc(r(-0.2 1.2))
Comment