Announcement

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

  • Altering size of dots when using marginsplot

    I am graphing my output using -marginsplot- and am running into trouble altering the size of the markers. I've read through other posts on this list and created the following code accordingly, but am getting an error that "option msize() is not allowed." If anyone has a workaround for me, I would appreciate it. My CIs are so narrow that the default marker size is obscuring their bands.

    marginsplot, title (Total Health System Costs) ytitle (Costs(2014USD)) xtitle(Month) xsc(reverse) msize(vtiny)

  • #2
    I think the help for marginsplot says you can do this within the plotopts(plot_options) option.

    Comment


    • #3
      Dave is correct. Here are some examples.

      Code:
      clear *
      webuse nhanes2
      regress bpsystol agegrp##sex
      // Interaction plot
      margins agegrp#sex
      
      // Plots with sizes selected from list at <help markersizestyle>
      marginsplot, plotopts(msize(tiny))   name(tiny)
      marginsplot, plotopts(msize(small))  name(small)
      marginsplot, plotopts(msize(medium)) name(medium)
      marginsplot, plotopts(msize(large))  name(large)
      marginsplot, plotopts(msize(huge))   name(huge)
      --
      Bruce Weaver
      Email: [email protected]
      Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
      Version: Stata/MP 18.0 (Windows)

      Comment


      • #4
        Thank you! I modified as follows and it worked:

        marginsplot, title (Total Health System Costs) ytitle (Costs(2014USD)) xtitle(Month) xsc(reverse) plotopts(msize(vtiny))

        Comment

        Working...
        X