Announcement

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

  • #16
    Give the example code

    Code:
    regress y lc.x##lc.w##lc.z l.y, vce(cluster ccode)
    margins , dydx(l.x) at(lc.z=(-.4(0.1).4) lc.w=(-.5 0 .5))
    marginsplot
    For each fixed value of lc.w, the plotted marginal effects should be
    linear in lc.z. Contrasting between the same two levels of lc.w within each
    level of lb.z should yield the same test statistic.

    Comment


    • #17
      The example code is

      Code:
      regress y lc.x##lc.w##lc.z l.y, vce(cluster ccode)
      margins , dydx(l.x) at(lc.z=(-.4 0 .4) lc.w=(-.5 0 .5)) post
      marginsplot
      contrast {_at -1 0 0 1} {_at 0 -1 0 0 1} {_at 0 0 -1 0 0 1} {_at 0 0 0 -1 0 0 1} {_at 0 0 0 0 -1 0 0 1} {_at 0 0 0 0 0 -1 0 0 1} {_at -1 0 0 0 0 0 1} {_at 0 -1 0 0 0 0 0 1} {_at 0 0 -1 0 0 0 0 0 1}, pveffects
      However, as you argued, since marginsplot in the example dataset indicates that the three plots are parallel, it should be not surprising that the differences between plot w= -0.5 and w=0 are similarly significant at all values of Z. The same holds true for comparing w= -0.5 and w=0.5 and w= 0 and w=0.5.

      But in my dataset marginsplot shows that the 3 plots are not parallel.
      Click image for larger version

Name:	Graph.png
Views:	3
Size:	61.1 KB
ID:	1302783

      However the test statistics indicate that the differences are similarly (in)significant for w= -0.5, w=0 and w= 0.5, which can be seen in the output of my last post. Although obviously the differences between the 3 plots at low levels of Z are much bigger than at high levels of Z.
      Attached Files

      Comment


      • #18
        Sorry, I meant to take the parallel comment back, and replace it with
        the argument that your results are reasonable since the marginal effects
        are a linear function of lc.z when holding lc.w fixed and
        vice versa.

        Here is a mathematical argument to support my claim.

        For a given pair of values for lc.w and lc.z, the
        contrasted marginal effects look something like

        Code:
        C = _b[lc.x#lc.w]*dw + _b[lc.x#lc.w#lc.z]*dw*lc.z
        where dw is the difference between two of your levels for
        lc.w.

        If we let L be

        Code:
        L = _b[lc.x#lc.w] + _b[lc.x#lc.w#lc.z]*lc.z
        then we have

        Code:
        C = dw*L
        The standard error of C is then

        Code:
        se(C) = dw*se(L)
        Now since the test statistics for each individual contrast is

        Code:
        t = C/se(C)
        we get

        Code:
        t = L/se(L)
        which is no longer a function of dw.

        Comment


        • #19
          Ok, great! This is convincing!
          Once again, thanks a lot for your effort.
          Best, Steve

          Comment

          Working...
          X