Announcement

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

  • Interaction effect + Interpretation

    Hello! I have a model that requires an addition of interaction term and thus I am wondering how to firstly correctly form the regression equation and after interpret the interaction effect. In general I am trying to measure what effect being close to a credit rating change has on firm net investment spending. I am further however examining if the effect is more prominent in high tech industries. Namely, I am trying to firstly, derive the effect being close to a credit rating change has on firm net investment spending and secondly derive the effect for firms that are both close to a credit rating change as well as in high tech industry!
    My variable are

    1) CR_POM ( dummy variable) to indicate if firm is close to a credit rating change or not
    2) Tech_Industry (dummy variable) to indicate if firm is in high tech industry or not
    3) Size and Profitability are control variables
    4) InvWinsor is the % change in firm investment spending

    And so far my regression code was as indicated below. Is this the right way how to form the regression with interaction effect? And how should I correctly interpret the interaction term?

    Code:
    regress InvWinsor CR_POM Tech_Industry CR_POM## i. Tech_Industry Size Profitability

    Thank you in advance!

  • #2
    Elizabete:
    if you want to take a look at how interactions work in Stata, please type -help fvvarlist- and go to the related entry in Stata 13.1 .pdf manual.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      First a few small syntax points: since you have already specified CR_POM and Tech_Industry as main effects in your command, a single # will suffice. The ## notation tells Stata to generate both the interaction and the separate main effects: using it when you have already specified the main effects does no harm, but is unnecessary. I tend to think of the ## operator as a convenience notation that spares me from re-typing the main effects separately.

      Another point, this one having later consequences though it won't spoil your regression model, is that you did not tell Stata that the main effect CR_POM is a factor variable. If it takes on only 0/1 values, then your regression will come out correctly regardless. But if you move on to -margins- (which I will suggest doing below), Stata may get confused and not properly incorporate it into the calculations with the interaction. I'm not sure this problem will arise, but it might. So, to be on the safe side, I would clean up your command and write it as:

      Code:
      regress InvWinsor i.CR_POM##i. Tech_Industry Size Profitability
      As for interpreting the results, I could lead you through some equations explaining how interaction terms work. But you can also find those in any introductory regression text. Rather, I recommend you use the -margins- command.

      Code:
      margins CR_POM Tech_Industry
      will give you the adjusted mean values of InvWinsor in all four combinations of CR_POM and Tech_Industry quickly and painlessly.

      If you are specifically interested in testing the hypothesis that the effect of CR_POM differs between tech and non-tech industries, you will find that in the regression output (not the -margins- output), in the line for 1.CR_POM#1.Tech_Industry: the coefficient there is the difference between the effect of CR_POM when Tech_Industry = 1 and the effect of CR_POM when Tech_Industry. And the corresponding t statistic and P value test the null hypothesis of zero difference.

      Comment


      • #4
        Thank you very much Clyde! It clears up some things! I have however a question in regard to interpretation.I understand that in general when no interaction effects are added one can infer about the effect independent variable has on dependent variable and if variable is a dummy variable, it would infer about the difference between designated groups. I was however told that when adding interaction effects it by construction takes out the values from one variable. Namely, in regard to my example, the coefficient for CR_POM only would refer to firms that are close to an upgrade or a downgrade within industries that are not technology industries, whilst variable CR_POM*Tech Industry would refer to firms that are close to credit rating change in Technology industry. Hence, if I would like to derive the coefficient for firms all firms that are close to a credit rating change regardless of industry, I am ought to add the variables up? Is this correct or not? Thank you in advance!

        Comment


        • #5
          in regard to my example, the coefficient for CR_POM only would refer to firms that are close to an upgrade or a downgrade within industries that are not technology industries,
          Correct.

          whilst variable CR_POM*Tech Industry would refer to firms that are close to credit rating change in Technology industry.
          Incorrect. CR_POM*TechIndustry would refer to a difference in differences. First consider the difference between those groups that are close to an upgrade or downgrade within industries. CR_POM*TechIndustry would estimate the difference between that other difference among Tech Industries and that other difference among non-Tech Industries.

          Hence, if I would like to derive the coefficient for firms all firms that are close to a credit rating change regardless of industry, I am ought to add the variables up?
          If by "add the variables up" you mean adding the coefficients of CR_POM and CR_POM*TechIndustry, then yes. Assuming you want standard errors or confidence intervals around this, "add" would be implemented in Stata with -lincom-.

          Or, you could just do it the easy way:
          Code:
          margins, dydx(CR_POM) at(TechIndustry == (0 1))
          margins, dydx(TechIndustry) at(CR_POM == (0 1))
          (whichever is of interest, perhaps both).

          Finally, in re-reading this thread I noticed an error in #3. The -margins- command there should have been -margins CR_POM#Tech_Industry-

          Comment


          • #6
            Thank you very much! I am not 100% sure if I get the interpretation of CR_POM*Tech_Industry correctly. Just to clarify, the coefficient for CR_POM*Tech_Industry can be interpreted as the difference between firms close to a credit rating change in regard to being in tech industry or other industries? Namely as I am looking at the % change in firm net investments, I could infer the coefficient as the % by how much more firms in tech industry would decrease/increase they net investment spending when close to a credit rating change in comparison to firms being close to a credit rating change in other industries? ?Thank you so much!
            Last edited by Elizabete Lurie; 27 May 2015, 08:48.

            Comment


            • #7
              I am not 100% sure if I get the interpretation of CR_POM*Tech_Industry correctly. Just to clarify, the coefficient for CR_POM*Tech_Industry can be interpreted as the difference between firms close to a credit rating change in regard to being in tech industry or other industries?
              I don't understand what this means, so I can't tell you if it is correct or not. [/quote]

              I could infer the coefficient as the % by how much more firms in tech industry would decrease/increase they net investment spending when close to a credit rating change in comparison to firms being close to a credit rating change in other industries?
              Whether this is interpreted as a percentage (as opposed to an absolute difference) depends on how your dependent variable is defined. But with that caveat, this is the correct interpretation of the coefficient of an interaction term.

              Comment


              • #8
                Thanks! This clears it up! I am trying to advance my model a bit and was wondering if it is possible to have 2 interaction effects simultaneously?

                Comment


                • #9
                  Yes, you can have multiple interaction effects simultaneously. If the interactions don't have any effects in common then their interpretation is straightforward. But if you have something like v1##v2 and v1##v3, the interpretation is a bit more complicated and has to be thought through. Again, -margins- is your friend in terms of correctly calculating both expected outcome values and marginal effects in this situation--and with the extra complications involved in this case, I would strongly urge you to use -margins- rather than hand-calculating with -lincom-. If you must do it by hand, be sure to write out the equations carefully before proceeding.

                  Comment


                  • #10
                    Thank you so much!

                    Comment


                    • #11
                      Hi all! I have a questions related to this subject.

                      We have an experiment with different types of treatment. I want to compute the interaction between the different treatments. Up to now I ahve being able to do this using the lincom variable since the treatments are not all mutually exclusive. However I have a problem at the moment of export the results. I can export the coefficient of the interaction and the respective standard deviation but I have not being able to export the significance of the coefficient, do you know how can I do this?

                      In the most simple way, this is the code that I use for a regression with 3 treatments and 2 interactions:

                      reg Yvarible treatment1 treatment2 treatment3 treatment1*treatment2 treatment1*treatment3

                      * Treatment 1 * Treatmet 2
                      lincom treatment1 + treatment2 + treatment1*treatment2
                      estadd scalar skal r(estimate)
                      estadd scalar skalsd r(se)

                      * Treatment 1 * Treatmet 3
                      lincom treatment1 + treatment3 + treatment1*treatment3
                      estadd scalar skal2 r(estimate)
                      estadd scalar skalsd2 r(se)


                      esttab using "$output_paper/Name of file. csv", ///
                      title ( ) keep (treatment1 treatment2 treatment3) ///
                      stats (skal skalsd skal2 skalsd2 N adj_r2 ///
                      layout(@ [@] @ [@]) ///
                      labels () ///
                      se star(* 0.10 ** 0.05 *** 0.01) b(%9.2f) se(%9.2f) alignment(l) replace

                      The output looks pretty nice with all the arrangement, but for the estimations made using lincom command I can't add the significance in an automatic way.

                      Thanks so much!

                      Comment

                      Working...
                      X