0
votes

I have multiple regressions and I used the coefplot command to add all of the confidence intervals on one graph with a bar. Is it possible to change the color of the bars to be the same for each dependent variable in the graph. Here is my code below:

coefplot (A, label("Male")) (B, label("Female")) (C, label("Male")) (D, label("Female")) (E, label("Male")) (F, label("Female")) (G, label("Male")) (H, label("Female")), xline(0) recast(bar) ciopts(recast(rcap)) citop barwidt(0.3)

Thank you.

1
It's easier to help if you can provide a data example. Please read help dataex and the stata tag wiki. I would suggest looking through the documentation of help coefplot and graph bar as a starting point.Cybernike

1 Answers

1
votes

You should be able to do something like

coefplot (A, label("Male") bcolor(grey)) (B, label("Female") bcolor(blue)) ///
         (C, label("Male") bcolor(grey)) (D, label("Female") bcolor(blue)) ///
         (E, label("Male") bcolor(grey)) (F, label("Female") bcolor(blue)) ///
         (G, label("Male") bcolor(grey)) (H, label("Female") bcolor(blue)), ///
         xline(0) recast(bar) ciopts(recast(rcap)) citop barwidt(0.3)

This would make it so that all the bars labeled "male" are grey and those labeled "female" are blue.