Hello Statalist Friends-
I have a bar graph that I made after a margins command. It is showing the right data, but the presentation is suboptimal IMO. Currently, the bars are clustered around one of the coefficients (raceet=race/ethnicity) and each different color of bar represents a different model (i.e. raceplot_wrkilf raceplot_wrkelf raceplot_lfiwrk raceplot_lfewrk).
I would like to reverse this so that instead of three clusters (of coefficients) each comprised of four bars (of models), it is four clusters (of models) of three bars (of coefficients).
The current graph (that I would like to fix) is attached, and here is my syntax:
Thank you in advance for your help.
Kind regards,
Ben
I have a bar graph that I made after a margins command. It is showing the right data, but the presentation is suboptimal IMO. Currently, the bars are clustered around one of the coefficients (raceet=race/ethnicity) and each different color of bar represents a different model (i.e. raceplot_wrkilf raceplot_wrkelf raceplot_lfiwrk raceplot_lfewrk).
I would like to reverse this so that instead of three clusters (of coefficients) each comprised of four bars (of models), it is four clusters (of models) of three bars (of coefficients).
The current graph (that I would like to fix) is attached, and here is my syntax:
Code:
foreach y of varlist wrkilf lfiwrk wrkelf lfewrk { quietly mixed `y' i.raceet i.educ i.gender agey || id: quietly margins raceet, atmeans grand post est sto raceplot_`y' } coefplot raceplot_wrkilf raceplot_wrkelf raceplot_lfiwrk raceplot_lfewrk, recast(bar) drop(_cons) vert barw(.2)
Thank you in advance for your help.
Kind regards,
Ben
Comment