Announcement

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

  • #16
    Sorry, one more question: when I run the -margins- command for different values of wEPS or even for any other variable I get the same result. What is wrong here?

    Code:
    margins IFRS, dydx(wBVPS) at(SMARKETDUMMY = 1 (max) wEPS) noestimcheck pwcompare(effects)
    Code:
    Pairwise comparisons of average marginal effects
    Model VCE    : Conventional
    
    Expression   : Linear prediction, predict()
    dy/dx w.r.t. : wBVPS
    at           : SMARKETDUMMY    =           1
                   wEPS            =       32.47 (max)
    
    ------------------------------------------------------------------------------
                 |   Contrast Delta-method    Unadjusted           Unadjusted
                 |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    wBVPS        |
            IFRS |
         1 vs 0  |  -.0371534   .0209216    -1.78   0.076     -.078159    .0038521
    ------------------------------------------------------------------------------
    Code:
    margins IFRS, dydx(wBVPS) at(SMARKETDUMMY = 1 (min) wEPS) noestimcheck pwcompare(effects)
    Code:
    Pairwise comparisons of average marginal effects
    Model VCE    : Conventional
    
    Expression   : Linear prediction, predict()
    dy/dx w.r.t. : wBVPS
    at           : SMARKETDUMMY    =           1
                   wEPS            =     -22.764 (min)
    
    ------------------------------------------------------------------------------
                 |   Contrast Delta-method    Unadjusted           Unadjusted
                 |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    wBVPS        |
            IFRS |
         1 vs 0  |  -.0371534   .0209216    -1.78   0.076     -.078159    .0038521
    ------------------------------------------------------------------------------

    Code:
    margins IFRS, dydx(wBVPS) at(SMARKETDUMMY = 1 (mean) wSIZE) noestimcheck pwcompare(effects)
    Code:
    Pairwise comparisons of average marginal effects
    Model VCE    : Conventional
    
    Expression   : Linear prediction, predict()
    dy/dx w.r.t. : wBVPS
    at           : SMARKETDUMMY    =           1
                   wSIZE           =    10.82329 (mean)
    
    ------------------------------------------------------------------------------
                 |   Contrast Delta-method    Unadjusted           Unadjusted
                 |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    wBVPS        |
            IFRS |
         1 vs 0  |  -.0371534   .0209216    -1.78   0.076     -.078159    .0038521
    ------------------------------------------------------------------------------

    Comment


    • #17
      I think because there is no wEPS in the interaction term SMARKET_IFRS_wBVPS different values for wEPS does not chnage the result of -margins- command for wBVPS. However if so, I expect the -lincom- and -margins- commands give the same result, but they don't. Is it because -lincom- uses t distribution and -margins- uses z distribution?


      Code:
      xtreg wPJUN i.IFRS##SMARKETDUMMY##c.(wEPS wBVPS) wSIZE wLEV i.YEAR, fe
      Code:
      lincom (wBVPS +  IFRS_wBVPS  + SMARKET_wBVPS  + SMARKET_IFRS_wBVPS) - (wBVPS  + SMARKET_wBVPS)
      Code:
      ( 1)  IFRS_wBVPS + SMARKET_IFRS_wBVPS = 0
      
      ------------------------------------------------------------------------------
             wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               (1) |  -.0371534   .0139775    -2.66   0.019    -.0671321   -.0071747
      ------------------------------------------------------------------------------
      Code:
      margins IFRS, dydx(wBVPS) at(SMARKETDUMMY = 1) noestimcheck pwcompare(effects)
      Code:
      Pairwise comparisons of average marginal effects
      Model VCE    : Conventional
      
      Expression   : Linear prediction, predict()
      dy/dx w.r.t. : wBVPS
      at           : SMARKETDUMMY    =           1
      
      ------------------------------------------------------------------------------
                   |   Contrast Delta-method    Unadjusted           Unadjusted
                   |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      wBVPS        |
              IFRS |
           1 vs 0  |  -.0371534   .0209216    -1.78   0.076     -.078159    .0038521
      ------------------------------------------------------------------------------

      Comment


      • #18
        Dear Mr.Schechter,

        I need your comments because I am confused again while I compare coefficients with -lincom- command.

        To make things simpler, I will give an example on a simple regression model.

        I am interesting with the interaction terms containing IFRS (which is 1 when YEAR>2004 and 0 otherwise) in the regression model below.

        Code:
        reg wPJUN wBVPS wEPS IFRS IFRS_wBVPS IFRS_wEPS
        According to the results below, interaction terms are significant while IFRS_wEPS is negative and IFRS_wBVPS is positive.

        Code:
             Source |       SS           df       MS      Number of obs   =     5,066
        -------------+----------------------------------   F(5, 5060)      =   2267.93
               Model |  11700043.3         5  2340008.67   Prob > F        =    0.0000
            Residual |  5220824.95     5,060  1031.78359   R-squared       =    0.6915
        -------------+----------------------------------   Adj R-squared   =    0.6912
               Total |  16920868.3     5,065  3340.74398   Root MSE        =    32.121
        
        ------------------------------------------------------------------------------
               wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               wBVPS |   .5130289   .0282872    18.14   0.000     .4575738    .5684839
                wEPS |   6.738011   .3293181    20.46   0.000     6.092405    7.383617
                IFRS |  -3.327204    1.17009    -2.84   0.004    -5.621087   -1.033322
          IFRS_wBVPS |    .140099   .0311369     4.50   0.000     .0790573    .2011407
           IFRS_wEPS |    -1.1457   .3695617    -3.10   0.002    -1.870201   -.4211986
               _cons |   7.301195   1.021289     7.15   0.000     5.299027    9.303363
        ------------------------------------------------------------------------------
        Code:
         estimates store FULL

        Then, I run 2 regression models separately for two periods, one for YEAR<2005 which means also IFRS=0 (store it as beforeIFRS) and one for YEAR>2004 which means also IFRS=1 (store it after IFRS)

        Code:
        reg wPJUN wBVPS wEPS if YEAR<2005
        Code:
             Source |       SS           df       MS      Number of obs   =     1,221
        -------------+----------------------------------   F(2, 1218)      =   1153.69
               Model |  2846149.36         2  1423074.68   Prob > F        =    0.0000
            Residual |  1502400.26     1,218  1233.49775   R-squared       =    0.6545
        -------------+----------------------------------   Adj R-squared   =    0.6539
               Total |  4348549.62     1,220  3564.38493   Root MSE        =    35.121
        
        ------------------------------------------------------------------------------
               wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               wBVPS |   .5130289   .0309289    16.59   0.000     .4523491    .5737087
                wEPS |   6.738011    .360073    18.71   0.000     6.031579    7.444443
               _cons |   7.301195   1.116666     6.54   0.000     5.110393    9.491998
        ------------------------------------------------------------------------------
        Code:
        estimates store beforeIFRS
        Code:
        reg wPJUN wBVPS wEPS if YEAR>2004
        Code:
            Source |       SS           df       MS      Number of obs   =     3,845
        -------------+----------------------------------   F(2, 3842)      =   4567.37
               Model |  8840923.38         2  4420461.69   Prob > F        =    0.0000
            Residual |  3718424.69     3,842  967.835683   R-squared       =    0.7039
        -------------+----------------------------------   Adj R-squared   =    0.7038
               Total |  12559348.1     3,844  3267.26017   Root MSE        =     31.11
        
        ------------------------------------------------------------------------------
               wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               wBVPS |   .6531279   .0126034    51.82   0.000     .6284179    .6778379
                wEPS |   5.592312   .1624262    34.43   0.000     5.273862    5.910761
               _cons |   3.973991   .5530545     7.19   0.000     2.889682    5.058299
        ------------------------------------------------------------------------------
        Code:
         estimates store afterIFRS
        Finally when I put all the estimates in a table, everything is clear. The coefficient of wBVPS is same with the coefficient of wBVPS in beforeIFRS model. And the sum of wBVPS and IFRS_wBVPS in the full model equals the coefficient of wBVPS in afterIFRS model. So, I can say the effect of wBVPS on wPJUN increases when IFRS=1 both looking on the interaction term IFRS_wBVPS and also beforeIFRS and after IFRS results separately.

        Code:
        estout FULL beforeIFRS afterIFRS, cells(b(star fmt(3)) t(par fmt(2))) starlevels( * 0.10 ** 0.05 *** 0.010) legend label varlabels(_cons constant) stats(r2_w F, fmt(3 0 1))
        Code:
        --------------------------------------------------------------------
                                     FULL      beforeIFRS       afterIFRS   
                                      b/t             b/t             b/t   
        --------------------------------------------------------------------
        wBVPS                       0.513***        0.513***        0.653***
                                  (18.14)         (16.59)         (51.82)   
        wEPS                        6.738***        6.738***        5.592***
                                  (20.46)         (18.71)         (34.43)   
        IFRS                       -3.327***                                
                                  (-2.84)                                   
        IFRS_wBVPS                  0.140***                                
                                   (4.50)                                   
        IFRS_wEPS                  -1.146***                                
                                  (-3.10)                                   
        constant                    7.301***        7.301***        3.974***
                                   (7.15)          (6.54)          (7.19)   
        --------------------------------------------------------------------
        r2_w                                                                
        F                            2268            1154            4567   
        --------------------------------------------------------------------
        * p<0.10, ** p<0.05, *** p<0.010

        However, things are not such clear when I do the same thing with -xtreg, fe-.

        Code:
        xtreg wPJUN wBVPS wEPS IFRS IFRS_wBVPS IFRS_wEPS, fe
        Code:
        Fixed-effects (within) regression               Number of obs     =      5,066
        Group variable: ID                              Number of groups  =        536
        
        R-sq:                                           Obs per group:
             within  = 0.2359                                         min =          1
             between = 0.6720                                         avg =        9.5
             overall = 0.6531                                         max =         15
        
                                                        F(5,4525)         =     279.41
        corr(u_i, Xb)  = 0.6242                         Prob > F          =     0.0000
        
        ------------------------------------------------------------------------------
               wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               wBVPS |   .3353609   .0277342    12.09   0.000     .2809883    .3897335
                wEPS |   .3645672   .2283087     1.60   0.110    -.0830293    .8121637
                IFRS |   1.267426   .7435576     1.70   0.088    -.1903101    2.725162
          IFRS_wBVPS |   .0254974   .0198232     1.29   0.198    -.0133657    .0643604
           IFRS_wEPS |   2.179492   .2458172     8.87   0.000     1.697571    2.661414
               _cons |    15.1587   .7607563    19.93   0.000     13.66724    16.65015
        -------------+----------------------------------------------------------------
             sigma_u |    41.2771
             sigma_e |  18.177557
                 rho |  .83756763   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(535, 4525) = 21.08                  Prob > F = 0.0000
        Code:
        estimates store FULL
        Code:
        xtreg wPJUN wBVPS wEPS if YEAR<2005, fe
        Code:
        Fixed-effects (within) regression               Number of obs     =      1,221
        Group variable: ID                              Number of groups  =        286
        
        R-sq:                                           Obs per group:
             within  = 0.1089                                         min =          1
             between = 0.6032                                         avg =        4.3
             overall = 0.5968                                         max =          5
        
                                                        F(2,933)          =      57.02
        corr(u_i, Xb)  = 0.4799                         Prob > F          =     0.0000
        
        ------------------------------------------------------------------------------
               wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               wBVPS |   .4916305   .0661143     7.44   0.000     .3618805    .6213804
                wEPS |   .9280253   .2074027     4.47   0.000     .5209955    1.335055
               _cons |   16.87367    1.47462    11.44   0.000     13.97972    19.76763
        -------------+----------------------------------------------------------------
             sigma_u |  44.045657
             sigma_e |  12.554417
                 rho |  .92486132   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(285, 933) = 30.17                   Prob > F = 0.0000
        Code:
        estimates store beforeIFRS
        Code:
        xtreg wPJUN wBVPS wEPS if YEAR>2004, fe
        Code:
        Fixed-effects (within) regression               Number of obs     =      3,845
        Group variable: ID                              Number of groups  =        510
        
        R-sq:                                           Obs per group:
             within  = 0.1765                                         min =          1
             between = 0.7748                                         avg =        7.5
             overall = 0.7031                                         max =         10
        
                                                        F(2,3333)         =     357.12
        corr(u_i, Xb)  = 0.6841                         Prob > F          =     0.0000
        
        ------------------------------------------------------------------------------
               wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               wBVPS |   .3283209   .0279331    11.75   0.000     .2735531    .3830887
                wEPS |   2.437731   .1340532    18.18   0.000     2.174896    2.700565
               _cons |   15.33247   .6503114    23.58   0.000     14.05742    16.60752
        -------------+----------------------------------------------------------------
             sigma_u |  35.715508
             sigma_e |   17.28672
                 rho |  .81019732   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(509, 3333) = 17.90                  Prob > F = 0.0000
        Code:
        estimates store afterIFRS
        Code:
        estout FULL beforeIFRS afterIFRS, cells(b(star fmt(3)) t(par fmt(2))) starlevels( * 0.10 ** 0.05 *** 0.010) legend label varlabels(_cons constant) stats(r2_w F, fmt(3 0 1))
        Code:
        --------------------------------------------------------------------
                                     FULL      beforeIFRS       afterIFRS   
                                      b/t             b/t             b/t   
        --------------------------------------------------------------------
        wBVPS                       0.513***        0.492***        0.328***
                                  (18.14)          (7.44)         (11.75)   
        wEPS                        6.738***        0.928***        2.438***
                                  (20.46)          (4.47)         (18.18)   
        IFRS                       -3.327***                                
                                  (-2.84)                                   
        IFRS_wBVPS                  0.140***                                
                                   (4.50)                                   
        IFRS_wEPS                  -1.146***                                
                                  (-3.10)                                   
        constant                    7.301***       16.874***       15.332***
                                   (7.15)         (11.44)         (23.58)   
        --------------------------------------------------------------------
        r2_w                                        0.109           0.176   
        F                            2268              57             357   
        --------------------------------------------------------------------
        * p<0.10, ** p<0.05, *** p<0.010
        When I look at the interaction term IFRS_wBVPS in the full model, it is positive and significant which means the effect of wBVPS on wPJUN increases when IFRS=1. However when I compare the coefficients of wBVPS in beforeIFRS and afterIFRS results, it says the opposite. The coefficient of wBVPS in afterIFRS model is smaller than the coefficient of wBVPS in beforeIFRS model. So, I am not sure if my interpretation as "the effect of wBVPS on wPJUN increases when IFRS=1" is true or false?

        Also, as I explain in #9 of this thread, I calculate the coefficients of before and after IFR periods using the coefficients in the full model with interaction terms and compare them with -lincom- command if the difference is significant or not. However when I check the calculation in this simple example, I see that it is not correct. For example first of all, the coefficient of wBVPS in the FULL model (0.513 ) is not same with the coefficient of wBVPS in beforeIFRS model (0.492). So when I sum the coefficients of wBVPS and IFRS_wBVPS for the FULL model, I expect to get the samr coefficient of wBVPS as in afterIFRS model, but it is not true again. So does it mean I cannot make calculations as in #9 of this thread?

        I am sorry for writing such a long post, but I wanted to make my question as clear as possible. Because I have to be sure if my interpretations and calculations regarding the FULL model with -xreg,fe- is correct or not. Thank you in advance for your help

        Comment


        • #19
          So, things work differently in a fixed (or, for that matter, a random) effects model. When you subdivide the data into the two subsets, the data on which the fixed (or random) effects are estimated changes, and those estimates change with it. This results in changes to the coefficients of all other variables in the model. The identity between the subset coefficients and the coefficients calculated from an interaction model fails when there are other variables (which fixed and random effects implicitly are) in the model besides the interaction and its constituents. When the other variables are overt variables, you can restore that identity by including all other variables in the interaction. See the following example:

          Code:
          . sysuse auto, clear
          (1978 Automobile Data)
          
          . 
          . keep if rep78 >= 3
          (10 observations deleted)
          
          . 
          . //      THE MODEL CONTAINS AN EXTRA VARIABLE: HEADROOM
          . regress price headroom i.foreign##c.mpg
          
                Source |       SS           df       MS      Number of obs   =        64
          -------------+----------------------------------   F(4, 59)        =      5.96
                 Model |   155160507         4  38790126.9   Prob > F        =    0.0004
              Residual |   384154564        59   6511094.3   R-squared       =    0.2877
          -------------+----------------------------------   Adj R-squared   =    0.2394
                 Total |   539315071        63  8560556.68   Root MSE        =    2551.7
          
          -------------------------------------------------------------------------------
                  price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          --------------+----------------------------------------------------------------
               headroom |  -319.7267   496.4843    -0.64   0.522     -1313.19    673.7361
                        |
                foreign |
               Foreign  |  -324.4303   2921.258    -0.11   0.912    -6169.854    5520.994
                    mpg |  -328.7858   88.96773    -3.70   0.000    -506.8099   -150.7618
                        |
          foreign#c.mpg |
               Foreign  |   79.31363   122.9653     0.65   0.521    -166.7394    325.3667
                        |
                  _cons |   13724.87   2873.737     4.78   0.000     7974.533     19475.2
          -------------------------------------------------------------------------------
          
          . margins foreign, dydx(mpg)
          
          Average marginal effects                        Number of obs     =         64
          Model VCE    : OLS
          
          Expression   : Linear prediction, predict()
          dy/dx w.r.t. : mpg
          
          ------------------------------------------------------------------------------
                       |            Delta-method
                       |      dy/dx   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
          mpg          |
               foreign |
             Domestic  |  -328.7858   88.96773    -3.70   0.000    -506.8099   -150.7618
              Foreign  |  -249.4722   84.23585    -2.96   0.004    -418.0278   -80.91666
          ------------------------------------------------------------------------------
          
          . 
          . //      THE SUBSET ANALYSES DO NOT AGREE WITH
          . //      THE RESULTS BASED ON THE INTERACTION MODEL
          . regress price headroom mpg if foreign
          
                Source |       SS           df       MS      Number of obs   =        22
          -------------+----------------------------------   F(2, 19)        =      6.75
                 Model |  59964963.4         2  29982481.7   Prob > F        =    0.0061
              Residual |  84398249.4        19  4442013.13   R-squared       =    0.4154
          -------------+----------------------------------   Adj R-squared   =    0.3538
                 Total |   144363213        21   6874438.7   Root MSE        =    2107.6
          
          ------------------------------------------------------------------------------
                 price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
              headroom |   700.0356   946.4659     0.74   0.469     -1280.94    2681.012
                   mpg |  -252.3255     69.617    -3.62   0.002    -398.0356   -106.6155
                 _cons |   10805.83   2995.142     3.61   0.002      4536.93    17074.74
          ------------------------------------------------------------------------------
          
          . regress price headroom mpg if !foreign
          
                Source |       SS           df       MS      Number of obs   =        42
          -------------+----------------------------------   F(2, 39)        =      6.70
                 Model |   100842067         2  50421033.7   Prob > F        =    0.0031
              Residual |   293407891        39  7523279.26   R-squared       =    0.2558
          -------------+----------------------------------   Adj R-squared   =    0.2176
                 Total |   394249958        41  9615852.65   Root MSE        =    2742.9
          
          ------------------------------------------------------------------------------
                 price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
              headroom |  -555.4074   592.1492    -0.94   0.354    -1753.142    642.3275
                   mpg |  -347.5013   97.77942    -3.55   0.001    -545.2788   -149.7237
                 _cons |   14846.52   3321.613     4.47   0.000     8127.927    21565.12
          ------------------------------------------------------------------------------
          
          . 
          . //      BUT WHEN WE INCLUDE THE EXTRA VARIABLE IN
          . //      THE INTERACTON MODEL, AGREEMENT IS RESTORED
          . regress price i.foreign##c.(mpg headroom)
          
                Source |       SS           df       MS      Number of obs   =        64
          -------------+----------------------------------   F(5, 58)        =      4.96
                 Model |   161508931         5  32301786.1   Prob > F        =    0.0008
              Residual |   377806140        58  6513898.97   R-squared       =    0.2995
          -------------+----------------------------------   Adj R-squared   =    0.2391
                 Total |   539315071        63  8560556.68   Root MSE        =    2552.2
          
          ------------------------------------------------------------------------------------
                       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------------+----------------------------------------------------------------
                     foreign |
                    Foreign  |  -4040.689   4765.289    -0.85   0.400    -13579.45    5498.074
                         mpg |  -347.5013   90.98387    -3.82   0.000    -529.6253   -165.3773
                    headroom |  -555.4074   550.9956    -1.01   0.318    -1658.345      547.53
                             |
               foreign#c.mpg |
                    Foreign  |   95.17577   124.0369     0.77   0.446    -153.1111    343.4626
                             |
          foreign#c.headroom |
                    Foreign  |   1255.443     1271.7     0.99   0.328    -1290.141    3801.027
                             |
                       _cons |   14846.52   3090.765     4.80   0.000     8659.685    21033.36
          ------------------------------------------------------------------------------------
          
          . margins foreign, dydx(mpg)
          
          Average marginal effects                        Number of obs     =         64
          Model VCE    : OLS
          
          Expression   : Linear prediction, predict()
          dy/dx w.r.t. : mpg
          
          ------------------------------------------------------------------------------
                       |            Delta-method
                       |      dy/dx   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
          mpg          |
               foreign |
             Domestic  |  -347.5013   90.98387    -3.82   0.000    -529.6253   -165.3773
              Foreign  |  -252.3255   84.30355    -2.99   0.004    -421.0774   -83.57362
          ------------------------------------------------------------------------------
          
          .
          This is what's happening in your fixed effects model, with the fixed effects themselves playing the role of headroom in this example.

          Comment


          • #20
            Thank you, I understand the logic. So, which is more reliable to see the incremental effect of IFRS on the effect of wBVPS on wPJUN, to run the regressions separately for before and after IFRS periods and compare the coefficients or to run the regression with interaction term for the whole period and take into consideration the sign and significancy of the interaction term? I am confused because these 2 methods cause very different interpretations at the end.

            Comment


            • #21
              Well, normally the differences between the two results are small. The fact that they are so large in your case (at least for wEPS) leaves me wondering whether the data are correct. Are you absolutely sure that the variable IFRS corresponds exactly to the two time periods in question? What happens if you run -assert IFRS == (year > 2004)-?

              And are you absolutely sure that your hand-calculated interaction variables are correct? Try running
              Code:
              assert IFRS_wBVPS == IFRS#c.wBVPS
              assert IFRS_wEPS == IFRS#c.wEPS
              If those -asserts- all pass, then I am left concluding that something happens to scramble the ID effects in 2005, so that they are very different before and after. What happens if you run
              Code:
              xtreg wPJUN wBVPS wEPS if IFRS == 0, fe
              predict u_before, u
              xtreg wPJUN wBVPS wEPS if IFRS == 1, fe
              predict u_after, u
              
              preserve
              collapse (firstnm) u_before u_after, by(ID)
              summ u_before u_after
              corr u_before u_after
              restore




              Comment


              • #22
                Dear Mr. Schechter,

                All -asserts- pass, they produced no output.I put the other commands and results below:

                Code:
                xtreg wPJUN wBVPS wEPS if IFRS == 0, fe
                Code:
                Fixed-effects (within) regression               Number of obs     =      1,221
                Group variable: ID                              Number of groups  =        286
                
                R-sq:                                           Obs per group:
                     within  = 0.1089                                         min =          1
                     between = 0.6032                                         avg =        4.3
                     overall = 0.5968                                         max =          5
                
                                                                F(2,933)          =      57.02
                corr(u_i, Xb)  = 0.4799                         Prob > F          =     0.0000
                
                ------------------------------------------------------------------------------
                       wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                       wBVPS |   .4916305   .0661143     7.44   0.000     .3618805    .6213804
                        wEPS |   .9280253   .2074027     4.47   0.000     .5209955    1.335055
                       _cons |   16.87367    1.47462    11.44   0.000     13.97972    19.76763
                -------------+----------------------------------------------------------------
                     sigma_u |  44.045657
                     sigma_e |  12.554417
                         rho |  .92486132   (fraction of variance due to u_i)
                ------------------------------------------------------------------------------
                F test that all u_i=0: F(285, 933) = 30.17                   Prob > F = 0.0000
                Code:
                 predict u_before, u
                Code:
                (3,845 missing values generated)
                Code:
                 xtreg wPJUN wBVPS wEPS if IFRS == 1, fe
                Code:
                Fixed-effects (within) regression               Number of obs     =      3,845
                Group variable: ID                              Number of groups  =        510
                
                R-sq:                                           Obs per group:
                     within  = 0.1765                                         min =          1
                     between = 0.7748                                         avg =        7.5
                     overall = 0.7031                                         max =         10
                
                                                                F(2,3333)         =     357.12
                corr(u_i, Xb)  = 0.6841                         Prob > F          =     0.0000
                
                ------------------------------------------------------------------------------
                       wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                       wBVPS |   .3283209   .0279331    11.75   0.000     .2735531    .3830887
                        wEPS |   2.437731   .1340532    18.18   0.000     2.174896    2.700565
                       _cons |   15.33247   .6503114    23.58   0.000     14.05742    16.60752
                -------------+----------------------------------------------------------------
                     sigma_u |  35.715508
                     sigma_e |   17.28672
                         rho |  .81019732   (fraction of variance due to u_i)
                ------------------------------------------------------------------------------
                F test that all u_i=0: F(509, 3333) = 17.90                  Prob > F = 0.0000
                Code:
                predict u_after, u
                Code:
                (1,221 missing values generated)
                Code:
                preserve
                Code:
                collapse (firstnm) u_before u_after, by(ID)
                Code:
                summ u_before u_after
                Code:
                    Variable |        Obs        Mean    Std. Dev.       Min        Max
                -------------+---------------------------------------------------------
                    u_before |        286    .4090657    44.04566  -71.42841   296.8214
                     u_after |        510   -1.433557    35.71551  -39.39918   277.8025
                Code:
                corr u_before u_after
                Code:
                (obs=260)
                
                             | u_before  u_after
                -------------+------------------
                    u_before |   1.0000
                     u_after |   0.8374   1.0000
                Code:
                restore

                Comment


                • #23
                  So what I see here is that the overall distributions of u in the before- and after- regressions are similar. But, and I wish this had caught my eye sooner, only 260 of your groups appear in both the before and after conditions. So even though the u's tend to breed true for the same group across the two conditions (r = 0.8374 is great!), half of the groups in the second regression don't even appear in the first regression. I think it is this huge disconnect between the before- and after- populations that is causing the major discrepancy: the before and after models are really not very comparable to each other because the latter contains hundreds of fixed effects that are not present in the former.

                  Under the circumstances, I think that the logic that normally supports the use of the interaction model has been substantially undermined by this data. I think you should disregard the interaction approach here and rely on the separate regressions instead. I don't think they're very combinable. And I also would be very hesitant to attempt to make comparisons between the before and after results. (You won't be able to formally test the coefficients for equality because -xtreg- is not supported by -suest- in any case, but what I'm saying here is that even if you could, you probably shouldn't try.)

                  All of that said, I have never encountered this situation in my own work, nor in that of others I have worked directly with. I'm wondering if others out there have, and if they have advice on how they handled it. Perhaps there is a way to resolve this problem that I'm overlooking.

                  Comment


                  • #24
                    Dear Mr. Schechter,

                    Thank you for your comments. So it means there is no a reliable way to test the incremental effect of IFRS using my dataset. It is really a bad new for me. I would appreciate if someone can advice on this subject.

                    Comment


                    • #25
                      Dear All,

                      In order to see if the problem which I explain in #18 of this thread is related with the number of groups which appear in both the before and after condition as Mr.Schechter thinks, I use the balanced version of my dataset and do the same things with this balanced panel dataset. However same problem is valid for the balanced dataset also. I put the codes and results as in #18 and also as in #21 for balanced dataset below. I hope somebody could tell me why the FULL model with interaction term gives inconsistent results with the before and after models' results, if there is something wrong with my dataset. If not, which method is more reliable to see the incremental effect of IFRS on the effect of wBVPS on wPJUN, to run the regressions separately for before and after IFRS periods and compare the coefficients or to run the regression with interaction term for the whole period and take into consideration the sign and significancy of the interaction term?

                      Code:
                      xtreg wPJUN wBVPS wEPS IFRS IFRS_wBVPS IFRS_wEPS, fe
                      Code:
                      Fixed-effects (within) regression               Number of obs     =      2,415
                      Group variable: ID                              Number of groups  =        161
                      
                      R-sq:                                           Obs per group:
                           within  = 0.2834                                         min =         15
                           between = 0.8050                                         avg =       15.0
                           overall = 0.7317                                         max =         15
                      
                                                                      F(5,2249)         =     177.92
                      corr(u_i, Xb)  = 0.6518                         Prob > F          =     0.0000
                      
                      ------------------------------------------------------------------------------
                             wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                             wBVPS |   .3663307   .0377632     9.70   0.000     .2922764     .440385
                              wEPS |   .6645639   .3141065     2.12   0.034     .0485949    1.280533
                              IFRS |   1.033371   .8606399     1.20   0.230    -.6543606    2.721103
                        IFRS_wBVPS |   .0302344   .0227819     1.33   0.185    -.0144413    .0749101
                         IFRS_wEPS |   1.868656   .3319809     5.63   0.000     1.217635    2.519677
                             _cons |   18.28393   1.143474    15.99   0.000     16.04155     20.5263
                      -------------+----------------------------------------------------------------
                           sigma_u |  36.582626
                           sigma_e |  17.342152
                               rho |  .81650816   (fraction of variance due to u_i)
                      ------------------------------------------------------------------------------
                      F test that all u_i=0: F(160, 2249) = 32.32                  Prob > F = 0.0000
                      Code:
                      estimates store FULL
                      Code:
                      xtreg wPJUN wBVPS wEPS if YEAR<2005, fe
                      Code:
                      Fixed-effects (within) regression               Number of obs     =        805
                      Group variable: ID                              Number of groups  =        161
                      
                      R-sq:                                           Obs per group:
                           within  = 0.1889                                         min =          5
                           between = 0.6827                                         avg =        5.0
                           overall = 0.6602                                         max =          5
                      
                                                                      F(2,642)          =      74.77
                      corr(u_i, Xb)  = -0.2987                        Prob > F          =     0.0000
                      
                      ------------------------------------------------------------------------------
                             wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                             wBVPS |   .9055875   .1010725     8.96   0.000     .7071149     1.10406
                              wEPS |   1.157003   .2722933     4.25   0.000     .6223097    1.691696
                             _cons |   3.877308   2.423784     1.60   0.110    -.8821944     8.63681
                      -------------+----------------------------------------------------------------
                           sigma_u |  29.699805
                           sigma_e |  10.996854
                               rho |  .87943201   (fraction of variance due to u_i)
                      ------------------------------------------------------------------------------
                      F test that all u_i=0: F(160, 642) = 24.63                   Prob > F = 0.0000
                      Code:
                      estimates store beforeIFRS
                      Code:
                      xtreg wPJUN wBVPS wEPS if YEAR>2004, fe
                      Code:
                      Fixed-effects (within) regression               Number of obs     =      1,610
                      Group variable: ID                              Number of groups  =        161
                      
                      R-sq:                                           Obs per group:
                           within  = 0.1719                                         min =         10
                           between = 0.7773                                         avg =       10.0
                           overall = 0.7329                                         max =         10
                      
                                                                      F(2,1447)         =     150.14
                      corr(u_i, Xb)  = 0.5049                         Prob > F          =     0.0000
                      
                      ------------------------------------------------------------------------------
                             wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                             wBVPS |   .5461007   .0493324    11.07   0.000       .44933    .6428714
                              wEPS |   2.008088   .2062227     9.74   0.000      1.60356    2.412615
                             _cons |   15.53435   1.647138     9.43   0.000     12.30332    18.76538
                      -------------+----------------------------------------------------------------
                           sigma_u |  35.689134
                           sigma_e |  16.917444
                               rho |  .81652843   (fraction of variance due to u_i)
                      ------------------------------------------------------------------------------
                      F test that all u_i=0: F(160, 1447) = 27.59                  Prob > F = 0.0000
                      Code:
                      estimates store afterIFRS
                      Code:
                      estout FULL beforeIFRS afterIFRS, cells(b(star fmt(3)) t(par fmt(2))) starlevels( * 0.10 ** 0.05 *** 0.010) legend label varlabels(_cons constant) stats(r2_w F, fmt(3 0 1))
                      Code:
                      --------------------------------------------------------------------
                                                   FULL      beforeIFRS       afterIFRS   
                                                    b/t             b/t             b/t   
                      --------------------------------------------------------------------
                      wBVPS                       0.366***        0.906***        0.546***
                                                 (9.70)          (8.96)         (11.07)   
                      wEPS                        0.665**         1.157***        2.008***
                                                 (2.12)          (4.25)          (9.74)   
                      IFRS                        1.033                                   
                                                 (1.20)                                   
                      IFRS_wBVPS                  0.030                                   
                                                 (1.33)                                   
                      IFRS_wEPS                   1.869***                                
                                                 (5.63)                                   
                      constant                   18.284***        3.877          15.534***
                                                (15.99)          (1.60)          (9.43)   
                      --------------------------------------------------------------------
                      r2_w                        0.283           0.189           0.172   
                      F                             178              75             150   
                      --------------------------------------------------------------------
                      * p<0.10, ** p<0.05, *** p<0.010
                      Code:
                      xtreg wPJUN wBVPS wEPS if IFRS == 0, fe
                      Code:
                      Fixed-effects (within) regression               Number of obs     =        805
                      Group variable: ID                              Number of groups  =        161
                      
                      R-sq:                                           Obs per group:
                           within  = 0.1889                                         min =          5
                           between = 0.6827                                         avg =        5.0
                           overall = 0.6602                                         max =          5
                      
                                                                      F(2,642)          =      74.77
                      corr(u_i, Xb)  = -0.2987                        Prob > F          =     0.0000
                      
                      ------------------------------------------------------------------------------
                             wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                             wBVPS |   .9055875   .1010725     8.96   0.000     .7071149     1.10406
                              wEPS |   1.157003   .2722933     4.25   0.000     .6223097    1.691696
                             _cons |   3.877308   2.423784     1.60   0.110    -.8821944     8.63681
                      -------------+----------------------------------------------------------------
                           sigma_u |  29.699805
                           sigma_e |  10.996854
                               rho |  .87943201   (fraction of variance due to u_i)
                      ------------------------------------------------------------------------------
                      F test that all u_i=0: F(160, 642) = 24.63                   Prob > F = 0.0000
                      
                      .
                      Code:
                      predict u_before, u
                      Code:
                      (1,610 missing values generated)
                      Code:
                      xtreg wPJUN wBVPS wEPS if IFRS == 1, fe
                      Code:
                      Fixed-effects (within) regression               Number of obs     =      1,610
                      Group variable: ID                              Number of groups  =        161
                      
                      R-sq:                                           Obs per group:
                           within  = 0.1719                                         min =         10
                           between = 0.7773                                         avg =       10.0
                           overall = 0.7329                                         max =         10
                      
                                                                      F(2,1447)         =     150.14
                      corr(u_i, Xb)  = 0.5049                         Prob > F          =     0.0000
                      
                      ------------------------------------------------------------------------------
                             wPJUN |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                             wBVPS |   .5461007   .0493324    11.07   0.000       .44933    .6428714
                              wEPS |   2.008088   .2062227     9.74   0.000      1.60356    2.412615
                             _cons |   15.53435   1.647138     9.43   0.000     12.30332    18.76538
                      -------------+----------------------------------------------------------------
                           sigma_u |  35.689134
                           sigma_e |  16.917444
                               rho |  .81652843   (fraction of variance due to u_i)
                      ------------------------------------------------------------------------------
                      F test that all u_i=0: F(160, 1447) = 27.59                  Prob > F = 0.0000
                      Code:
                      predict u_after, u
                      Code:
                      (805 missing values generated)
                      Code:
                      preserve
                      collapse (firstnm) u_before u_after, by(ID)
                      summ u_before u_after
                      Code:
                          Variable |        Obs        Mean    Std. Dev.       Min        Max
                      -------------+---------------------------------------------------------
                          u_before |        161    3.25e-08     29.6998  -138.5211    220.487
                           u_after |        161   -8.54e-08    35.68913  -73.03471   227.3713
                      Code:
                      corr u_before u_after
                      Code:
                      (obs=161)
                      
                                   | u_before  u_after
                      -------------+------------------
                          u_before |   1.0000
                           u_after |   0.6085   1.0000

                      Comment

                      Working...
                      X