Announcement

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

  • Regression with moderation in Stata

    Hello everybody,
    I am a bit unsure about the construction of my regression and need some help. I have hypothesized that family businesses perform better in performance (innovation) than non-family businesses. For this purpose I created a dummy variable "Family-Firm" (0=non-family-firm; 1=family-firm). This serves as a moderator for the regression. My question now is whether the function can be correct in this way?

    1)

    HTML Code:
    xtreg N_Totalpatents_l3 c.No_Deals#Family_Firm xrdat_w industry_q_w firm_size_log , re
    2)
    Or does the Independent Variable have to be used again before the interaction?
    HTML Code:
      xtreg N_Totalpatents_l3 No_Deals c.No_Deals#Family_Firm xrdat_w industry_q_w firm_size_log , re
    I do not understand the difference exactly. Except that the results are no longer significant in the 2nd form.

    Thanks a lot for your help! Sven

    Same Question here:
    https://stackoverflow.com/questions/...-term-in-stata

  • #2
    Either one is correct, and they are, in fact, equivalent if you understand that the coefficients with the same names mean different things in the two models and therefore cannot be directly compared. On top of that, there is yet another that I prefer:

    Code:
    xtreg N_Totalpatents_l3 c.No_Deals##Family_Firm xrdat_w industry_q_w firm_size_log , re
    The changes you see in the results with the different ways of coding this result because the coefficients with the same names mean different things in the different models. To avoid confusion, it is best, when interpreting interaction models, not to rely on the regression output directly but, instead, to follow-up with the -margins- command which will put it together for you appropriately regardless of which model you have used. Otherwise you have to explicitly think through what each coefficient in the regression output actually means in that model and then add up the appropriate terms to get each of the marginal effects you are actually interested in, bearing in mind that the names of the coefficients are somewhat misleading in interaction models.

    Code:
    margins Family_Firm, dydx(No_Deals)
    will show you the marginal effects of No_Deals on N_Totalpatents for both Family Firms and non-Family Firms. (And the results will be the same, except perhaps for very tiny rounding errors) from any of these three models.

    In the model I have suggested, using the ## operator, the coefficient of No_Deals#Family_Firm in the regression output will also be the estimate of how much difference being a Family Firm makes to the marginal effect of No_Deals on N_Totalpatents, which is often a question of interest in this context.

    Comment


    • #3
      Thank you very much for your detailed reply!

      So that I understand your answer correctly, I prefer to ask again. By using the "margins command", does my example show that family businesses perform better in innovation performance than non-family businesses? Additionally, this result is significant.
      Nevertheless, I am unfortunately unsure whether and how to interpret the results of the first regression? Especially:

      Family_Firm#c.No_Deals P>|z| = 0.413 (Compared to the Significant values from the Margins command.)
      Code:
           N_Totalpatents_l3 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      -----------------------+----------------------------------------------------------------
                    No_Deals |    14.9038    1.04511    14.26   0.000     12.85543    16.95218
               1.Family_Firm |  -79.68839   29.89306    -2.67   0.008    -138.2777   -21.09906
                             |
      Family_Firm#c.No_Deals |
                          1  |   1.524317   1.861582     0.82   0.413    -2.124318    5.172951

      Or did I understand correctly that by the command margins, this is not necessary?
      I would be very pleased about an explanation! Thank you very much!

      The output of your suggestion:
      Code:
      Random-effects GLS regression                   Number of obs     =        991
      Group variable: GVKEY                           Number of groups  =        203
      
      R-squared:                                      Obs per group:
           Within  = 0.1548                                         min =          1
           Between = 0.3610                                         avg =        4.9
           Overall = 0.3413                                         max =         18
      
                                                      Wald chi2(7)      =     509.26
      corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
      
      ----------------------------------------------------------------------------------------
           N_Totalpatents_l3 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      -----------------------+----------------------------------------------------------------
                    No_Deals |    14.9038    1.04511    14.26   0.000     12.85543    16.95218
               1.Family_Firm |  -79.68839   29.89306    -2.67   0.008    -138.2777   -21.09906
                             |
      Family_Firm#c.No_Deals |
                          1  |   1.524317   1.861582     0.82   0.413    -2.124318    5.172951
                             |
                     xrdat_w |    966.655   237.1758     4.08   0.000      501.799    1431.511
                industry_q_w |   52.41165   17.64244     2.97   0.003     17.83311    86.99019
               firm_size_log |    61.0942    8.39397     7.28   0.000     44.64232    77.54608
                       lev_w |   5.360719   4.601677     1.16   0.244    -3.658403    14.37984
                       _cons |  -250.3751   45.86548    -5.46   0.000    -340.2698   -160.4804
      -----------------------+----------------------------------------------------------------
                     sigma_u |          0
                     sigma_e |  301.80146
                         rho |          0   (fraction of variance due to u_i)
      ----------------------------------------------------------------------------------------
      
      .                 margins Family_Firm, dydx(No_Deals)
      
      Average marginal effects                                   Number of obs = 991
      Model VCE: Conventional
      
      Expression: Linear prediction, predict()
      dy/dx wrt:  No_Deals
      
      ------------------------------------------------------------------------------
                   |            Delta-method
                   |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
      -------------+----------------------------------------------------------------
      No_Deals     |
       Family_Firm |
                0  |    14.9038    1.04511    14.26   0.000     12.85543    16.95218
                1  |   16.42812   1.583291    10.38   0.000     13.32493    19.53132
      ------------------------------------------------------------------------------

      Comment


      • #4
        The regression coefficient for the interaction term is, to two decimal places, 1.52 with a 95% CI from -2.12 to 5.17. This is a very wide confidence interval and it tells us that the data at hand cannot pin down the interaction even to the extent of telling you in which direction it runs. Thus the conclusion of your study is that it is inconclusive with regard to the difference being a Family_Firm makes to the marginal effect on the marginal effect of No_Deals. The Family_Firms might have a higher marginal effect or they might have a lower one--we can't really tell from this data.

        Now, most of that CI is in positive territory, and the best estimate values are shown in the margins output: 16.43 for family firms vs 14.90. But you can see there as well that the confidence intervals around those estimates overlap extensively. So the data vaguely suggest that family firms may have a higher marginal effect of No_Deals, but that no real conclusion can be drawn either way.

        (I'm avoiding saying which type of firm is "better" because it is a value judgment as to whether higher is better or lower is better, and this is an area where I have no understanding or expertise. So I'm sticking to the mathematical interpretation of the results as higher or lower--you can decide which way is "better.")

        Comment


        • #5
          Thank you for taking the time to answer me in detail.

          However, I still have one last question. In the regression, the effect of family firms (1.Family_Firm) on innovation performance (measured by the number of patents (N_Totalpatents_l3)) is also shown.
          I interpret the result of the coefficient (-79.68839) as a significant negative influence of family firms on innovation performance. While it is also a very wide confidence interval, it is exclusively negative, so the direction is clearly negative.
          While it is also a very wide confidence interval, it is exclusively negative, so the direction is clearly negative. Am I right?

          Comment


          • #6
            However, I still have one last question. In the regression, the effect of family firms (1.Family_Firm) on innovation performance (measured by the number of patents (N_Totalpatents_l3)) is also shown.
            No, it isn't. In fact, in this interaction model, there is no such thing as "the effect of family firms...on innovation performance..." The coefficient of 1.Family_Firm in an interaction model has an altogether different meaning from what would go by the same name in a non-interaction model. That's why interaction models are so confusing. The coefficient of 1.Family_Firm in the interaction model is the expected difference in outcome between a family firm and a non-family firm among only firms where No_Deals = 0. I don't know if No_Deals = 0 is an interesting situation in your context, or whether it might even be impossible, or possible but an extreme outlier. Anyway, the only interpretation you can apply to that -79.68... number is that among firms with No_Deals = 0 (if there even are any such) the family firms will, on average, have N_Totalpatents_l3 79.68 lower. If No_Deals = 0 is an impossible or rare condition, then this coefficient is entirely without real-world meaning and should not be interpreted at all.

            Your observation that the confidence interval here is wide but clearly bounded away from zero in negative territory is correct. So, if No_Deals = 0 is a meaningful value of No_Deals to talk about, you would be supported by the data in asserting that Family firms with No_Deals = 0 have lower values of N_Totalpatents_l3 than non-family firms with No_Deals = 0. This assertion, if meaningful, would be correct.

            Comment


            • #7
              Ok, thanks again for the excellent explanation!

              Related to my hypothesis: family businesses perform better in innovation performance than non-family businesses, this interaction model would not give the desired statement on this.

              I am a bit unsure about this.
              How could a test of the hypothesis look like then? Is there another way or just a comparison of two single regressions for Family_Firms=0 and Family_Firms=1?

              Comment


              • #8
                The work you have done does lead to a conclusion, just not the one you were hoping for. The conclusion is that the data are not able to support a clear conclusion about the magnitude or direction of the difference. The study is inconclusive, and that is its conclusion.

                Now, it is possible that running separate regressions for Family_Firms = 0 and Family_Firms = 1 will produce different results. But then you will be left with the problem of comparing the results across the two models. You can, instead, emulate the two separate regressions by using a single regression in which Family_Firm is interacted with all of the predictor variables.

                Code:
                mixed  N_Totalpatents_l3 i.Family_Firm##(c.No_Deals c.xrdat_w c.industry_q_w c.firm_size_log) || GVKEY:, residuals(, by(Family_Firm))
                margins Family_Firm, dydx(No_Deals)
                Note: This code assumes industry_q_w and firm_size_log are continuous variables. If either is discrete, change the -c.- prefix of that variable to -i.-.

                The use of -mixed- instead of -xtreg, re- does not change the modeling--it's just a different program that can fit the same model as -xtreg, re-, although it is also capable of more things. One of the additional things it is capable of is allowing separate estiation of residual variance by a grouping variable--as reflected in the -residuals()- option specified. This one -mixed- command will then precisely emulate doing the two regressions separately. But it has the advantage that you will be able to see the difference between the marginal effect of No_Deals among Family firms and the marginal effect of No_Deals among non-family firms in the coefficient of 1.Family_Firm#c.No_Deals, just as in the current model. And you will also be able to see the average marginal effects of No_Deals among Family and non-Family firms separately shown in the -margins- output, just as before. But these estimates will have been obtained independently in the Family and non-Family groups without the implicit constraint that all the other effects are independent of family group that applied to the model in #3. In the currently proposed model, everything has a separate estimate for Family and non-Family firms.

                It is possible that this analysis will be supportive of your hypothesis where the analysis in #3 is inconclusive. Unlikely, but possible. Try it and see.

                Comment


                • #9
                  In example #3, the interaction term shows a highly non-significant p-value (0.413).
                  Code:
                     
                   Family_Firm#c.No_Deals1  |   1.524317   1.861582     0.82   0.413    -2.124318    5.172951
                  Would the margins command, in principle, still allow an interpretation? In other words, does the interaction term have to be significant to make a statement with the margins command?
                  Why are the significances in the margins command so highly significant?


                  Thanks a lot for the help!

                  Comment


                  • #10
                    The -margins- command gives you the marginal effect of No_Deals in family firms and in non-family firms and the significance tests there compare each of those marginal effects to zero.

                    The interaction term in the regression output compares those two marginal effects to each other.

                    Comment

                    Working...
                    X