Announcement

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

  • Including an interaction term as a control variable?

    I am reading a paper and it has the following simple model:
    Y = a + b1 + b2 + b1*b2 + e.
    The author seems to be interested in b1, not the interaction term.
    How do we interpret b1 in this case? I'm a little confused because most people would be interested in the interaction effect. By including the interaction term as a control variable, how does our interpretation of b1 change?

    Thank you!

  • #2
    I'm a little confused by your equation, but I think I know what you mean. You have a regression equation y = a + b1*x1 + b2*x2 + b12*x1*x2 + error term, where x1 and x2 are variables and the b's are coefficients, right?

    In this situation, the coefficient of b1 is the marginal effect of x1 on y conditional on x2 = 0.

    Comment


    • #3
      Jun:
      the best way (for me, at least) to get yourself familiar with this kind of stuff is invoking -predict,xb- with and without interaction and recalculate them by hand.
      Code:
      . sysuse auto.dta
      (1978 automobile data)
      
      . regress price i.foreign##i.rep78
      note: 1.foreign#1b.rep78 identifies no observations in the sample.
      note: 1.foreign#2.rep78 identifies no observations in the sample.
      note: 1.foreign#5.rep78 omitted because of collinearity.
      
            Source |       SS           df       MS      Number of obs   =        69
      -------------+----------------------------------   F(7, 61)        =      0.39
             Model |    24684607         7  3526372.43   Prob > F        =    0.9049
          Residual |   552112352        61  9051022.16   R-squared       =    0.0428
      -------------+----------------------------------   Adj R-squared   =   -0.0670
             Total |   576796959        68  8482308.22   Root MSE        =    3008.5
      
      -------------------------------------------------------------------------------
              price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
      --------------+----------------------------------------------------------------
            foreign |
           Foreign  |   2088.167   2351.846     0.89   0.378     -2614.64    6790.974
                    |
              rep78 |
                 2  |   1403.125   2378.422     0.59   0.557    -3352.823    6159.073
                 3  |   2042.574   2204.707     0.93   0.358    -2366.011    6451.159
                 4  |   1317.056   2351.846     0.56   0.578    -3385.751    6019.863
                 5  |       -360   3008.492    -0.12   0.905    -6375.851    5655.851
                    |
      foreign#rep78 |
         Foreign#1  |          0  (empty)
         Foreign#2  |          0  (empty)
         Foreign#3  |  -3866.574   2980.505    -1.30   0.199    -9826.462    2093.314
         Foreign#4  |  -1708.278   2746.365    -0.62   0.536    -7199.973    3783.418
         Foreign#5  |          0  (omitted)
                    |
              _cons |     4564.5   2127.325     2.15   0.036      310.651    8818.349
      -------------------------------------------------------------------------------
      
      . predict fitted, xb
      
      . regress price i.foreign i.rep78
      
            Source |       SS           df       MS      Number of obs   =        69
      -------------+----------------------------------   F(5, 63)        =      0.19
             Model |  8372481.37         5  1674496.27   Prob > F        =    0.9670
          Residual |   568424478        63  9022610.75   R-squared       =    0.0145
      -------------+----------------------------------   Adj R-squared   =   -0.0637
             Total |   576796959        68  8482308.22   Root MSE        =    3003.8
      
      ------------------------------------------------------------------------------
             price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
      -------------+----------------------------------------------------------------
           foreign |
          Foreign  |    36.7572   1010.484     0.04   0.971    -1982.533    2056.048
                   |
             rep78 |
                2  |   1403.125   2374.686     0.59   0.557    -3342.306    6148.556
                3  |   1861.058   2195.967     0.85   0.400    -2527.232    6249.347
                4  |   1488.621   2295.176     0.65   0.519    -3097.921    6075.164
                5  |   1318.426   2452.565     0.54   0.593    -3582.634    6219.485
                   |
             _cons |     4564.5   2123.983     2.15   0.035     320.0579    8808.942
      ------------------------------------------------------------------------------
      
      . predict fitted_no_int, xb
      (5 missing values generated)
      
      . list price foreign rep78 fitted fitted_no_int in 1
      
           +------------------------------------------------+
           | price    foreign   rep78     fitted   fitted~t |
           |------------------------------------------------|
        1. | 4,099   Domestic       3   6607.074   6425.558 |
           +------------------------------------------------+
      
      . di 4564.5 + 0 + (1861.058)
      6425.558
      
      
      
      . di 4564.5 + 2042.574
      6607.074
      
      .
      PS: posted just after Clyde's helpful reply.
      Last edited by Carlo Lazzaro; 11 May 2023, 11:13.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Clyde Schechter Hello Clyde! Yes that's the equation I meant to write. I can see that B1 is the marginal effect when B2=0. However, isn't that the same with the equation y = a + b1*x1 + b2*x2 + error term (excluding the interaction effect)? When b2 = 0 then b1 is also the marginal effect when b2 = 0.
        So then that leads to the question on why the author would include the interaction term when the person is only interested in b1?

        Comment


        • #5
          However, isn't that the same with the equation y = a + b1*x1 + b2*x2 + error term (excluding the interaction effect)?
          No, it's not the same. In y = a + b1*x1 + b2*x2 + error term, the marginal effect of x1 is constrained to be the same regardless of the value of x2. In y = a + b1*x1 + b2*x2 + b12*x1*x2 + error term, the marginal effect of x1 is different for all values of x2, and b1 is the marginal effect of x1 when, in particular, x2 = 0.

          So then that leads to the question on why the author would include the interaction term when the person is only interested in b1?
          Well, you'd really have to ask the author. Is it not explained somewhere in the article you are reading? Assuming it's not, here's my best guess:

          All else equal, if my goal were estimating the marginal effect of x1 conditional on x2 = 0, I would gather a data set containing only entities with x2 = 0 and then estimate the marginal effect of x1 in that data set from the regression y = a + b1* + error. But suppose that entities with x2 = 0 are too rare to get enough data for this approach, and suppose I know from previous research that the marginal effect of x1 depends (linearly) on the value of x2. Then gathering a data set allowing all values of x2, estimating y = a + b1*x1 + b2*x2 + b12*x1*x2 + error term, and then looking only at b1 would be another way of accomplishing it and overcomes the difficulties posed by the rarity of x2 = 0.

          Another possibility is that the variable x2 is actually some other variable x3 but centered at the mean of x3. Then this would be a way to estimate the marginal effect of x1 conditional on x3 being at its mean value--this kind of marginal effect at the mean of another variable is often of interest. (But I would imagine they would explain that in the article.)

          Comment


          • #6
            Clyde Schechter Thank you for your clear answer! If x2 is actually x3 but centered at the mean of x3, and if the author didn't include x3 separately, is that still okay?

            Comment


            • #7
              Yes, that's perfectly fine. But they definitely should explain in the article that that is what they did.

              Comment


              • #8
                Clyde Schechter Okay. But if they didn't include the main effects of x3, then is that relying on the assumption that x3 (centered version) itself has no main effects on the dependent variable y? Or is that not the correct way to interpret it?

                Comment


                • #9
                  Suppose that x2 = x3 - mean(x3) for some variable x3. x2 is x3 centered at its mean. Then y = a + b1*x1 + b2*x2 + b12*x1*x2 + error term is a fully formed regression with an x1*x2 interaction. b1 is then the marginal effect of x1 on y conditional on x2 = 0. But x2 = 0 is the same thing as x3 = mean(x3). So b1 is the marginal effect of x1 on y conditional on x3 = mean(x3).

                  Comment

                  Working...
                  X