Announcement

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

  • Interaction_effect

    Hi statalist community

    Regression (linear) shows interaction is significant.

    When interaction is plotted---> I get a cross

    Confidence intervals collapse on each other, in the plotted interaction. How to interpret this?

    Dotted lines--- confidence interval for the non-dotted lines. (in image below) [using module--- interactplot]

    Click image for larger version

Name:	Screenshot 2022-11-08 000344.png
Views:	1
Size:	4.5 KB
ID:	1688483




    Thanks
    ajay

  • #2
    When interaction is plotted---> I get a cross
    Yes, that is what you typically see when there is an interaction. You don't say anything about these variables, and the axis titles are cut off in the graph you show, so it is hard to speak about this in specific terms.

    The essence of the interaction between a dichotomous variable and a continuous variable is that the outcome:continuous variable slope is different for the different values of the dichotomous variables. Graphically, this means that the lines aren't parallel. If you don't see them intersect when you graph the interaction, all that means is that the value of the continuous variable at which the intersection would occur is outside the range of the observed data (and may or may not be a possible value for the continuous variable.) But all you should expect to see with an interaction is non-parallel lines. They may intersect or may be separated within the range of values of the continuous variables in the data.

    Comment


    • #3
      Can I say as X rises beyond 10, the mean is higher for RED than BLUE ( I think it is not because of confidence intervals collapse)

      Comment


      • #4
        You can't actually answer that question from the graph. Even though the confidence intervals overlap, suggesting that the estimated values for the outcome variable are not precisely estimated, it may be that the difference between the red and blue is precisely estimated. To do that you need a different approach. As you don't show the actual regression, I can't give you specific code to proceed, but what you need to do is something like -margins red_vs_blue_variable, at(continuous_variable = (10(1)12)) pwcompare- and then see what that tells you about the difference between them.

        Comment


        • #5
          Thanks for your help Clyde. Let me give you the regression


          (1)
          VARIABLES Model 1 (Dependent VarY)
          ln-INCOME 0.0121
          (0.0587)
          Dummy1 (Ref. No) -2.278***
          (0.656)
          0
          (0)
          Dummy1# ln-INCOME 0.230***
          (0.0683)
          Var1 0.0751*
          (0.0403)
          Dummy2 (Ref. No) -0.188***
          (0.0403)
          Var2 0.0480
          (0.0377)
          Dummy3 (Ref. No) 0.0614
          (0.0401)
          Dummy4 (Ref. No) 0.116***
          (0.0387)
          -
          0.613***
          (0.0504)
          Dummy5 (Ref. No) 0.593***
          (0.0740)
          Var3 0.0196***
          (0.00392)
          Var4 0.0483***
          (0.00446)
          2.C1 -0.123
          (0.103)
          3.C1 -0.0511
          (0.0981)
          4.C1 -0.261**
          (0.103)
          5.C1 -0.401***
          (0.112)
          6.C1 -0.386
          (0.281)
          Var5 0.283***
          (0.0118)
          Dummy6 (Ref. No) -0.113***
          (0.0383)
          Dummy7 (Ref. No) 0.0952
          (0.0752)
          Var6 -0.0228*
          (0.0138)
          Var7 3.06e-05***
          (7.80e-06)
          Constant 0.481
          (0.576)
          Observations 4,158
          R-squared 0.296

          Standard errors in parentheses
          *** p<0.01, ** p<0.05, * p<0.1

          Comment


          • #6
            So try:
            Code:
            forvalues lni = 10/12 {
                margins Dummy1, at(ln_INCOME = `lni') pwcompare effects
            }
            This will give you, at ln_INCOME = 10, 11, and 12, the estimated difference between the expected value of Y between Dummy1 = 0 and Dummy1 = 1, along with confidence intervals and test statistics. I chose to do this for 10 through 12, rather than just 10, since I'm guessing you are looking for some value above which you can say that the expected Y at one of the dummy values clearly exceeds that of the expected Y at the other dummy value. Since it may not happen at 10, I thought I'd give you these other possibilities.

            By the way, when I asked for the regression output, what I was looking for is how the variables are named in the regression output. What you sent is regression output laundered through -outreg- or some other pretty-print program. There, the variable names get replaced by variable labels, so less helpful. So you may have to modify the code above to put the correct variable names in.

            Comment


            • #7
              Hi Clyde sir, thank you so much. It helps. Appreciate that. And, I apologize for not going by the instructions while posting the regression result.

              Comment


              • #8
                No apology needed. My instructions were not clear. I said "regression results" when I should have specified "the immediate output of your regression command, not further processed" or words to that effect.

                Comment

                Working...
                X