Announcement

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

  • Interpreting fe interaction output

    Hi – I am running fixed effects models on four subsamples: country 1, 2 ,3, 4.

    Code:
    by ctry, sort: xtreg dv i.iv1 i.iv2 i.iv3 i.iv4, fe
    I want to check whether the coefficient on i.iv1 is statistically different across groups, so I run the regression with an interaction term between i.iv1 and my country dummy.
    Code:
    xtreg dv i.iv1##i.ctry i.iv2 i.iv3 i.iv4, fe
    Code:
     iv1#ctry |
          Mod#Country 2  |   .6005202   .2146911     2.80   0.005     .1796544    1.021386
          Mod#Country 4  |  -.1762824   .1916935    -0.92   0.358    -.5520652    .1995003
          Mod#Country 3  |  -.2925244   .2086104    -1.40   0.161    -.7014699    .1164211
          Low#Country 2  |   .9035869   .2453192     3.68   0.000     .4226798    1.384494
          Low#Country 4  |   .0934972   .2228262     0.42   0.675    -.3433161    .5303105
          Low#Country 3  |   .0315544   .2363652     0.13   0.894    -.4317998    .4949085
    How can I interpret this output? Does this mean that the only significant cross group difference relative to reference group country 1, is in country 2? Whereas the effect of iv1 on my dv is not statistically different across all other countries.

    Is this the way to test cross group differences or are there any tests I could run? I’ve come across t-test, f-test, suest, lincom etc. but I am slightly confused as to which would apply to my situation.

  • #2
    Daria:
    the best way to share your Stata session with interested listers is to report withn CODE delimiters what you typed (as you did) and the entire outcome table Stata gave you back. Thanks.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Hi Carlo, apologies for not including the full model, I am limited in what I can share with this data. I have ran a similar model below to use as an example:

      Code:
       xtreg dv i.iv1##i.ctry i.iv2 i.iv3 i.iv4 i.iv5 i.iv6 i.iv7 [pw=pweight], fe
      note: 504.ctry omitted because of collinearity
      note: 788.ctry omitted because of collinearity
      note: 818.ctry omitted because of collinearity
      
      Fixed-effects (within) regression               Number of obs     =     16,511
      Group variable: Findid                          Number of groups  =      6,454
      
      R-sq:                                           Obs per group:
           within  = 0.0491                                         min =          2
           between = 0.0541                                         avg =        2.6
           overall = 0.0469                                         max =          4
      
                                                      F(22,6453)        =       6.93
      corr(u_i, Xb)  = -0.0767                        Prob > F          =     0.0000
      
                                           (Std. Err. adjusted for 6,454 clusters in Findid)
      --------------------------------------------------------------------------------------
                           |               Robust
                        dv |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      ---------------------+----------------------------------------------------------------
                       iv1 |
                      Mod  |   .3126514   .1442966     2.17   0.030     .0297821    .5955206
                      Low  |    .192744   .1714332     1.12   0.261     -.143322      .52881
                           |
                      ctry |
                Country 2  |          0  (omitted)
                Country 3  |          0  (omitted)
                Country 4  |          0  (omitted)
                           |
                  iv1#ctry |
            Mod#Country 2  |   .6005202   .2146911     2.80   0.005     .1796544    1.021386
            Mod#Country 3  |  -.1762824   .1916935    -0.92   0.358    -.5520652    .1995003
            Mod#Country 4  |  -.2925244   .2086104    -1.40   0.161    -.7014699    .1164211
            Low#Country 2  |   .9035869   .2453192     3.68   0.000     .4226798    1.384494
            Low#Country 3  |   .0934972   .2228262     0.42   0.675    -.3433161    .5303105
            Low#Country 4  |   .0315544   .2363652     0.13   0.894    -.4317998    .4949085
                           |
                       iv2 |
                        1  |   .1092862   .0779066     1.40   0.161    -.0434365    .2620089
                        2  |   .1330373   .1010537     1.32   0.188    -.0650616    .3311361
                        3  |   .2352026   .0868627     2.71   0.007     .0649229    .4054823
                           |
                       iv3 |
                        1  |   .0849263   .1195876     0.71   0.478    -.1495052    .3193577
                        2  |   .1199325   .1136192     1.06   0.291    -.1027988    .3426637
                        3  |   .2643084   .1131407     2.34   0.020      .042515    .4861017
                           |
                       iv4 |
                     Same  |  -.2180997    .076325    -2.86   0.004    -.3677221   -.0684773
                Increased  |  -.0815572   .1105018    -0.74   0.461    -.2981774    .1350631
                           |
                       iv5 |
               Unemployed  |   .2151195   .0957628     2.25   0.025     .0273926    .4028464
      Out of labour force  |   .1726011   .1183298     1.46   0.145    -.0593646    .4045668
                           |
                       iv6 |
                   Wave 2  |   -.033648   .0765424    -0.44   0.660    -.1836965    .1164004
                   Wave 3  |  -.1882545   .0859372    -2.19   0.029    -.3567199   -.0197891
                   Wave 4  |   .0708256   .0756178     0.94   0.349    -.0774103    .2190615
                           |
                     1.iv7 |  -.3116444   .3434191    -0.91   0.364    -.9848597    .3615709
                     _cons |  -.5615172   .1694909    -3.31   0.001    -.8937756   -.2292588
      ---------------------+----------------------------------------------------------------
                   sigma_u |   1.265059
                   sigma_e |  1.3917903
                       rho |  .45240845   (fraction of variance due to u_i)
      --------------------------------------------------------------------------------------
      
      .

      I used the four countries as my four subsamples, and I want to see whether the coefficients on iv1 are in fact different across the models. To do this i've run the above model and included an interaction between iv1 and my country variable. I am not sure how to interpret the result for country 2.

      Comment


      • #4
        Daria:
        the quickest approach is:
        Code:
        testparm i.iv1##i.ctry
        For country2, both interaction reach ststistical significance; what does it mean is difficult to say without knowing what the names of variables stay for.
        As an aside:
        1) your within R_Sq is really low;
        2) the correlation between the -u- term and the vector of regressors is low as well;
        3) as -sigma_e->-sigma_u- a panel-wise effect is uncertain at best.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Thank you for the quick reply Carlo. The interaction is between a variable identifying different countries and a variable that measures income security (high, medium, low), the outcome is an index measuring depressive symptoms. I have used testparm and this is the output.

          Code:
          testparm i.iv1##i.ctry
          
           ( 1)  1.iv1 = 0
           ( 2)  2.iv1 = 0
           ( 3)  1.iv1#504.ctry = 0
           ( 4)  1.iv1#788.ctry = 0
           ( 5)  1.iv1#818.ctry = 0
           ( 6)  2.iv1#504.ctry = 0
           ( 7)  2.iv1#788.ctry = 0
           ( 8)  2.iv1#818.ctry = 0
          
                 F(  8,  6453) =    6.84
                      Prob > F =    0.0000
          Does the outcome then imply that we can reject the hypothesis that the coefficients (1-8) are equal to zero i.e. there is a statistically significant interaction between the two variables and therefore all the coefficients I get from the subgroup analysis are statistically different from one another?

          Yes, I've taken note of the low within r sq and sigmas, would you mind explaining your second point? Where can I find this correlation information in the model.

          Comment


          • #6
            Daria:
            1) -testparm- outcome tells you that the tested coefficients are jointy different from zero. Therefore it does not imply that all the coefficients you get from the subgroup analysis are statistically different from one another, as you can see from the following toy-example:
            Code:
            . use "https://www.stata-press.com/data/r17/nlswork.dta"
            (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
            quietly xtreg ln_wage c.age##c.age i.msp##i.ind_code, fe vce(cluster idcode)
            . testparm i.msp##i.ind_code
            
             ( 1)  1.msp = 0
             ( 2)  2.ind_code = 0
             ( 3)  3.ind_code = 0
             ( 4)  4.ind_code = 0
             ( 5)  5.ind_code = 0
             ( 6)  6.ind_code = 0
             ( 7)  7.ind_code = 0
             ( 8)  8.ind_code = 0
             ( 9)  9.ind_code = 0
             (10)  10.ind_code = 0
             (11)  11.ind_code = 0
             (12)  12.ind_code = 0
             (13)  1.msp#2.ind_code = 0
             (14)  1.msp#3.ind_code = 0
             (15)  1.msp#4.ind_code = 0
             (16)  1.msp#5.ind_code = 0
             (17)  1.msp#6.ind_code = 0
             (18)  1.msp#7.ind_code = 0
             (19)  1.msp#8.ind_code = 0
             (20)  1.msp#9.ind_code = 0
             (21)  1.msp#10.ind_code = 0
             (22)  1.msp#11.ind_code = 0
             (23)  1.msp#12.ind_code = 0
            
                   F( 23,  4693) =   27.00
                        Prob > F =    0.0000
            .
            . mat list e(b)
            <snip>
            
            . test 1.msp#2.ind_code=1.msp#3.ind_code
            
             ( 1)  1.msp#2.ind_code - 1.msp#3.ind_code = 0
            
                   F(  1,  4693) =    1.90
                        Prob > F =    0.1677
            
            .
            2) please see:
            Code:
            xtreg dv i.iv1##i.ctry i.iv2 i.iv3 i.iv4 i.iv5 i.iv6 i.iv7 [pw=pweight], fe
            note: 504.ctry omitted because of collinearity
            note: 788.ctry omitted because of collinearity
            note: 818.ctry omitted because of collinearity
            
            Fixed-effects (within) regression               Number of obs     =     16,511
            Group variable: Findid                          Number of groups  =      6,454
            
            R-sq:                                           Obs per group:
                 within  = 0.0491                                         min =          2
                 between = 0.0541                                         avg =        2.6
                 overall = 0.0469                                         max =          4
            
                                                            F(22,6453)        =       6.93
            corr(u_i, Xb)  = -0.0767                        Prob > F          =     0.0000
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment

            Working...
            X