Announcement

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

  • Using marginsplot, category labels and plots overlap.

    I use Stata 15.1 SE on Windows 10.
    I am calculating predictive margins following an ologit in the svy command context. The factor predictor has 15 categories. When I use marginsplot to create a graph of the predictive margins, the bottom three and top three categories overlap with each other. So in the image, the top line combines the three lowest categories of variable reltrad4 (codes 1100, 1200 and 1300, respectively) and the bottom line combines the three highest categories (coded 100001, 100002, and 100003, respectively).
    Click image for larger version

Name:	wielhouwer problem example 1.png
Views:	1
Size:	189.9 KB
ID:	1485164

    The marginsplot command I used to generate this is:
    marginsplot, horizontal yscale(reverse)
    I've tried extending the axis and other things, but can't resolve the problem of separating out these categories.
    Thanks in advance for any help!

  • #2
    Never mind, I figured it out! I resecaled the Y axis variable above to make the coded values of the variable equidistant, and the regenerated chart was scaled correctly.

    Comment

    Working...
    X