Announcement

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

  • Dropped year-dummies in panel regression

    Dear Statalisters,


    I have some issues understanding year-dummies being dropped in a fixed effects panel regression. I have about 280 entities with observations over 23 years, testing relation between firm stability and competition whereas z is the insolvency ratio, HHI the competition measure and the rest control variables. I get that the first year is omitted to avoid the dummy-trap. What I do not understand however, is why STATA instead drops the last four years. There are no missing variables, correlation between the regressors are low and a low VIF. Would greatly appreciate if you could help me on the way. Below are an example of the data set, regression commands and correlation diagnostic results.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float z double(HHI INFLATION GDPG) byte BANKOWN float(TBT CTI lnta) byte(yr3 yr4)
     40.49671 963.8486627607208 .023 .026000000000000002 0 0 .17307693  6.569481 0 1
       50.642 963.8486627607208 .023 .026000000000000002 0 0 .16666667  6.651572 0 1
    25.286806 963.8486627607208 .023 .026000000000000002 0 0 .20143884  7.620705 0 1
     58.28053 963.8486627607208 .023 .026000000000000002 0 0 .12676056  6.929517 0 1
            . 963.8486627607208 .023 .026000000000000002 0 0  .1847826  7.114769 0 1
     66.26539 963.8486627607208 .023 .026000000000000002 0 0 .12782194  8.328185 0 1
     32.80132 963.8486627607208 .023 .026000000000000002 0 0 .12658228  7.046647 0 1
      271.304 963.8486627607208 .023 .026000000000000002 0 0        .2 4.1108737 0 1
     26.37916 963.8486627607208 .023 .026000000000000002 0 0     .1875  5.342334 0 1
     72.42193 963.8486627607208 .023 .026000000000000002 0 0 .20754717  6.603944 0 1
     114.3582 963.8486627607208 .023 .026000000000000002 0 0   .171875   6.76273 0 1
    230.14607 963.8486627607208 .023 .026000000000000002 0 0 .12795275 8.8454895 0 1
     63.12717 963.8486627607208 .023 .026000000000000002 0 0 .18333334  6.647688 0 1
      45.9433 963.8486627607208 .023 .026000000000000002 0 0       .24  6.001415 0 1
     44.64632 963.8486627607208 .023 .026000000000000002 0 0 .10756395   9.80593 0 1
     .9109095 963.8486627607208 .023 .026000000000000002 0 0  .3236181 8.7088375 0 1
     32.15652 963.8486627607208 .023 .026000000000000002 0 0 .17307693  6.507277 0 1
     21.87874 963.8486627607208 .023 .026000000000000002 0 0 .11764706  7.109879 0 1
    12.687154 963.8486627607208 .023 .026000000000000002 0 1 .13198802 12.400545 0 1
     108.2294 963.8486627607208 .023 .026000000000000002 0 0 .13636364  5.888878 0 1
     49.57047 963.8486627607208 .023 .026000000000000002 0 0 .17857143  5.950643 0 1
     21.22993 963.8486627607208 .023 .026000000000000002 0 0  .2857143  5.365976 0 1
    30.459864 963.8486627607208 .023 .026000000000000002 0 0  .2016129  7.431892 0 1
     43.08752 963.8486627607208 .023 .026000000000000002 0 0 .16949153  6.694562 0 1
     41.08426 963.8486627607208 .023 .026000000000000002 0 0 .22727273  5.583496 0 1
     54.58025 963.8486627607208 .023 .026000000000000002 0 0 .11438064 10.279215 0 1
    24.860386 963.8486627607208 .023 .026000000000000002 0 0 .14285715  6.582025 0 1
     61.71256 963.8486627607208 .023 .026000000000000002 0 0 .15277778  6.884487 0 1
     46.07439 963.8486627607208 .023 .026000000000000002 0 0        .2  5.241747 0 1
     24.70525 963.8486627607208 .023 .026000000000000002 0 0 .14782609  7.357556 0 1
    end


    Code:
    xtreg z HHI INFLATION GDPG BANKOWN TBT CTI lnta yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10 yr11 yr12 yr13 yr14 yr15 yr16 yr17 yr18 yr19 yr20 yr21 yr22 yr23, fe vce(robust)
    (Get the same results by using i.YEAR, but using dummies instead to run diagnostics).

    Code:
    note: yr20 omitted because of collinearity
    note: yr21 omitted because of collinearity
    note: yr22 omitted because of collinearity
    note: yr23 omitted because of collinearity
    
    Fixed-effects (within) regression               Number of obs     =      2,479
    Group variable: banknumber                      Number of groups  =        183
    
    R-sq:                                           Obs per group:
         within  = 0.2137                                         min =          1
         between = 0.0473                                         avg =       13.5
         overall = 0.1404                                         max =         21
    
                                                    F(22,182)         =          .
    corr(u_i, Xb)  = -0.2449                        Prob > F          =          .
    
                               (Std. Err. adjusted for 183 clusters in banknumber)
    ------------------------------------------------------------------------------
                 |               Robust
               z |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             HHI |  -.0303108   .0210892    -1.44   0.152    -.0719216       .0113
       INFLATION |  -76.55149   2956.977    -0.03   0.979    -5910.916    5757.813
            GDPG |   618.2998   6259.327     0.10   0.921    -11731.88    12968.48
         BANKOWN |   -51.5391   1.834326   -28.10   0.000    -55.15838   -47.91982
             TBT |   6.363655   7.903644     0.81   0.422    -9.230899    21.95821
             CTI |    .088925   .0078083    11.39   0.000     .0735187    .1043314
            lnta |  -2.797636   3.258536    -0.86   0.392    -9.227001    3.631729
             yr3 |  -3.499378   240.9092    -0.01   0.988    -478.8335    471.8348
             yr4 |  -12.13843   67.57561    -0.18   0.858    -145.4708    121.1939
             yr5 |  -9.316379   29.27241    -0.32   0.751     -67.0733    48.44054
             yr6 |   -25.4756   124.5805    -0.20   0.838    -271.2834    220.3322
             yr7 |  -26.15843   51.65594    -0.51   0.613      -128.08    75.76308
             yr8 |  -31.83699    42.2322    -0.75   0.452    -115.1647    51.49069
             yr9 |  -36.40373   38.43623    -0.95   0.345    -112.2416    39.43419
            yr10 |  -36.69725   83.37978    -0.44   0.660    -201.2126    127.8181
            yr11 |  -30.16158   35.28397    -0.85   0.394    -99.77982    39.45666
            yr12 |  -17.19835   39.88307    -0.43   0.667    -95.89101    61.49431
            yr13 |  -23.97309   31.51084    -0.76   0.448    -86.14663    38.20045
            yr14 |  -7.781279   36.09541    -0.22   0.830    -79.00055    63.43799
            yr15 |   18.64135   222.2024     0.08   0.933    -419.7826    457.0653
            yr16 |   5.363992   64.73919     0.08   0.934    -122.3719    133.0999
            yr17 |   6.543575   81.76287     0.08   0.936    -154.7814    167.8686
            yr18 |  -8.039695   3.074036    -2.62   0.010    -14.10503   -1.974364
            yr19 |   1.061594   62.29068     0.02   0.986    -121.8431    123.9663
            yr20 |          0  (omitted)
            yr21 |          0  (omitted)
            yr22 |          0  (omitted)
            yr23 |          0  (omitted)
           _cons |   108.1678   152.8147     0.71   0.480    -193.3485     409.684
    -------------+----------------------------------------------------------------
         sigma_u |  32.204441
         sigma_e |  29.860322
             rho |  .53771512   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------



    Code:
                 |        z      HHI INFLAT~N     GDPG  BANKOWN      TBT      CTI     lnta      yr3
    -------------+---------------------------------------------------------------------------------
               z |   1.0000
             HHI |  -0.1890   1.0000
       INFLATION |   0.0934  -0.2442   1.0000
            GDPG |   0.1708  -0.3147  -0.2625   1.0000
         BANKOWN |  -0.1123   0.0414   0.0073  -0.0692   1.0000
             TBT |  -0.0454  -0.0204   0.0008   0.0119   0.1811   1.0000
             CTI |   0.0049   0.0210  -0.0013  -0.0067  -0.0022   0.1702   1.0000
            lnta |  -0.1420   0.3226  -0.0323  -0.1947   0.3210   0.4046   0.0824   1.0000
             yr3 |   0.2928  -0.3255   0.1032   0.5400  -0.0346   0.0207  -0.0006  -0.1550   1.0000
             yr4 |   0.1414  -0.3457   0.0521   0.1040  -0.0360   0.0189  -0.0021  -0.1240  -0.0540
             yr5 |   0.0911  -0.2151   0.0802   0.0041  -0.0178   0.0178  -0.0036  -0.1103  -0.0549
             yr6 |   0.0422  -0.2509   0.2711   0.2072  -0.0178   0.0025  -0.0036  -0.1015  -0.0549
             yr7 |   0.0104  -0.2862   0.2182   0.0212  -0.0183   0.0021  -0.0044  -0.0815  -0.0553
             yr8 |  -0.0448  -0.2938  -0.2223  -0.0986  -0.0092  -0.0133  -0.0041  -0.0518  -0.0555
             yr9 |  -0.0985  -0.2713   0.1075  -0.1820   0.0108  -0.0129  -0.0021  -0.0436  -0.0549
            yr10 |  -0.0831   0.0972  -0.4541   0.3344  -0.0161  -0.0118  -0.0001  -0.0378  -0.0535
            yr11 |  -0.0782  -0.0104  -0.1335   0.1023   0.0140   0.0043   0.0000  -0.0071  -0.0531
            yr12 |  -0.0475   0.0844   0.0512   0.0695   0.0042   0.0043  -0.0015   0.0163  -0.0531
            yr13 |  -0.0495   0.0542  -0.3601   0.1628   0.0169   0.0060  -0.0075   0.0263  -0.0515
            yr14 |  -0.0848   0.1080   0.4397  -0.2377   0.0655   0.0052  -0.0083   0.0626  -0.0522
            yr15 |  -0.0032   0.1443   0.0244  -0.5920   0.0356   0.0052  -0.0074   0.0621  -0.0522
            yr16 |   0.0144   0.0929   0.0709  -0.1909   0.0123   0.0094  -0.0067   0.0618  -0.0485
            yr17 |   0.0015   0.1906  -0.2009  -0.1509   0.0506   0.0075  -0.0070   0.0840  -0.0501
            yr18 |  -0.0555   0.3105  -0.3540   0.1057  -0.0073   0.0108  -0.0067   0.0488  -0.0473
            yr19 |  -0.0565   0.2909  -0.0014  -0.1401  -0.0172  -0.0061   0.0966   0.0632  -0.0466
            yr20 |  -0.0344   0.2984  -0.0014   0.0035  -0.0169  -0.0059  -0.0064   0.0729  -0.0463
            yr21 |   0.0103   0.2243  -0.0014   0.0035  -0.0073  -0.0243  -0.0060   0.0874  -0.0473
            yr22 |  -0.0117   0.1872   0.3512  -0.1132  -0.0073  -0.0243  -0.0059   0.0983  -0.0473
            yr23 |   0.0318   0.1459  -0.0677   0.0033  -0.0031  -0.0229  -0.0057   0.1096  -0.0445
    
                 |      yr4      yr5      yr6      yr7      yr8      yr9     yr10     yr11     yr12
    -------------+---------------------------------------------------------------------------------
             yr4 |   1.0000
             yr5 |  -0.0562   1.0000
             yr6 |  -0.0562  -0.0571   1.0000
             yr7 |  -0.0567  -0.0576  -0.0576   1.0000
             yr8 |  -0.0569  -0.0578  -0.0578  -0.0583   1.0000
             yr9 |  -0.0562  -0.0571  -0.0571  -0.0576  -0.0578   1.0000
            yr10 |  -0.0549  -0.0558  -0.0558  -0.0562  -0.0564  -0.0558   1.0000
            yr11 |  -0.0544  -0.0553  -0.0553  -0.0558  -0.0560  -0.0553  -0.0540   1.0000
            yr12 |  -0.0544  -0.0553  -0.0553  -0.0558  -0.0560  -0.0553  -0.0540  -0.0535   1.0000
            yr13 |  -0.0528  -0.0537  -0.0537  -0.0541  -0.0543  -0.0537  -0.0524  -0.0520  -0.0520
            yr14 |  -0.0535  -0.0544  -0.0544  -0.0548  -0.0550  -0.0544  -0.0531  -0.0526  -0.0526
            yr15 |  -0.0535  -0.0544  -0.0544  -0.0548  -0.0550  -0.0544  -0.0531  -0.0526  -0.0526
            yr16 |  -0.0497  -0.0505  -0.0505  -0.0509  -0.0511  -0.0505  -0.0493  -0.0489  -0.0489
            yr17 |  -0.0514  -0.0522  -0.0522  -0.0527  -0.0529  -0.0522  -0.0510  -0.0506  -0.0506
            yr18 |  -0.0485  -0.0493  -0.0493  -0.0497  -0.0498  -0.0493  -0.0481  -0.0477  -0.0477
            yr19 |  -0.0477  -0.0485  -0.0485  -0.0489  -0.0491  -0.0485  -0.0473  -0.0469  -0.0469
            yr20 |  -0.0475  -0.0482  -0.0482  -0.0486  -0.0488  -0.0482  -0.0471  -0.0467  -0.0467
            yr21 |  -0.0485  -0.0493  -0.0493  -0.0497  -0.0498  -0.0493  -0.0481  -0.0477  -0.0477
            yr22 |  -0.0485  -0.0493  -0.0493  -0.0497  -0.0498  -0.0493  -0.0481  -0.0477  -0.0477
            yr23 |  -0.0457  -0.0464  -0.0464  -0.0468  -0.0469  -0.0464  -0.0453  -0.0449  -0.0449
    
                 |     yr13     yr14     yr15     yr16     yr17     yr18     yr19     yr20     yr21
    -------------+---------------------------------------------------------------------------------
            yr13 |   1.0000
            yr14 |  -0.0511   1.0000
            yr15 |  -0.0511  -0.0518   1.0000
            yr16 |  -0.0475  -0.0481  -0.0481   1.0000
            yr17 |  -0.0491  -0.0497  -0.0497  -0.0462   1.0000
            yr18 |  -0.0463  -0.0469  -0.0469  -0.0436  -0.0450   1.0000
            yr19 |  -0.0456  -0.0462  -0.0462  -0.0429  -0.0443  -0.0418   1.0000
            yr20 |  -0.0453  -0.0459  -0.0459  -0.0427  -0.0441  -0.0416  -0.0409   1.0000
            yr21 |  -0.0463  -0.0469  -0.0469  -0.0436  -0.0450  -0.0425  -0.0418  -0.0416   1.0000
            yr22 |  -0.0463  -0.0469  -0.0469  -0.0436  -0.0450  -0.0425  -0.0418  -0.0416  -0.0425
            yr23 |  -0.0436  -0.0442  -0.0442  -0.0410  -0.0424  -0.0400  -0.0394  -0.0392  -0.0400
    
                 |     yr22     yr23
    -------------+------------------
            yr22 |   1.0000
            yr23 |  -0.0400   1.0000

    Code:
    collin z HHI INFLATION GDPG BANKOWN TBT CTI lnta yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10 yr11 yr12 yr13 yr14 yr15 yr16 yr17 yr18 yr19 yr20 yr21 yr22 yr23
    Code:
    Collinearity Diagnostics
    
                            SQRT                   R-
      Variable      VIF     VIF    Tolerance    Squared
    ----------------------------------------------------
             z      1.20    1.09    0.8355      0.1645
           HHI  2.77e+14 1.7e+07    0.0000      1.0000
     INFLATION  2.43e+13 4.9e+06    0.0000      1.0000
          GDPG  3.75e+13 6.1e+06    0.0000      1.0000
       BANKOWN      1.14    1.07    0.8763      0.1237
           TBT      1.29    1.13    0.7776      0.2224
           CTI      1.04    1.02    0.9596      0.0404
          lnta      1.55    1.25    0.6445      0.3555
           yr3 -5.37e+12       .   -0.0000      1.0000
           yr4  8.89e+12 3.0e+06    0.0000      1.0000
           yr5  2.19e+12 1.5e+06    0.0000      1.0000
           yr6  3.13e+12 1.8e+06    0.0000      1.0000
           yr7  5.94e+12 2.4e+06    0.0000      1.0000
           yr8  1.93e+13 4.4e+06    0.0000      1.0000
           yr9  1.34e+13 3.7e+06    0.0000      1.0000
          yr10 -2.64e+13       .   -0.0000      1.0000
          yr11 -9.59e+12       .   -0.0000      1.0000
          yr12  9.20e+12 3.0e+06    0.0000      1.0000
          yr13 -2.29e+13       .   -0.0000      1.0000
          yr14  3.14e+13 5.6e+06    0.0000      1.0000
          yr15 -1.15e+13       .   -0.0000      1.0000
          yr16  1.04e+12 1.0e+06    0.0000      1.0000
          yr17 -1.59e+13       .   -0.0000      1.0000
          yr18 -9.10e+12       .   -0.0000      1.0000
          yr19  1.58e+13 4.0e+06    0.0000      1.0000
          yr20  2.90e+13 5.4e+06    0.0000      1.0000
          yr21  1.70e+13 4.1e+06    0.0000      1.0000
          yr22  4.32e+13 6.6e+06    0.0000      1.0000
          yr23  1.21e+12 1.1e+06    0.0000      1.0000
    ----------------------------------------------------
      Mean VIF  1.51e+13
    
                               Cond
            Eigenval          Index
    ---------------------------------
        1     6.0418          1.0000
        2     1.4045          2.0741
        3     1.2390          2.2082
        4     1.1645          2.2778
        5     1.0941          2.3500
        6     1.0655          2.3813
        7     1.0148          2.4400
        8     1.0069          2.4496
        9     1.0001          2.4578
        10     1.0000          2.4580
        11     1.0000          2.4580
        12     1.0000          2.4580
        13     1.0000          2.4580
        14     1.0000          2.4580
        15     1.0000          2.4580
        16     1.0000          2.4580
        17     1.0000          2.4580
        18     1.0000          2.4580
        19     1.0000          2.4580
        20     1.0000          2.4580
        21     1.0000          2.4580
        22     0.9795          2.4835
        23     0.8795          2.6210
        24     0.7192          2.8985
        25     0.3726          4.0269
        26     0.0181         18.2487
        27     0.0000   29990992.1720
        28    -0.0000               .
        29    -0.0000               .
        30    -0.0000               .
    ---------------------------------
     Condition Number              . 
     Eigenvalues & Cond Index computed from scaled raw sscp (w/ intercept)
     Det(correlation matrix)    0.0000

    Thanks for any advice

    Best,
    Aaron

  • #2
    Aaron:
    welcome to this forum.
    As reported by Stata outcome, omission is due to correlation with the fixed effect.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Aaron:
      welcome to this forum.
      As reported by Stata outcome, omission is due to correlation with the fixed effect.
      Thank you for your reply, Carlo. Do you mean the year fixed effects correlate with the entity-fixed effects? If that is so, where in the output do STATA report this?

      Comment


      • #4
        Aaron:
        yes, I meant so.
        Actually, Stata does not report any detail concerning (extreme) multicollinearity and subsequent variable(s) omission.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Aaron:
          yes, I meant so.
          Actually, Stata does not report any detail concerning (extreme) multicollinearity and subsequent variable(s) omission.
          Ok, thanks. So it essentially means the omitted variables have no explanatory power and the only chance to disprove that would be increasing the sample?

          Comment


          • #6
            Aaron:
            more trivially, it might be a model specification issue (by the way: does the omission remain under -re- specification?), as you can see from the following toy-example, in which the omission of - birth_yr- under -fe- is due to its time-invariant nature:
            Code:
            . use "http://www.stata-press.com/data/r15/nlswork.dta"
            (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
            
            . xtreg ln_wage age i.birth_yr i.year, fe
            note: 42.birth_yr omitted because of collinearity
            note: 43.birth_yr omitted because of collinearity
            note: 44.birth_yr omitted because of collinearity
            note: 45.birth_yr omitted because of collinearity
            note: 46.birth_yr omitted because of collinearity
            note: 47.birth_yr omitted because of collinearity
            note: 48.birth_yr omitted because of collinearity
            note: 49.birth_yr omitted because of collinearity
            note: 50.birth_yr omitted because of collinearity
            note: 51.birth_yr omitted because of collinearity
            note: 52.birth_yr omitted because of collinearity
            note: 53.birth_yr omitted because of collinearity
            note: 54.birth_yr omitted because of collinearity
            
            Fixed-effects (within) regression               Number of obs     =     28,510
            Group variable: idcode                          Number of groups  =      4,710
            
            R-sq:                                           Obs per group:
                 within  = 0.1060                                         min =          1
                 between = 0.0914                                         avg =        6.1
                 overall = 0.0805                                         max =         15
            
                                                            F(15,23785)       =     188.00
            corr(u_i, Xb)  = 0.0467                         Prob > F          =     0.0000
            
            ------------------------------------------------------------------------------
                 ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                     age |   .0125992   .0102163     1.23   0.217    -.0074253    .0326238
                         |
                birth_yr |
                     42  |          0  (omitted)
                     43  |          0  (omitted)
                     44  |          0  (omitted)
                     45  |          0  (omitted)
                     46  |          0  (omitted)
                     47  |          0  (omitted)
                     48  |          0  (omitted)
                     49  |          0  (omitted)
                     50  |          0  (omitted)
                     51  |          0  (omitted)
                     52  |          0  (omitted)
                     53  |          0  (omitted)
                     54  |          0  (omitted)
                         |
                    year |
                     69  |   .0748621   .0159011     4.71   0.000      .043695    .1060292
                     70  |   .0478697   .0235673     2.03   0.042     .0016763     .094063
                     71  |   .0865577   .0327939     2.64   0.008     .0222795     .150836
                     72  |   .0856757   .0424903     2.02   0.044     .0023919    .1689594
                     73  |   .0880069    .052344     1.68   0.093    -.0145906    .1906044
                     75  |   .0778607   .0720304     1.08   0.280    -.0633235    .2190449
                     77  |    .108365   .0922272     1.17   0.240    -.0724063    .2891363
                     78  |   .1309518   .1028143     1.27   0.203    -.0705707    .3324743
                     80  |   .1142649    .122792     0.93   0.352    -.1264152     .354945
                     82  |   .1090451   .1431112     0.76   0.446    -.1714619    .3895522
                     83  |   .1211272   .1532018     0.79   0.429    -.1791581    .4214125
                     85  |   .1465637   .1736146     0.84   0.399    -.1937321    .4868594
                     87  |   .1382642   .1941163     0.71   0.476     -.242216    .5187445
                     88  |   .1799741   .2079871     0.87   0.387    -.2276938     .587642
                         |
                   _cons |   1.203731   .1952306     6.17   0.000     .8210667    1.586396
            -------------+----------------------------------------------------------------
                 sigma_u |   .4058746
                 sigma_e |  .30300411
                     rho |  .64212421   (fraction of variance due to u_i)
            ------------------------------------------------------------------------------
            F test that all u_i=0: F(4709, 23785) = 8.80                 Prob > F = 0.0000
            
            . xtreg ln_wage age i.birth_yr i.year, re
            
            Random-effects GLS regression                   Number of obs     =     28,510
            Group variable: idcode                          Number of groups  =      4,710
            
            R-sq:                                           Obs per group:
                 within  = 0.1059                                         min =          1
                 between = 0.0958                                         avg =        6.1
                 overall = 0.0836                                         max =         15
            
                                                            Wald chi2(28)     =    3271.07
            corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
            
            ------------------------------------------------------------------------------
                 ln_wage |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                     age |     .00638   .0088314     0.72   0.470    -.0109293    .0236893
                         |
                birth_yr |
                     42  |  -.3600023   .2295299    -1.57   0.117    -.8098726    .0898681
                     43  |   -.411902   .2276901    -1.81   0.070    -.8581665    .0343624
                     44  |  -.3669633   .2280949    -1.61   0.108    -.8140211    .0800945
                     45  |  -.3465367    .229104    -1.51   0.130    -.7955722    .1024988
                     46  |  -.3556043   .2304813    -1.54   0.123    -.8073393    .0961308
                     47  |  -.3656108   .2321514    -1.57   0.115    -.8206191    .0893975
                     48  |   -.363669   .2343196    -1.55   0.121     -.822927    .0955889
                     49  |  -.3750348   .2366903    -1.58   0.113    -.8389392    .0888696
                     50  |  -.3969479   .2394534    -1.66   0.097     -.866268    .0723721
                     51  |  -.4187791   .2424796    -1.73   0.084    -.8940305    .0564722
                     52  |  -.4461327   .2456146    -1.82   0.069    -.9275285    .0352631
                     53  |  -.4237412   .2492429    -1.70   0.089    -.9122483    .0647658
                     54  |  -.5753698   .4592161    -1.25   0.210    -1.475417    .3246773
                         |
                    year |
                     69  |   .0814148    .014949     5.45   0.000     .0521152    .1107144
                     70  |   .0604407   .0210803     2.87   0.004     .0191241    .1017573
                     71  |   .1047769   .0288348     3.63   0.000     .0482617    .1612921
                     72  |   .1129049   .0371072     3.04   0.002     .0401762    .1856336
                     73  |   .1216363   .0455256     2.67   0.008     .0324077    .2108649
                     75  |   .1229176    .062455     1.97   0.049      .000508    .2453273
                     77  |   .1702024    .079867     2.13   0.033      .013666    .3267388
                     78  |   .2025503   .0890169     2.28   0.023     .0280804    .3770201
                     80  |   .1978706    .106257     1.86   0.063    -.0103892    .4061304
                     82  |   .2025831    .123801     1.64   0.102    -.0400625    .4452286
                     83  |   .2238365   .1325239     1.69   0.091    -.0359056    .4835786
                     85  |   .2637994    .150153     1.76   0.079    -.0304951    .5580939
                     87  |   .2669837   .1678642     1.59   0.112    -.0620241    .5959915
                     88  |   .3145208   .1798453     1.75   0.080    -.0379696    .6670112
                         |
                   _cons |   1.688194   .3221243     5.24   0.000     1.056842    2.319546
            -------------+----------------------------------------------------------------
                 sigma_u |  .36615656
                 sigma_e |  .30300411
                     rho |  .59354246   (fraction of variance due to u_i)
            ------------------------------------------------------------------------------
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Aaron:
              more trivially, it might be a model specification issue (by the way: does the omission remain under -re- specification?), as you can see from the following toy-example, in which the omission of - birth_yr- under -fe- is due to its time-invariant nature:
              Thank you for all the help. However, the omission remain under random effects and the Hausman-test strongly rejects the use of it. Furthermore, previous studies suggest the use of -fe-. May there be any other reason for the omission?

              Comment


              • #8
                It appears that you have variables that are invariant across firms (GDP, inflation, etc.). These will be collinear with the year dummies.

                Comment


                • #9
                  Originally posted by Andrew Musau View Post
                  It appears that you have variables that are invariant across firms (GDP, inflation, etc.). These will be collinear with the year dummies.
                  Ok, but then shouldn't all the year dummies be omitted? Why only some of them? Are you saying the year dummies introduce heterogeneity covering the macro variables? Thanks
                  Last edited by Aaron Huckins; 03 May 2019, 11:01. Reason: typos

                  Comment


                  • #10
                    What I mean is that the coefficients of the variables that are invariant across firms in a given year are not identified in the regression with time effects as the variables are collinear with the time dummies. The problem with Stata's xtreg command is that is does not make this apparent, and I am not sure how many generations of Stata users have been reporting nonsensical coefficients in their papers. Try a different command like reghdfe from SSC and you will see that you cannot obtain an estimate for these variables. Here is a reproducible example that illustrates the point.

                    Code:
                    webuse grunfeld, clear
                    bys year: replace mvalue= mvalue[1]
                    bys year: replace kstock= kstock[1]
                    *WITH 2 VARIABLES, STATA BY DEFAULT DROPS THE LAST 2 TIME DUMMIES TO BREAK THE COLLINEARITY
                    xtreg invest mvalue kstock i.time, fe
                    *NOTICE THE COEFFICIENTS ON MVALUE AND KSTOCK CHANGE IF WE DROP DIFFERENT TIME DUMMIES
                    xtreg invest mvalue kstock o15.time o17.time i.time, fe
                    *ssc install reghdfe
                    *REGHDFE IS "SMART" AND CATCHES THE COLLINEARITY STRAIGHT AWAY
                    reghdfe invest mvalue kstock, a(company time)

                    Results:

                    Code:
                    . xtreg invest mvalue kstock i.time, fe
                    note: 19.time omitted because of collinearity
                    note: 20.time omitted because of collinearity
                    
                    Fixed-effects (within) regression               Number of obs     =        200
                    Group variable: company                         Number of groups  =         10
                    
                    R-sq:                                           Obs per group:
                         within  = 0.2801                                         min =         20
                         between =      .                                         avg =       20.0
                         overall = 0.0672                                         max =         20
                    
                                                                    F(19,171)         =       3.50
                    corr(u_i, Xb)  = -0.0000                        Prob > F          =     0.0000
                    
                    ------------------------------------------------------------------------------
                          invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                          mvalue |    .347759   .0766134     4.54   0.000     .1965291    .4989888
                          kstock |  -1.200005   .2805274    -4.28   0.000    -1.753748   -.6462627
                                 |
                            time |
                              2  |   -190.312   49.25044    -3.86   0.000    -287.5291    -93.0949
                              3  |  -1800.396   388.5255    -4.63   0.000    -2567.319   -1033.472
                              4  |  -880.1618   177.2772    -4.96   0.000    -1230.095   -530.2283
                              5  |   20.30903   44.90298     0.45   0.652    -68.32648    108.9445
                              6  |   92.54097   50.25549     1.84   0.067    -6.660051     191.742
                              7  |   166.0328   57.85686     2.87   0.005     51.82721    280.2384
                              8  |   108.3439   51.32253     2.11   0.036     7.036656    209.6512
                              9  |  -344.4432   72.46965    -4.75   0.000    -487.4935   -201.3929
                             10  |  -120.5647   42.33838    -2.85   0.005    -204.1378   -36.99151
                             11  |  -500.4488   106.6329    -4.69   0.000    -710.9351   -289.9626
                             12  |   290.5617   77.57999     3.75   0.000     137.4239    443.6994
                             13  |  -175.8023   52.19593    -3.37   0.001    -278.8336   -72.77099
                             14  |   -100.989   45.02324    -2.24   0.026    -189.8619   -12.11606
                             15  |   342.6629    92.9628     3.69   0.000     159.1605    526.1653
                             16  |  -143.5402   47.56564    -3.02   0.003    -237.4316   -49.64873
                             17  |   -75.2983   44.10573    -1.71   0.090    -162.3601     11.7635
                             18  |  -17.83811   40.85529    -0.44   0.663    -98.48375    62.80754
                             19  |          0  (omitted)
                             20  |          0  (omitted)
                                 |
                           _cons |   237.7454    30.6801     7.75   0.000     177.1849    298.3059
                    -------------+----------------------------------------------------------------
                         sigma_u |  198.82421
                         sigma_e |  97.202051
                             rho |  .80709732   (fraction of variance due to u_i)
                    ------------------------------------------------------------------------------
                    F test that all u_i=0: F(9, 171) = 83.68                     Prob > F = 0.0000
                    
                    .
                    . *NOTICE THE COEFFICIENTS ON MVALUE AND KSTOCK CHANGE IF WE DROP DIFFERENT TIME
                    > DUMMIES
                    
                    .
                    . xtreg invest mvalue kstock o15.time o17.time i.time, fe
                    
                    Fixed-effects (within) regression               Number of obs     =        200
                    Group variable: company                         Number of groups  =         10
                    
                    R-sq:                                           Obs per group:
                         within  = 0.2801                                         min =         20
                         between =      .                                         avg =       20.0
                         overall = 0.0672                                         max =         20
                    
                                                                    F(19,171)         =       3.50
                    corr(u_i, Xb)  = 0.0000                         Prob > F          =     0.0000
                    
                    ------------------------------------------------------------------------------
                          invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                          mvalue |   .1848804   .0637249     2.90   0.004     .0590916    .3106691
                          kstock |   .3164732   .1973745     1.60   0.111    -.0731312    .7060775
                                 |
                            time |
                              2  |    72.1139    64.9162     1.11   0.268    -56.02639    200.2542
                              3  |  -908.7553    312.851    -2.90   0.004    -1526.303    -291.208
                              4  |  -490.4867   154.0424    -3.18   0.002    -794.5562   -186.4172
                              5  |   3.369386   42.23465     0.08   0.937    -79.99903    86.73781
                              6  |   30.28451    40.4074     0.75   0.455    -49.47703     110.046
                              7  |   53.87586   39.61407     1.36   0.176     -24.3197    132.0714
                              8  |   19.13219   37.35516     0.51   0.609    -54.60442     92.8688
                              9  |   -292.492   100.0659    -2.92   0.004    -490.0154   -94.96859
                             10  |   44.94112   49.88349     0.90   0.369     -53.5256    143.4078
                             11  |  -271.1811   97.12343    -2.79   0.006    -462.8964    -79.4659
                             12  |   35.63038   39.04112     0.91   0.363    -41.43421     112.695
                             13  |   23.84217   46.16795     0.52   0.606     -67.2903    114.9747
                             14  |    154.061    71.5787     2.15   0.033     12.76941    295.3527
                             15  |          0  (omitted)
                             16  |   4.750616   42.38285     0.11   0.911    -78.91032    88.41155
                             17  |          0  (omitted)
                             18  |   45.33986   40.37824     1.12   0.263    -34.36412    125.0438
                             19  |  -1426.465   576.2514    -2.48   0.014    -2563.947    -288.983
                             20  |   41.18679   48.93748     0.84   0.401    -55.41256    137.7861
                                 |
                           _cons |  -14.38752   68.52885    -0.21   0.834    -149.6589    120.8839
                    -------------+----------------------------------------------------------------
                         sigma_u |  198.82421
                         sigma_e |  97.202051
                             rho |  .80709732   (fraction of variance due to u_i)
                    ------------------------------------------------------------------------------
                    F test that all u_i=0: F(9, 171) = 83.68                     Prob > F = 0.0000
                    
                    .
                    . *ssc install reghdfe
                    
                    .
                    . *REGHDFE IS "SMART" AND CATCHES THE COLLINEARITY STRAIGHT AWAY
                    
                    .
                    . reghdfe invest mvalue kstock, a(company time)
                    note: mvalue is probably collinear with the fixed effects (all partialled-out val
                    > ues are close to zero; tol = 1.0e-09)
                    note: kstock is probably collinear with the fixed effects (all partialled-out val
                    > ues are close to zero; tol = 1.0e-09)
                    (MWFE estimator converged in 2 iterations)
                    note: mvalue omitted because of collinearity
                    note: kstock omitted because of collinearity
                    
                    HDFE Linear regression                            Number of obs   =        200
                    Absorbing 2 HDFE groups                           F(   0,    171) =          .
                                                                      Prob > F        =          .
                                                                      R-squared       =     0.8274
                                                                      Adj R-squared   =     0.7991
                                                                      Within R-sq.    =     0.0000
                                                                      Root MSE        =    97.2021
                    
                    ------------------------------------------------------------------------------
                          invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                          mvalue |          0  (omitted)
                          kstock |          0  (omitted)
                           _cons |   145.9583   6.873223    21.24   0.000      132.391    159.5255
                    ------------------------------------------------------------------------------
                    
                    Absorbed degrees of freedom:
                    -----------------------------------------------------+
                     Absorbed FE | Categories  - Redundant  = Num. Coefs |
                    -------------+---------------------------------------|
                         company |        10           0          10     |
                            time |        20           1          19     |
                    -----------------------------------------------------+
                    Last edited by Andrew Musau; 03 May 2019, 13:47.

                    Comment


                    • #11
                      Originally posted by Carlo Lazzaro View Post
                      Aaron:
                      more trivially, it might be a model specification issue (by the way: does the omission remain under -re- specification?), as you can see from the following toy-example, in which the omission of - birth_yr- under -fe- is due to its time-invariant nature:
                      Code:
                      . use "http://www.stata-press.com/data/r15/nlswork.dta"
                      (National Longitudinal Survey. Young Women 14-26 years of age in 1968)
                      
                      . xtreg ln_wage age i.birth_yr i.year, fe
                      note: 42.birth_yr omitted because of collinearity
                      note: 43.birth_yr omitted because of collinearity
                      note: 44.birth_yr omitted because of collinearity
                      note: 45.birth_yr omitted because of collinearity
                      note: 46.birth_yr omitted because of collinearity
                      note: 47.birth_yr omitted because of collinearity
                      note: 48.birth_yr omitted because of collinearity
                      note: 49.birth_yr omitted because of collinearity
                      note: 50.birth_yr omitted because of collinearity
                      note: 51.birth_yr omitted because of collinearity
                      note: 52.birth_yr omitted because of collinearity
                      note: 53.birth_yr omitted because of collinearity
                      note: 54.birth_yr omitted because of collinearity
                      
                      Fixed-effects (within) regression Number of obs = 28,510
                      Group variable: idcode Number of groups = 4,710
                      
                      R-sq: Obs per group:
                      within = 0.1060 min = 1
                      between = 0.0914 avg = 6.1
                      overall = 0.0805 max = 15
                      
                      F(15,23785) = 188.00
                      corr(u_i, Xb) = 0.0467 Prob > F = 0.0000
                      
                      ------------------------------------------------------------------------------
                      ln_wage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                      age | .0125992 .0102163 1.23 0.217 -.0074253 .0326238
                      |
                      birth_yr |
                      42 | 0 (omitted)
                      43 | 0 (omitted)
                      44 | 0 (omitted)
                      45 | 0 (omitted)
                      46 | 0 (omitted)
                      47 | 0 (omitted)
                      48 | 0 (omitted)
                      49 | 0 (omitted)
                      50 | 0 (omitted)
                      51 | 0 (omitted)
                      52 | 0 (omitted)
                      53 | 0 (omitted)
                      54 | 0 (omitted)
                      |
                      year |
                      69 | .0748621 .0159011 4.71 0.000 .043695 .1060292
                      70 | .0478697 .0235673 2.03 0.042 .0016763 .094063
                      71 | .0865577 .0327939 2.64 0.008 .0222795 .150836
                      72 | .0856757 .0424903 2.02 0.044 .0023919 .1689594
                      73 | .0880069 .052344 1.68 0.093 -.0145906 .1906044
                      75 | .0778607 .0720304 1.08 0.280 -.0633235 .2190449
                      77 | .108365 .0922272 1.17 0.240 -.0724063 .2891363
                      78 | .1309518 .1028143 1.27 0.203 -.0705707 .3324743
                      80 | .1142649 .122792 0.93 0.352 -.1264152 .354945
                      82 | .1090451 .1431112 0.76 0.446 -.1714619 .3895522
                      83 | .1211272 .1532018 0.79 0.429 -.1791581 .4214125
                      85 | .1465637 .1736146 0.84 0.399 -.1937321 .4868594
                      87 | .1382642 .1941163 0.71 0.476 -.242216 .5187445
                      88 | .1799741 .2079871 0.87 0.387 -.2276938 .587642
                      |
                      _cons | 1.203731 .1952306 6.17 0.000 .8210667 1.586396
                      -------------+----------------------------------------------------------------
                      sigma_u | .4058746
                      sigma_e | .30300411
                      rho | .64212421 (fraction of variance due to u_i)
                      ------------------------------------------------------------------------------
                      F test that all u_i=0: F(4709, 23785) = 8.80 Prob > F = 0.0000
                      
                      . xtreg ln_wage age i.birth_yr i.year, re
                      
                      Random-effects GLS regression Number of obs = 28,510
                      Group variable: idcode Number of groups = 4,710
                      
                      R-sq: Obs per group:
                      within = 0.1059 min = 1
                      between = 0.0958 avg = 6.1
                      overall = 0.0836 max = 15
                      
                      Wald chi2(28) = 3271.07
                      corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
                      
                      ------------------------------------------------------------------------------
                      ln_wage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                      age | .00638 .0088314 0.72 0.470 -.0109293 .0236893
                      |
                      birth_yr |
                      42 | -.3600023 .2295299 -1.57 0.117 -.8098726 .0898681
                      43 | -.411902 .2276901 -1.81 0.070 -.8581665 .0343624
                      44 | -.3669633 .2280949 -1.61 0.108 -.8140211 .0800945
                      45 | -.3465367 .229104 -1.51 0.130 -.7955722 .1024988
                      46 | -.3556043 .2304813 -1.54 0.123 -.8073393 .0961308
                      47 | -.3656108 .2321514 -1.57 0.115 -.8206191 .0893975
                      48 | -.363669 .2343196 -1.55 0.121 -.822927 .0955889
                      49 | -.3750348 .2366903 -1.58 0.113 -.8389392 .0888696
                      50 | -.3969479 .2394534 -1.66 0.097 -.866268 .0723721
                      51 | -.4187791 .2424796 -1.73 0.084 -.8940305 .0564722
                      52 | -.4461327 .2456146 -1.82 0.069 -.9275285 .0352631
                      53 | -.4237412 .2492429 -1.70 0.089 -.9122483 .0647658
                      54 | -.5753698 .4592161 -1.25 0.210 -1.475417 .3246773
                      |
                      year |
                      69 | .0814148 .014949 5.45 0.000 .0521152 .1107144
                      70 | .0604407 .0210803 2.87 0.004 .0191241 .1017573
                      71 | .1047769 .0288348 3.63 0.000 .0482617 .1612921
                      72 | .1129049 .0371072 3.04 0.002 .0401762 .1856336
                      73 | .1216363 .0455256 2.67 0.008 .0324077 .2108649
                      75 | .1229176 .062455 1.97 0.049 .000508 .2453273
                      77 | .1702024 .079867 2.13 0.033 .013666 .3267388
                      78 | .2025503 .0890169 2.28 0.023 .0280804 .3770201
                      80 | .1978706 .106257 1.86 0.063 -.0103892 .4061304
                      82 | .2025831 .123801 1.64 0.102 -.0400625 .4452286
                      83 | .2238365 .1325239 1.69 0.091 -.0359056 .4835786
                      85 | .2637994 .150153 1.76 0.079 -.0304951 .5580939
                      87 | .2669837 .1678642 1.59 0.112 -.0620241 .5959915
                      88 | .3145208 .1798453 1.75 0.080 -.0379696 .6670112
                      |
                      _cons | 1.688194 .3221243 5.24 0.000 1.056842 2.319546
                      -------------+----------------------------------------------------------------
                      sigma_u | .36615656
                      sigma_e | .30300411
                      rho | .59354246 (fraction of variance due to u_i)
                      ------------------------------------------------------------------------------
                      Hi Sir, I met similar time-dummy problem like Aaron. Thanks for your explanation here.
                      But in my case, the macro variable is kind of important, because i need to discuss the impact of X on Y, depending on the decrease of the macro variable, and interaction term of macro variable and X is also included in the regression. So i think i cannot delete the macro variable to avoid collinearity.
                      Are there any other ways to fix time effect without deleting macro variables?
                      My post is here if you need more detailed information: https://www.statalist.org/forums/for...-and-unit-root

                      Thanks!!

                      Comment


                      • #12
                        Originally posted by Andrew Musau View Post
                        What I mean is that the coefficients of the variables that are invariant across firms in a given year are not identified in the regression with time effects as the variables are collinear with the time dummies. The problem with Stata's xtreg command is that is does not make this apparent, and I am not sure how many generations of Stata users have been reporting nonsensical coefficients in their papers. Try a different command like reghdfe from SSC and you will see that you cannot obtain an estimate for these variables. Here is a reproducible example that illustrates the point.
                        Thank you for the clarification, Andrew. These control variables is considered by literature to have great effects on the dep.var. What would you suggest to deal with this? Is there any other regression methods implemented in STATA that would deal with it?

                        Comment


                        • #13
                          There is no trick to escape the collinearity except that in your case you could:

                          1. Sample firms from more than one country so that your variables, e.g., inflation and GDP, vary between firms.
                          2. Either drop the time dummies or drop the variables that are invariant across firms in a given year.

                          Usually, if these are just control variables (i.e., not of immediate interest to your study), then it does not matter that they are omitted. However, if they are part of your study, the only options are either 1 or 2.

                          Comment


                          • #14
                            Originally posted by Andrew Musau View Post
                            There is no trick to escape the collinearity except that in your case you could:

                            1. Sample firms from more than one country so that your variables, e.g., inflation and GDP, vary between firms.
                            2. Either drop the time dummies or drop the variables that are invariant across firms in a given year.

                            Usually, if these are just control variables (i.e., not of immediate interest to your study), then it does not matter that they are omitted. However, if they are part of your study, the only options are either 1 or 2.
                            Thanks for the help Andrew, it clarified a lot of my questions.

                            Comment

                            Working...
                            X