Announcement

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

  • Help with time dummies

    Hi there new to the forum, I am investigating the effect of derivative use on firm value (with control variables added) on unbalanced panel data from 2015-2016

    I have run 3 regression models, 1 simple OLS, and then the same model with industry dummies and then a firm-fixed effects model.


    I was curious and tried my models again introducing a time dummy (1 for 2015, 0 for 2016), the time dummy were quite insignificant in each model. I performed a 2 tail test after each regression for the time dummy and one again it confirmed it wasn’t significant, so decided not to use them Is this correct?

    Here are the various outputs:

    OLS without time dummy:


    ource | SS df MS Number of obs = 539
    -------------+---------------------------------- F(11, 527) = 174.31
    Model | 131.403067 11 11.9457334 Prob > F = 0.0000
    Residual | 36.1158244 527 .068530976 R-squared = 0.7844
    -------------+---------------------------------- Adj R-squared = 0.7799
    Total | 167.518892 538 .311373405 Root MSE = .26178

    -------------------------------------------------------------------------------------
    firm value Coef. Std. Err. t P>|t| [95% Conf. Interval]
    --------------------+----------------------------------------------------------------
    lnassets | -.0175601 .0081555 -2.15 0.032 -.0335814 -.0015388
    FXDerivatives10 | .0446019 .0267908 1.66 0.097 -.008028 .0972319
    IRDerivatives10 | -.038192 .0283619 -1.35 0.179 -.0939083 .0175243
    bookleverage_w1 | .3014549 .0633091 4.76 0.000 .1770857 .4258241
    roa | .0501033 .0035524 14.10 0.000 .0431247 .0570818
    z1 | .069638 .0044332 15.71 0.000 .060929 .078347
    cratio_w1 | -.0920026 .0109629 -8.39 0.000 -.113539 -.0704662
    rnd_rev | .0126128 .0022501 5.61 0.000 .0081925 .0170331
    cash_to_totalassets | .2368669 .1432397 1.65 0.099 -.044524 .5182578
    div_yield | -.0368795 .003593 -10.26 0.000 -.043938 -.0298211
    roce_w1 | .0010044 .0004492 2.24 0.026 .0001219 .001887
    _cons | .2019534 .0665961 3.03 0.003 .071127 .3327797

    OLS with time dummy:

    Source | SS df MS Number of obs = 539
    -------------+---------------------------------- F(12, 526) = 159.49
    Model | 131.403718 12 10.9503098 Prob > F = 0.0000
    Residual | 36.1151742 526 .068660027 R-squared = 0.7844
    -------------+---------------------------------- Adj R-squared = 0.7795
    Total | 167.518892 538 .311373405 Root MSE = .26203

    -------------------------------------------------------------------------------------
    firm value | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    --------------------+----------------------------------------------------------------
    lnassets | -.0175976 .0081723 -2.15 0.032 -.033652 -.0015433
    FXDerivatives10 | .0446179 .0268166 1.66 0.097 -.0080628 .0972986
    IRDerivatives10 | -.0381434 .028393 -1.34 0.180 -.093921 .0176342
    bookleverage_w1 | .3015757 .0633808 4.76 0.000 .177065 .4260863
    roa1 | .0501024 .0035557 14.09 0.000 .0431172 .0570875
    z1 | .0696504 .0044393 15.69 0.000 .0609296 .0783713
    cratio_w1 | -.0919885 .0109742 -8.38 0.000 -.1135471 -.0704299
    rnd_rev | .0126132 .0022522 5.60 0.000 .0081887 .0170377
    cash_to_totalassets | .236594 .1434019 1.65 0.100 -.0451168 .5183048
    div_yield | -.0368644 .0035998 -10.24 0.000 -.0439361 -.0297927
    roce_w1 | .0010059 .0004499 2.24 0.026 .000122 .0018898
    year2015 | -.0022064 .0226742 -0.10 0.923 -.0467496 .0423367
    _cons | .2031527 .0677885 3.00 0.003 .0699832 .3363221
    -------------------------------------------------------------------------------------

    Industry model without time dummy:

    Source | SS df MS Number of obs = 539
    -------------+---------------------------------- F(58, 480) = 43.84
    Model | 140.917485 58 2.4296118 Prob > F = 0.0000
    Residual | 26.6014073 480 .055419598 R-squared = 0.8412
    -------------+---------------------------------- Adj R-squared = 0.8220
    Total | 167.518892 538 .311373405 Root MSE = .23541

    -------------------------------------------------------------------------------------
    firm value | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    --------------------+----------------------------------------------------------------
    lnassets | -.0152283 .0086275 -1.77 0.078 -.0321806 .001724
    FXDerivatives10 | .0071845 .0285817 0.25 0.802 -.0489762 .0633452
    IRDerivatives10 | -.0116745 .0278513 -0.42 0.675 -.0664002 .0430511
    bookleverage_w1 | .175635 .0639462 2.75 0.006 .049986 .301284
    roa . | .0476971 .0035201 13.55 0.000 .0407804 .0546137
    z1 . | .063346 .0042326 14.97 0.000 .0550293 .0716627
    cratio_w1 | -.0949652 .0115556 -8.22 0.000 -.117671 -.0722594
    rnd_rev | .0065982 .002436 2.71 0.007 .0018116 .0113849
    cash_to_totalassets | .2114229 .141328 1.50 0.135 -.0662752 .489121
    div_yield | -.0318108 .0034352 -9.26 0.000 -.0385607 -.0250609
    roce_w1 | .0007736 .0004437 1.74 0.082 -.0000983 .0016454
    _cons | -.2267953 .1803996 -1.26 0.209 -.5812658 .1276753

    industry model with time dummy:
    Source | SS df MS Number of obs = 539
    -------------+---------------------------------- F(59, 479) = 43.01
    Model | 140.917686 59 2.38843536 Prob > F = 0.0000
    Residual | 26.6012055 479 .055534876 R-squared = 0.8412
    -------------+---------------------------------- Adj R-squared = 0.8216
    Total | 167.518892 538 .311373405 Root MSE = .23566

    -------------------------------------------------------------------------------------
    firmvalue | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    --------------------+----------------------------------------------------------------
    lnassets | -.0151998 .0086494 -1.76 0.079 -.0321952 .0017955
    FXDerivatives10 | .0071648 .0286133 0.25 0.802 -.0490583 .0633878
    IRDerivatives10 | -.011699 .0278832 -0.42 0.675 -.0664875 .0430896
    bookleverage_w1 | .1755661 .0640229 2.74 0.006 .0497657 .3013665
    roa | .0476972 .0035237 13.54 0.000 .0407733 .0546211
    z1 . | .063337 .0042396 14.94 0.000 .0550064 .0716675
    cratio_w1 | -.0949726 .0115682 -8.21 0.000 -.1177034 -.0722419
    rnd_rev | .006597 .0024387 2.71 0.007 .0018052 .0113888
    cash_to_totalassets | .211593 .1415031 1.50 0.135 -.0664505 .4896365
    div_yield | -.0318182 .003441 -9.25 0.000 -.0385795 -.025057
    roce_w1 | .0007726 .0004445 1.74 0.083 -.0001008 .0016459
    year2015 | .0012352 .0204929 0.06 0.952 -.039032 .0415023
    _cons | -.2275501 .1810209 -1.26 0.209 -.5832433 .1281431


    firm fixed effects model without time dummy:


    Fixed-effects (within) regression Number of obs = 539
    Group variable: firmid Number of groups = 282

    R-sq: Obs per group:
    within = 0.3170 min = 1
    between = 0.2210 avg = 1.9
    overall = 0.2319 max = 2

    F(11,246) = 10.38
    corr(u_i, Xb) = -0.6013 Prob > F = 0.0000

    -------------------------------------------------------------------------------------
    firm value . | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    --------------------+----------------------------------------------------------------
    lnassets | -.3381877 .0604746 -5.59 0.000 -.4573017 -.2190736
    FXDerivatives10 | .0952812 .0743215 1.28 0.201 -.0511064 .2416688
    IRDerivatives10 | -.1214566 .0744892 -1.63 0.104 -.2681747 .0252614
    bookleverage_w1 | .1692325 .1216745 1.39 0.166 -.0704241 .4088892
    roa . | .020826 .0056757 3.67 0.000 .0096468 .0320051
    z1 | .007085 .0148235 0.48 0.633 -.0221122 .0362821
    cratio_w1 | -.0695064 .0227655 -3.05 0.003 -.1143466 -.0246663
    rnd_rev | -.0109449 .0082216 -1.33 0.184 -.0271386 .0052488
    cash_to_totalassets | .347916 .2082939 1.67 0.096 -.062351 .758183
    div_yield | -.0214717 .0032936 -6.52 0.000 -.0279589 -.0149845
    roce_w1 | .0003598 .0004738 0.76 0.448 -.0005734 .0012931
    _cons | 2.916311 .4469079 6.53 0.000 2.036057 3.796565
    --------------------+----------------------------------------------------------------
    sigma_u | .61284951
    sigma_e | .12766146
    rho | .95841236 (fraction of variance due to u_i)
    -------------------------------------------------------------------------------------
    F test that all u_i=0: F(281, 246) = 7.01 Prob > F = 0.0000

    .
    Firm fixed effects with time dummy:

    Fixed-effects (within) regression Number of obs = 539
    Group variable: firmid Number of groups = 282

    R-sq: Obs per group:
    within = 0.3234 min = 1
    between = 0.2051 avg = 1.9
    overall = 0.2155 max = 2

    F(12,245) = 9.76
    corr(u_i, Xb) = -0.6938 Prob > F = 0.0000

    -------------------------------------------------------------------------------------
    lntobinsq | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    --------------------+----------------------------------------------------------------
    lnassets | -.4007886 .0731027 -5.48 0.000 -.5447786 -.2567987
    FXDerivatives10 | .1024007 .074275 1.38 0.169 -.0438983 .2486997
    IRDerivatives10 | -.1037169 .07521 -1.38 0.169 -.2518575 .0444237
    bookleverage_w1 | .207787 .1239924 1.68 0.095 -.0364401 .4520141
    roa . | .0210163 .0056622 3.71 0.000 .0098636 .0321691
    z1 . | .009197 .0148501 0.62 0.536 -.0200532 .0384471
    cratio_w1 | -.0691649 .0227068 -3.05 0.003 -.1138904 -.0244394
    rnd_rev | -.0119345 .008226 -1.45 0.148 -.0281371 .0042681
    cash_to_totalassets | .3159089 .2088175 1.51 0.132 -.0953977 .7272156
    div_yield | -.0212811 .0032873 -6.47 0.000 -.0277562 -.0148061
    roce_w1 | .0004484 .0004762 0.94 0.347 -.0004894 .0013863
    year2015 | -.0223946 .0147759 -1.52 0.131 -.0514986 .0067093
    _cons | 3.333809 .523984 6.36 0.000 2.301721 4.365897
    --------------------+----------------------------------------------------------------
    sigma_u | .68593601
    sigma_e | .12732622
    rho | .9666914 (fraction of variance due to u_i)
    -------------------------------------------------------------------------------------
    F test that all u_i=0: F(281, 245) = 7.06 Prob > F = 0.0000

    .


    .



    Im presuming this is an indication that theres next to no time-fixed effects element as its only over a 2 year period.

    Do keep or drop the time dummies is what im asking?

    any help would be appreciated.
    Thanks

  • #2
    Prash:
    welcome to the list.
    Some remarks about your post:
    - regression models specification should be driven by the literature of your research field;
    - if you're dealing with panel data, OLS is rarely the best way to go and, even when it is, you should cluster your standard errors on -panelid-, as your observations are far from being independent;
    - categorical variables and interactions benefit the most from using the -fvvarlist- notation; hence, no need to create dummies by hand;
    - you were correct in reporting what Stata gave you back, but you forgot to put all the stuff between CODE delimiters (see the FAQ on that and other useful topics), which avoid annoying formatting issues;
    - you can explicitly test whether -i.year- is worth keeping, as you can see from the following toy-example:
    Code:
    . use http://www.stata-press.com/data/r14/nlswork.dta
    (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
    
    . xtreg ln_wage tenure i.year, fe
    
    Fixed-effects (within) regression               Number of obs     =     28,101
    Group variable: idcode                          Number of groups  =      4,699
    
    R-sq:                                           Obs per group:
         within  = 0.1328                                         min =          1
         between = 0.1830                                         avg =        6.0
         overall = 0.1428                                         max =         15
    
                                                    F(15,23387)       =     238.70
    corr(u_i, Xb)  = 0.1302                         Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          tenure |   .0210664   .0008028    26.24   0.000     .0194928      .02264
                 |
            year |
             69  |   .0834009    .012716     6.56   0.000     .0584767    .1083252
             70  |   .0581181   .0118878     4.89   0.000     .0348173     .081419
             71  |   .1039541   .0117593     8.84   0.000     .0809051     .127003
             72  |    .111102   .0121416     9.15   0.000     .0873036    .1349004
             73  |   .1190714   .0117941    10.10   0.000     .0959542    .1421885
             75  |    .125436   .0117121    10.71   0.000     .1024795    .1483926
             77  |   .1726586   .0117994    14.63   0.000      .149531    .1957863
             78  |    .198183   .0120938    16.39   0.000     .1744784    .2218877
             80  |   .2041747    .012265    16.65   0.000     .1801345    .2282149
             82  |   .2078031   .0121494    17.10   0.000     .1839895    .2316166
             83  |   .2198642   .0124184    17.70   0.000     .1955233    .2442052
             85  |   .2606739   .0124265    20.98   0.000     .2363171    .2850307
             87  |    .266248   .0125421    21.23   0.000     .2416646    .2908314
             88  |   .3096376   .0127421    24.30   0.000     .2846622     .334613
                 |
           _cons |   1.438391   .0093181   154.37   0.000     1.420127    1.456655
    -------------+----------------------------------------------------------------
         sigma_u |  .39153681
         sigma_e |   .2976287
             rho |  .63377952   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(4698, 23387) = 8.08                 Prob > F = 0.0000
    
    . testparm i.year
    
     ( 1)  69.year = 0
     ( 2)  70.year = 0
     ( 3)  71.year = 0
     ( 4)  72.year = 0
     ( 5)  73.year = 0
     ( 6)  75.year = 0
     ( 7)  77.year = 0
     ( 8)  78.year = 0
     ( 9)  80.year = 0
     (10)  82.year = 0
     (11)  83.year = 0
     (12)  85.year = 0
     (13)  87.year = 0
     (14)  88.year = 0
    
           F( 14, 23387) =   68.47
                Prob > F =    0.0000
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo, thanks so much for the reply, I did infact look into the testparm i.year command yesterday but i was not sure how to implement it with my regression.

      The panel data actually stems from 2013 to 2016, (for firms without most recent data we used 2013-2014, 2014-2015, but there were very few only about 5) but as my the focus of my investigation is 2015-2016, I used the command:


      xtreg lntobinsq lnassets FXDerivatives10 IRDerivatives10 bookleverage_w1 roa_w1 zscore_w1 cratio_w1 rnd_rev cash_to_totalassets div_yield roce_w1 if inlist(year,2015,2016), fe


      Code:
        
      xtreg lntobinsq lnassets FXDerivatives10 IRDerivatives10  bookleverage_w1 roa_w1 zscore_w1 cratio_w1 rnd_rev cash_to_totalassets div_yield roce_w1 if inlist(year,2015,2016), fe
      
      Fixed-effects (within) regression               Number of obs     =        539
      Group variable: firmid                          Number of groups  =        282
      
      R-sq:                                           Obs per group:
           within  = 0.3170                                         min =          1
           between = 0.2210                                         avg =        1.9
           overall = 0.2319                                         max =          2
      
                                                      F(11,246)         =      10.38
      corr(u_i, Xb)  = -0.6013                        Prob > F          =     0.0000
      
      -------------------------------------------------------------------------------------
                lntobinsq |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      --------------------+----------------------------------------------------------------
                 lnassets |  -.3381877   .0604746    -5.59   0.000    -.4573017   -.2190736
          FXDerivatives10 |   .0952812   .0743215     1.28   0.201    -.0511064    .2416688
          IRDerivatives10 |  -.1214566   .0744892    -1.63   0.104    -.2681747    .0252614
          bookleverage_w1 |   .1692325   .1216745     1.39   0.166    -.0704241    .4088892
                   roa_w1 |    .020826   .0056757     3.67   0.000     .0096468    .0320051
                zscore_w1 |    .007085   .0148235     0.48   0.633    -.0221122    .0362821
                cratio_w1 |  -.0695064   .0227655    -3.05   0.003    -.1143466   -.0246663
                  rnd_rev |  -.0109449   .0082216    -1.33   0.184    -.0271386    .0052488
      cash_to_totalassets |    .347916   .2082939     1.67   0.096     -.062351     .758183
                div_yield |  -.0214717   .0032936    -6.52   0.000    -.0279589   -.0149845
                  roce_w1 |   .0003598   .0004738     0.76   0.448    -.0005734    .0012931
                    _cons |   2.916311   .4469079     6.53   0.000     2.036057    3.796565
      --------------------+----------------------------------------------------------------
                  sigma_u |  .61284951
                  sigma_e |  .12766146
                      rho |  .95841236   (fraction of variance due to u_i)
      -------------------------------------------------------------------------------------
      F test that all u_i=0: F(281, 246) = 7.01                    Prob > F = 0.0000
      
      .
      How exactly could use the testpharm command on this to test the 2015 and 2016 dummies? Thanks
      Last edited by Prathvajeeth Rajmohan; 27 Aug 2017, 08:13.

      Comment


      • #4
        Prash:
        assuming that your data are already in -long- format (as they should be for carrying out a panel data regression), you should simply include among your set of predictors:
        Code:
        i.year
        .
        Elaborating a bit on my previous code:
        Code:
        . use "http://www.stata-press.com/data/r14/nlswork.dta", clear
        (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
        
        . xtreg ln_wage tenure i.year if year!=88, fe
        
        Fixed-effects (within) regression               Number of obs     =     25,859
        Group variable: idcode                          Number of groups  =      4,588
        
        R-sq:                                           Obs per group:
             within  = 0.1297                                         min =          1
             between = 0.1750                                         avg =        5.6
             overall = 0.1374                                         max =         14
        
                                                        F(14,21257)       =     226.19
        corr(u_i, Xb)  = 0.1301                         Prob > F          =     0.0000
        
        ------------------------------------------------------------------------------
             ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              tenure |   .0217211   .0008557    25.38   0.000     .0200439    .0233984
                     |
                year |
                 69  |   .0834391   .0122015     6.84   0.000     .0595233     .107355
                 70  |   .0600081   .0114124     5.26   0.000     .0376389    .0823772
                 71  |    .106002   .0113001     9.38   0.000     .0838529     .128151
                 72  |   .1144726   .0116731     9.81   0.000     .0915924    .1373528
                 73  |   .1228439    .011348    10.83   0.000     .1006011    .1450868
                 75  |   .1292465   .0112872    11.45   0.000     .1071227    .1513702
                 77  |   .1777827     .01139    15.61   0.000     .1554574    .2001079
                 78  |   .2042005   .0116969    17.46   0.000     .1812737    .2271272
                 80  |   .2114531   .0118719    17.81   0.000     .1881832     .234723
                 82  |   .2155586      .0118    18.27   0.000     .1924297    .2386875
                 83  |   .2286295    .012103    18.89   0.000     .2049067    .2523523
                 85  |   .2686142   .0121517    22.11   0.000      .244796    .2924324
                 87  |   .2749306   .0123183    22.32   0.000     .2507858    .2990755
                     |
               _cons |   1.430543   .0089414   159.99   0.000     1.413017    1.448069
        -------------+----------------------------------------------------------------
             sigma_u |  .38335797
             sigma_e |  .28499418
                 rho |  .64405339   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(4587, 21257) = 7.98                 Prob > F = 0.0000
        
        . testparm i.year
        
         ( 1)  69.year = 0
         ( 2)  70.year = 0
         ( 3)  71.year = 0
         ( 4)  72.year = 0
         ( 5)  73.year = 0
         ( 6)  75.year = 0
         ( 7)  77.year = 0
         ( 8)  78.year = 0
         ( 9)  80.year = 0
         (10)  82.year = 0
         (11)  83.year = 0
         (12)  85.year = 0
         (13)  87.year = 0
        
               F( 13, 21257) =   66.17
                    Prob > F =    0.0000
        
        .
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hi Carlo, thanks so much:

          I tried but I got this:

          Code:
          . xtreg lntobinsq lnassets FXDerivatives10 IRDerivatives10  bookleverage_w1 roa_w1 zscore_w1 cratio_w1 rnd_rev cash_to_totalassets div_yield roce_w1 i.year if year!=2015 & 2016, fe
          
          note: lnassets omitted because of collinearity
          note: FXDerivatives10 omitted because of collinearity
          note: IRDerivatives10 omitted because of collinearity
          note: bookleverage_w1 omitted because of collinearity
          note: roa_w1 omitted because of collinearity
          note: zscore_w1 omitted because of collinearity
          note: cratio_w1 omitted because of collinearity
          note: rnd_rev omitted because of collinearity
          note: cash_to_totalassets omitted because of collinearity
          note: div_yield omitted because of collinearity
          note: roce_w1 omitted because of collinearity
          note: 2016.year omitted because of collinearity
          
          Fixed-effects (within) regression               Number of obs     =        268
          Group variable: firmid                          Number of groups  =        268
          
          R-sq:                                           Obs per group:
               within  =      .                                         min =          1
               between =      .                                         avg =        1.0
               overall =      .                                         max =          1
          
                                                          F(0,0)            =       0.00
          corr(u_i, Xb)  =      .                         Prob > F          =          .
          
          -------------------------------------------------------------------------------------
                    lntobinsq |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          --------------------+----------------------------------------------------------------
                     lnassets |          0  (omitted)
              FXDerivatives10 |          0  (omitted)
              IRDerivatives10 |          0  (omitted)
              bookleverage_w1 |          0  (omitted)
                       roa_w1 |          0  (omitted)
                    zscore_w1 |          0  (omitted)
                    cratio_w1 |          0  (omitted)
                      rnd_rev |          0  (omitted)
          cash_to_totalassets |          0  (omitted)
                    div_yield |          0  (omitted)
                      roce_w1 |          0  (omitted)
                              |
                         year |
                        2016  |          0  (omitted)
                              |
                        _cons |   .5625006          .        .       .            .           .
          --------------------+----------------------------------------------------------------
                      sigma_u |  .53287457
                      sigma_e |          .
                          rho |          .   (fraction of variance due to u_i)
          -------------------------------------------------------------------------------------
          F test that all u_i=0: F(267, 0) = .                         Prob > F =      .
          
          . 
          end of do-file

          im guessing my initial command is wrong?:
          Code:
           .  xtreg lntobinsq lnassets FXDerivatives10 IRDerivatives10  bookleverage_w1 roa_w1 zscore_w1 cratio_w1 rnd_rev cash_to_totalassets div_yield roce_w1 i.year if year!=2015 & 2016, fe
          what exactly should it be? thanks so much for the reply.

          Comment


          • #6
            Prash:
            I overlooked -inlist- in your previous code.
            Try:
            Code:
            xtreg lntobinsq lnassets FXDerivatives10 IRDerivatives10  bookleverage_w1 roa_w1 zscore_w1 cratio_w1 rnd_rev cash_to_totalassets div_yield roce_w1 i.year if inlist(year,2015,2016), fe
            and then test -i.year- via -parmtest-.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Code:
              Fixed-effects (within) regression               Number of obs     =        539
              Group variable: firmid                          Number of groups  =        282
              
              R-sq:                                           Obs per group:
                   within  = 0.3234                                         min =          1
                   between = 0.2051                                         avg =        1.9
                   overall = 0.2155                                         max =          2
              
                                                              F(12,245)         =       9.76
              corr(u_i, Xb)  = -0.6938                        Prob > F          =     0.0000
              
              -------------------------------------------------------------------------------------
                        lntobinsq |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
              --------------------+----------------------------------------------------------------
                         lnassets |  -.4007886   .0731027    -5.48   0.000    -.5447786   -.2567987
                  FXDerivatives10 |   .1024007    .074275     1.38   0.169    -.0438983    .2486997
                  IRDerivatives10 |  -.1037169     .07521    -1.38   0.169    -.2518575    .0444237
                  bookleverage_w1 |    .207787   .1239924     1.68   0.095    -.0364401    .4520141
                           roa_w1 |   .0210163   .0056622     3.71   0.000     .0098636    .0321691
                        zscore_w1 |    .009197   .0148501     0.62   0.536    -.0200532    .0384471
                        cratio_w1 |  -.0691649   .0227068    -3.05   0.003    -.1138904   -.0244394
                          rnd_rev |  -.0119345    .008226    -1.45   0.148    -.0281371    .0042681
              cash_to_totalassets |   .3159089   .2088175     1.51   0.132    -.0953977    .7272156
                        div_yield |  -.0212811   .0032873    -6.47   0.000    -.0277562   -.0148061
                          roce_w1 |   .0004484   .0004762     0.94   0.347    -.0004894    .0013863
                                  |
                             year |
                            2016  |   .0223946   .0147759     1.52   0.131    -.0067093    .0514986
                                  |
                            _cons |   3.311415   .5163692     6.41   0.000     2.294325    4.328504
              --------------------+----------------------------------------------------------------
                          sigma_u |  .68593601
                          sigma_e |  .12732622
                              rho |   .9666914   (fraction of variance due to u_i)
              -------------------------------------------------------------------------------------
              F test that all u_i=0: F(281, 245) = 7.06                    Prob > F = 0.0000
              
              . 
              end of do-file
              
              . testparm i.year
              
               ( 1)  2016.year = 0
              
                     F(  1,   245) =    2.30
                          Prob > F =    0.1309
              Hi think this have worked,, could I just clarify though that 2016.year is indeed the year dummy that takes 1 if 2016 and 0 if not ie 2015,

              And there is only 1 dummy as there are 2 time periods in total, and its right that its only showing the 2016 dummy? Thanks

              Comment


              • #8
                Prash:
                your interpretation of the dummy variables is correct.
                Besides, it is right that only 2016 is shown under -testparm-.
                You can use the -baselevels- option to get a clearer insight on how Stata works with categorical variables:
                Code:
                use "http://www.stata-press.com/data/r14/nlswork.dta", clear
                (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
                . xtreg ln_wage tenure i.year if inlist(year, 68,69), fe baselevels
                
                Fixed-effects (within) regression               Number of obs     =      2,494
                Group variable: idcode                          Number of groups  =      1,712
                
                R-sq:                                           Obs per group:
                     within  = 0.1221                                         min =          1
                     between = 0.0015                                         avg =        1.5
                     overall = 0.0110                                         max =          2
                
                                                                F(2,780)          =      54.25
                corr(u_i, Xb)  = -0.0327                        Prob > F          =     0.0000
                
                ------------------------------------------------------------------------------
                     ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                      tenure |  -.0027612   .0147746    -0.19   0.852    -.0317639    .0262415
                             |
                        year |
                         68  |          0  (base)
                         69  |   .1056817   .0125823     8.40   0.000     .0809826    .1303809
                             |
                       _cons |   1.437883    .009534   150.82   0.000     1.419167    1.456598
                -------------+----------------------------------------------------------------
                     sigma_u |  .38357724
                     sigma_e |  .19795551
                         rho |  .78967997   (fraction of variance due to u_i)
                ------------------------------------------------------------------------------
                F test that all u_i=0: F(1711, 780) = 4.85                   Prob > F = 0.0000
                
                . testparm i.year
                
                 ( 1)  69.year = 0
                
                       F(  1,   780) =   70.55
                            Prob > F =    0.0000
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9

                  He carlo Thanks so much for all the help, I just wanted to confirm something though: this code you put
                  Code:
                  xtreg lntobinsq lnassets FXDerivatives10 IRDerivatives10  bookleverage_w1 roa_w1 zscore_w1 cratio_w1 rnd_rev cash_to_totalassets div_yield roce_w1 i.year if inlist(year,2015,2016), fe
                  That is the fixed effects model with the dummy for 2016 included right? So if I did find that the dummy as insignificant, I couldn't use that regression I presume, I'd have to the take the dummy out i.e remove the i.year part of the code I presume. thanks so much.

                  Comment


                  • #10
                    Prash:
                    yes, you're right.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment

                    Working...
                    X