Announcement

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

  • Interpretting continuous interaction variables.

    I want to be able to interpret the interaction. I'd like to be able to say something like, "A one unit increase in Segments while keeping Accuracy constant has a ____ effect on AccrQual."
    Do I need to use margins in Stata for this? Or will the regression coefficient be sufficient?


    Here is part of the regression output, with the interaction being third.

    Linear regression Number of obs = 40,497
    F(87, 1552) = .
    Prob > F = .
    R-squared = 0.2135
    Root MSE = .02143

    (Std. Err. adjusted for 1,553 clusters in ticker)
    ----------------------------------------------------------------------------------
    | Robust
    accrqual_w | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -----------------+----------------------------------------------------------------
    accuracy_w | -.0102968 .0074909 -1.37 0.169 -.0249901 .0043965
    lnsegments_w | -.001824 .0009657 -1.89 0.059 -.0037183 .0000702
    acc_segments | -.0098951 .0069502 -1.42 0.155 -.0235279 .0037376






    Because both the variables are continuous, maybe I need to use margins?


  • #2
    Yes, you definitely need to use -margins-. But the way you did the regression, you can't. Because for -margins- to handle interactions correctly, you have to use factor variable notation in your regression command.
    Code:
    regress accrqual_w c.accuracy_w##c.lnsegments_w /* perhaps other variables */
    I'd like to be able to say something like, "A one unit increase in Segments while keeping Accuracy constant has a ____ effect on AccrQual.
    This raises two issues.

    First, if that's what you want to say, you shouldn't have used an interaction model. In an interaction model there is no such statement possible. In an interaction model, the effect of a unit increase in segments is not a single number: there is a different value of that effect for each value of Accuracy. It is not just a matter of keeping Accuracy constant. The effect itself actually depends on the specific value of accuracy you have in mind.

    So assuming you really did want an interaction model, notwithstanding what you said, you have to pick out values of accuracy that you consider to be interesting/important/relevant, whatever. For the purposes of illustrating the code, I will assume that those values are 5, 10, 15, and 20. Then after the regression (re-run using factor variable notation as above), you can run:

    Code:
    margins, dydx(lnsegments) at(accuracy_w = (5 10 15 20))
    The output will show you, for each of those values of accuracy_w, the corresponding effect of a unit increase in lnsegments (not segments itself) on AccrQual.

    Second, you ran your model using a variable called lnsegments, which, I imagine, is the log-transform of segments itself. This makes life even harder. Because, now the effect of a unit increase in segments corresponds to a different amount of increase in lnsegments depending on the value of segments that you start from! What you are probably better off doing, and would probably be much more understandable to an audience, is make some statement about the effect of a 1% increase in segments, rather than a unit increase. A 1% increase in segments corresponds to a 0.01 absolute increase in lnsegments (to 2 decimal places). So you can then take the marginal effects produced above, and just multiply them by 0.01.

    Or there may be another way to consider it. If the relationship between accrqual_w and segments is truly log-linear, then you are stuck with the above. But if it's really a linear relationship and you put in the log transform thinking it would help you in some other way, then go back and redo the regression using segments instead of lnsegments. Then run
    Code:
    margins, dyex(segments) at(accuracy_w = (5 10 15 20))
    which will give you the semi-elasticity (i.e. the effect of a unit increase in ln(segments)).

    Comment


    • #3
      Thank you. I actually did do c.accuracy##c.lnsegments_w with the other control variables on another regression. I am less interested in using that specific wording because I really do think the interaction is appropriate. I'm asking if Segments have a mitigating effect on the effect accuracy has on AccrQual (the dv). For the points I'm interested in, the mean would be just fine. Yes, lnsegments is a log variable. I thought about that after I posted. Thanks for the update about syaing, "a 1% increase." LNSegments is all throughout my paper. I use the log of segments because some are very small and some are very large.

      Comment


      • #4
        Notwithstanding the very useful general advice Clyde gives you, the way how you are asking your question is not a very good way to go. (You are showing some partial regression output, and you are telling us about your interpretations of what happened.)

        Better way to elicit a useful answer is to show exactly what you typed at Stata, and exactly what Stata returned. Hopefully you can format your output properly using the sharp (#) symbol on the menu above.

        And then explain what you want with a reference to the actual output.


        Originally posted by Chrissy Aa View Post
        Thank you. I actually did do c.accuracy##c.lnsegments_w with the other control variables on another regression. I am less interested in using that specific wording because I really do think the interaction is appropriate. I'm asking if Segments have a mitigating effect on the effect accuracy has on AccrQual (the dv). For the points I'm interested in, the mean would be just fine. Yes, lnsegments is a log variable. I thought about that after I posted. Thanks for the update about syaing, "a 1% increase." LNSegments is all throughout my paper. I use the log of segments because some are very small and some are very large.

        Comment


        • #5
          Thank you both. My end goal is to explain whether Segments has a mitigating effect on the effect accuracy as on AccrQual (my DV).

          reg accrqual_w c.accuracy_w##c.lnsegments_w with other control variables, robust cluster(gvkey)


          Linear regression Number of obs = 40,497
          F(87, 1549) = .
          Prob > F = .
          R-squared = 0.2135
          Root MSE = .02143

          (Std. Err. adjusted for 1,550 clusters in gvkey)
          ---------------------------------------------------------------------------------------------
          | Robust
          accrqual_w | Coef. Std. Err. t P>|t| [95% Conf. Interval]
          ----------------------------+----------------------------------------------------------------
          accuracy_w | -.0102968 .007491 -1.37 0.169 -.0249904 .0043968
          lnsegments_w | -.001824 .0009658 -1.89 0.059 -.0037185 .0000705
          |
          c.accuracy_w#c.lnsegments_w | -.0098951 .0069511 -1.42 0.155 -.0235297 .0037394





          . margins, dydx(lnsegments_w) at((means) _all)

          Conditional marginal effects Number of obs = 40,497
          Model VCE : Robust

          Expression : Linear prediction, predict()
          dy/dx w.r.t. : lnsegments_w
          at : accuracy_w = -.0574051 (mean)
          lnsegments_w = .817894 (mean)
          lnanalysts_w = 2.332714 (mean)
          horizon_w = 210.2411 (mean)
          size_w = 7.928872 (mean)
          ...and other control vars...

          ------------------------------------------------------------------------------
          | Delta-method
          | dy/dx Std. Err. t P>|t| [95% Conf. Interval]
          -------------+----------------------------------------------------------------
          lnsegments_w | -.001256 .0008953 -1.40 0.161 -.0030121 .0005001
          ------------------------------------------------------------------------------



          Comment

          Working...
          X