Announcement

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

  • inverted U-shape combined with moderation

    Hello everyone,

    for the analysis of my data I identified a inverted U-shape as suitable for my model. In this analysis q_tot_w is my depenent variable and rdallinances is my indepeneent variable. All others are controles.

    Code:
    Code:
    xtreg q_tot_w rdalliances rdalliances_2 rdi_w adi_w ln_emp1 i.fyear, fe vce(robust)
    Results:
    Code:
    Fixed-effects (within) regression               Number of obs     =    115,742
    Group variable: gvkey                           Number of groups  =     12,206
    
    R-squared:                                      Obs per group:
         Within  = 0.0110                                         min =          1
         Between = 0.0031                                         avg =        9.5
         Overall = 0.0060                                         max =         29
    
                                                    F(33,12205)       =      22.01
    corr(u_i, Xb) = -0.0039                         Prob > F          =     0.0000
    
                                  (Std. err. adjusted for 12,206 clusters in gvkey)
    -------------------------------------------------------------------------------
                  |               Robust
          q_tot_w | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
      rdalliances |   .0747057   .0315854     2.37   0.018     .0127934     .136618
    rdalliances_2 |  -.0019935   .0006235    -3.20   0.001    -.0032157   -.0007714
            rdi_w |    .016515   .0201425     0.82   0.412    -.0229675    .0559974
            adi_w |   .3026396   1.067127     0.28   0.777    -1.789098    2.394378
          ln_emp1 |   -.100483   .0419701    -2.39   0.017    -.1827509    -.018215
                  |
            fyear |
            1990  |  -.0357344   .1047133    -0.34   0.733     -.240989    .1695203
            1991  |   .2004181   .1113381     1.80   0.072    -.0178221    .4186584
            1992  |    .302907   .1146206     2.64   0.008     .0782324    .5275816
            1993  |   .4831456   .1191374     4.06   0.000     .2496174    .7166738
            1994  |   .1656343   .1182963     1.40   0.161    -.0662451    .3975137
            1995  |   .4850309   .1265344     3.83   0.000     .2370033    .7330584
            1996  |   .4427113   .1277652     3.47   0.001     .1922714    .6931513
            1997  |    .599052   .1404002     4.27   0.000     .3238454    .8742585
            1998  |   .4566188   .1450601     3.15   0.002     .1722781    .7409595
            1999  |   .8430929   .1569679     5.37   0.000     .5354109    1.150775
            2000  |   .4531411   .1462793     3.10   0.002     .1664105    .7398716
            2001  |   .2124873   .1421871     1.49   0.135     -.066222    .4911965
            2002  |   -.225915   .1417812    -1.59   0.111    -.5038287    .0519986
            2003  |   .2964072   .1437541     2.06   0.039     .0146263    .5781881
            2004  |   .4820569   .1420315     3.39   0.001     .2036527    .7604611
            2005  |   .4623861    .142104     3.25   0.001     .1838398    .7409323
            2006  |   .4261785   .1401344     3.04   0.002     .1514928    .7008642
            2007  |     .27914   .1430544     1.95   0.051    -.0012693    .5595494
            2008  |  -.5448981   .1412114    -3.86   0.000    -.8216948   -.2681014
            2009  |  -.2937102   .1423348    -2.06   0.039    -.5727089   -.0147116
            2010  |  -.1315857   .1405104    -0.94   0.349    -.4070083     .143837
            2011  |  -.2652228   .1419427    -1.87   0.062     -.543453    .0130073
            2012  |  -.2629306   .1425723    -1.84   0.065    -.5423949    .0165338
            2013  |   .1241235   .1466388     0.85   0.397    -.1633118    .4115588
            2014  |   .0497599   .1461983     0.34   0.734     -.236812    .3363318
            2015  |  -.1963734   .1449494    -1.35   0.176    -.4804972    .0877504
            2016  |  -.0650551   .1526762    -0.43   0.670    -.3643246    .2342144
            2017  |   .0982877   .1625534     0.60   0.545    -.2203428    .4169182
                  |
            _cons |   1.910016   .3591531     5.32   0.000     1.206019    2.614013
    --------------+----------------------------------------------------------------
          sigma_u |  5.7788823
          sigma_e |  3.0242235
              rho |  .78501117   (fraction of variance due to u_i)
    -------------------------------------------------------------------------------
    Now I want to implement a moderation into this model, but I am not shure how to do this. After some research I found different approaches for linear regressions but it's hard for me to transfer this knowledge to a inverted U-shaped model. "rdalliances" is my independent variable and "munificence" is my moderator.

    This is my acutal idea about the code, but I am really not shure about this and my results are not like I expected them. Probably I made a misetake.

    Code:
    xtreg q_tot_w cl.rdalliances##cl.rdalliances##cl.munificence_w rdi_w adi_w ln_emp1 , fe vce(robust)
    Can anyone confirm the code or help me with the correct one?

    Best regards,
    Jana

  • #2
    Well, the code you propose in #1 and it is very close to what you say you want. But why are you using a cl.prefix instead of just c.? You didn't say anything in your description of the problem to suggest that you need to use lagged variables, and you did not do so in the original, unmoderated, model. So why would you introduce lags here? I also notice that in the original model you include i.fyear, but you do not include it in the proposed moderated model. Again, absent some specific reason for making that change (e.g. if munificence is colinear with the fyear indicators), if fyear belonged in the original model it should be kept in the moderated model.

    I think what you want is actually simpler:

    Code:
    xtreg q_tot_w c.rdalliances##c.rdalliances##c.munificence_w rdi_w adi_w ln_emp1 i.fyear , fe vce(robust)
    Last edited by Clyde Schechter; 18 Dec 2021, 11:53.

    Comment


    • #3
      Clyde:
      thanks for your quick and helpful answer!
      You are right the lagged version should not be included.

      I am pretty new to an analysis with moderators. Maybe you could answer me a second question?

      Code:
      Code:
      xtreg q_tot_w c.rdalliances##c.rdalliances##c.munificence_w rdi_w adi_w ln_emp1 , fe vce(robust)
      Results:
      Code:
       xtreg q_tot_w c.rdalliances##c.rdalliances##c.munificence_w rdi_w adi_w ln_emp1 , fe vce(robu
      > st)
      
      Fixed-effects (within) regression               Number of obs     =    115,742
      Group variable: gvkey                           Number of groups  =     12,206
      
      R-squared:                                      Obs per group:
           Within  = 0.0025                                         min =          1
           Between = 0.0121                                         avg =        9.5
           Overall = 0.0093                                         max =         29
      
                                                      F(8,12205)        =       6.98
      corr(u_i, Xb) = 0.0310                          Prob > F          =     0.0000
      
                                                    (Std. err. adjusted for 12,206 clusters in gvkey)
      -----------------------------------------------------------------------------------------------
                                    |               Robust
                            q_tot_w | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
      ------------------------------+----------------------------------------------------------------
                        rdalliances |  -.0118459   .0352631    -0.34   0.737    -.0809673    .0572754
                                    |
        c.rdalliances#c.rdalliances |   -.000316   .0008218    -0.38   0.701    -.0019268    .0012948
                                    |
                      munificence_w |   .1201944   .0255507     4.70   0.000      .070111    .1702779
                                    |
      c.rdalliances#c.munificence_w |     .15641   .0520391     3.01   0.003     .0544051    .2584149
                                    |
        c.rdalliances#c.rdalliances#|
                    c.munificence_w |  -.0029884   .0018257    -1.64   0.102    -.0065671    .0005903
                                    |
                              rdi_w |   .0200534    .020213     0.99   0.321    -.0195673    .0596742
                              adi_w |   .1926644   1.073564     0.18   0.858     -1.91169    2.297019
                            ln_emp1 |  -.1323882   .0432347    -3.06   0.002    -.2171352   -.0476413
                              _cons |   2.233968   .2977856     7.50   0.000     1.650261    2.817675
      ------------------------------+----------------------------------------------------------------
                            sigma_u |  5.7599915
                            sigma_e |  3.0368196
                                rho |   .7824924   (fraction of variance due to u_i)
      -----------------------------------------------------------------------------------------------

      To make a statement about the moderation in the inverted U-shaped model I only fokus on the 5th row of the results (here coefficient -.0029884 and p-value 0.102 )? Is this correct? Or do I also need some other rows to interpret if there is a moderation effect?
      So in this case I could not confirm that there is a moderation effect since the p-value is bigger than 0.05 (I test on 5% significance niveau).


      Best regards,
      Jana

      Comment


      • #4
        If you have an inverted U-shape (or I would just call it a quadratic) then you no longer have one effect of rdallinances, but many. Whether those many effects change rdallinances when munificence_w changes can no longer have a simple yes or no. You could test whether both the 4th and 5th row are jointly significant. Better yet, just look at a graph and rely on the much more important interoccular trauma test*): http://maartenbuis.nl/wp/inter_quadr/inter_quadr.html

        *) inter = between, occular = eyes, interoccular trauma = it hits you between the eyes: If you look at a graph and the pattern is so obvious that it hits you between the eyes, then it is there and worth talking about and it has passed the interoccular trauma test. If it is not that obvious then it failed the interoccular trauma test. Just using a good dose of common sense is often more useful when answering statistical questions than fancy tests.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment

        Working...
        X