Announcement

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

  • Marginsplot for categorical IV and categorical DV?

    I am trying to figure out how to visually show marginal effects of categorical IVs on categorical DVs.

    mlogit cluster4 ib2.dualcitizenship, base(4)
    margins r.dualcitizenship
    marginsplot, horizontal plotopts(connect(i)) xline(0)

    However, in the resulting graph (attached) the lines for the different outcomes overlap. Is there away to offset them just a little to have better visualization or another solution. I would like to see the marginal effects per contrast of the IV on each outcome possibility.
    Attached Files

  • #2
    You could plot one predicted outcome at a time and recast your plot to show bars. Maybe something like this:

    Code:
    margins r.dualcitizenship, predict(outcome(1))
    marginsplot, recast(bar) plotopts(barw(.8))
    Repeat this for your other outcomes and optionally combine the four graphs into one graph using graph combine.

    Best,
    Alan

    Comment


    • #3
      My -mplotoffset-, available from SSC, is designed for exactly this case.

      Comment


      • #4
        Alan Neustadtl, that's a great alternative! Thank you very much. Works like a charm.

        Comment


        • #5
          Originally posted by Nicholas Winter View Post
          My -mplotoffset-, available from SSC, is designed for exactly this case.
          Thank you very much. This is exactly what I was looking for.

          Comment

          Working...
          X