Announcement

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

  • "drarea" command after marginsplot

    Dear Stata users,
    I would like to ask you a graphical suggestion.

    I have to plot marginal effects in an interaction, and I am using the command marginsplot with the option 'rarea' as following:
    margins male, at(z_spro=(-1.64(0.10)2.60))
    marginsplot, scheme(s1mono) recastci(rarea) name(d2_1_1_q, replace) ylabel (6.5(0.5)8.0)

    The problem with this is that when the confidence intervals overlap it works the rule "last shown, first seen", and so the graphical effect is not wonderful. I know that to overcome this problem it exists the user-made command "drarea", but did not get how specify it after marginsplot.

    Could you suggest me something?
    Thanks a lot, G.

  • #2
    I can't see that drarea has any application here. It can't be applied to other commands.

    You should be above to set fill colors to background, so that you see only boundary lines.

    Comment


    • #3
      Dear Nick,
      thanks for your answer. What do you mean for "set fill colors to background"? This I think would not make the overlap area of a color in between the two I used for the two variables, right?
      When should I use the command drarea then? Only with the command "twoway" ? Can't I reproduce the marginsplot by the command twoway and its options?

      Thanks a lot, G.

      Comment


      • #4
        You are calling up twoway rarea and a click away from its help is

        Code:
        help area_options
        which includes detail on options to change fill colours.

        There is nothing that I know in official Stata graphics that will average your colours when you superimpose different colours.

        Conversely, the only possible application of drarea that I can imagine to your problem is that you look at its code and then clone marginsplot to do what you want. That would be a big project even for whoever wrote marginsplot. Naturally, when I say "that I can imagine" I do mean that and my guess could be pessimistic.

        Comment

        Working...
        X