Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bar gap option in marginsplot

    Hello,
    I am trying to plot, using marginsplot, the predicted values of wealth by family structure, where the predicted values are represented in a bar graph. I would like there to be a gap between the childless adult bars and adults with children bars, such that the childless adult bars are plotted first, with a gap, followed by the adult with children bars. I have a mutually exclusive variable that defines family structure, called "famcat", that takes on values 1-10. The commands are as follows, where wealth is a function of family structure and years:

    reg wealth i.famcat i.year [aw=weight]
    margins famcat
    marginsplot, xdimension(famcat) << other graph options here >>

    Thank you,
    Christina

  • #2
    How about using the bar width option as in the following program:
    Code:
    sysuse auto, clear
    regress mpg weight i.rep78
    margins rep78
    marginsplot, recast(bar) noci plotopts(barw(.8)) ylabel(10(2)24

    Comment

    Working...
    X