Announcement

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

  • why collinearity exist in xtreg not in reg

    Hi dear profs and colleagues,

    I am running this model. In Reg estimation, there is no collinearity but when I run fixed effect, the main explanatory variable is omitted due to collinearity. I tried to drop the control variables and estimate only the dependent variable and predictor, though collinearity still exists and eliminates the independent variable. Could you please share your ideas in this regard? Thanks.
    Code:
    clear
    input double(year NPC_FIC firm_age) float(region mig_firm immi_sh foreign_aff sector)
    2010 500000001  7 6 0 .012691068 . .
    2010 500000002 25 2 0 .035209775 . .
    2011 500000002 26 2 1 .035209775 . .
    2012 500000002 27 2 1 .035209775 . .
    2013 500000002 28 2 0 .035209775 . .
    2014 500000002 29 2 0 .035209775 . .
    2015 500000002 30 2 0 .035209775 . .
    2016 500000002 31 2 0 .035209775 . .
    2017 500000002 32 2 0 .035209775 . .
    2018 500000002 33 2 0 .035209775 . .
    2010 500000033 25 1 0 .017485183 . .
    2011 500000033 26 1 0 .017485183 . .
    2012 500000033 27 1 0 .017485183 . .
    2013 500000033 28 1 0 .017485183 . .
    2014 500000033 29 1 0 .017485183 . .
    2015 500000033 30 1 0 .017485183 . .
    2016 500000033 31 1 0 .017485183 . .
    2017 500000033 32 1 0 .017485183 . .
    2018 500000033 33 1 0 .017485183 . .
    2019 500000033 34 1 0 .017485183 . .
    2020 500000033 35 1 0 .017485183 . .
    2010 500000050 25 2 0 .035209775 . .
    2011 500000050 26 2 0 .035209775 . .
    2012 500000050 27 2 0 .035209775 . .
    2013 500000050 28 2 0 .035209775 . .
    2014 500000050 29 2 0 .035209775 . .
    2015 500000050 30 2 0 .035209775 . .
    2010 500000083  5 2 0 .035209775 . .
    2011 500000083  6 2 0 .035209775 . .
    2012 500000083  7 2 0 .035209775 . .
    2013 500000083  8 2 0 .035209775 . .
    2014 500000083  9 2 0 .035209775 . .
    
    
    
    reg  mig_jump immi_sh firm_age foreign_aff  i.sector i.region, vce (robust)
    
    Linear regression                               Number of obs     =    108,989
                                                    F(16, 108972)     =      20.92
                                                    Prob > F          =     0.0000
                                                    R-squared         =     0.0032
                                                    Root MSE          =     .15762
    
    ------------------------------------------------------------------------------
                 |               Robust
        mig_jump | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
         immi_sh |   .2279302   .1819923     1.25   0.210    -.1287722    .5846326
        firm_age |   .0001614   .0000319     5.06   0.000     .0000989    .0002239
     foreign_aff |  -.0086047   .0026538    -3.24   0.001    -.0138061   -.0034033
                 |
          sector |
              6  |  -.0067889   .0021552    -3.15   0.002    -.0110131   -.0025647
              7  |  -.0144425   .0012577   -11.48   0.000    -.0169075   -.0119774
              9  |   .0015004    .001927     0.78   0.436    -.0022765    .0052774
             10  |   .0043284   .0043409     1.00   0.319    -.0041796    .0128365
             11  |  -.0080704      .0033    -2.45   0.014    -.0145384   -.0016024
             12  |  -.0112652    .001748    -6.44   0.000    -.0146913   -.0078391
             13  |  -.0107205   .0026038    -4.12   0.000    -.0158239   -.0056171
                 |
          region |
              2  |   4.04e-06   .0034589     0.00   0.999    -.0067753    .0067834
              3  |  -.0052456   .0095821    -0.55   0.584    -.0240264    .0135351
              4  |  -.0148905   .0258107    -0.58   0.564    -.0654792    .0356982
              5  |  -.0067527   .0074196    -0.91   0.363     -.021295    .0077896
              6  |  -.0005219   .0034816    -0.15   0.881    -.0073458     .006302
              7  |  -.0051084   .0033725    -1.51   0.130    -.0117185    .0015017
                 |
           _cons |   .0303745   .0042306     7.18   0.000     .0220825    .0386665
    ------------------------------------------------------------------------------
    
    . 
    end of do-file
    
    . do "C:\Users\35193\AppData\Local\Temp\STD52d8_000000.tmp"
    
    . xtreg mig_jump immi_sh firm_age foreign_aff  i.sector i.region i.year , fe cluster (NPC_FIC )
    note: immi_sh omitted because of collinearity.
    
    Fixed-effects (within) regression               Number of obs     =    108,989
    Group variable: NPC_FIC                         Number of groups  =     23,475
    
    R-squared:                                      Obs per group:
         Within  = 0.0086                                         min =          1
         Between = 0.0061                                         avg =        4.6
         Overall = 0.0033                                         max =         10
    
                                                    F(24,23474)       =      88.27
    corr(u_i, Xb) = -0.2588                         Prob > F          =     0.0000
    
                               (Std. err. adjusted for 23,475 clusters in NPC_FIC)
    ------------------------------------------------------------------------------
                 |               Robust
        mig_jump | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
         immi_sh |          0  (omitted)
        firm_age |  -.0002446   .0008499    -0.29   0.774    -.0019104    .0014213
     foreign_aff |  -.0007732   .0186608    -0.04   0.967    -.0373497    .0358032
                 |
          sector |
              6  |  -.0375509   .0225933    -1.66   0.097    -.0818352    .0067333
              7  |  -.0307865   .0121707    -2.53   0.011    -.0546418   -.0069311
              9  |  -.0352974   .0236857    -1.49   0.136     -.081723    .0111282
             10  |  -.0371334   .0131044    -2.83   0.005    -.0628188   -.0114479
             11  |  -.0253307   .0261081    -0.97   0.332    -.0765042    .0258429
             12  |  -.0223872   .0218179    -1.03   0.305    -.0651517    .0203773
             13  |  -.0207113   .0262835    -0.79   0.431    -.0722287     .030806
                 |
          region |
              2  |  -.0128642   .0165671    -0.78   0.437    -.0453367    .0196083
              3  |  -.0334628   .0172836    -1.94   0.053    -.0673398    .0004143
              4  |  -.0069956   .0381937    -0.18   0.855    -.0818577    .0678665
              5  |  -.0265096   .0252737    -1.05   0.294    -.0760476    .0230285
              6  |  -.0111455    .047931    -0.23   0.816    -.1050933    .0828023
              7  |   .0407561   .0680305     0.60   0.549    -.0925881    .1741002
                 |
            year |
           2011  |   .0365941   .0017047    21.47   0.000     .0332528    .0399353
           2012  |   .0235153   .0022009    10.68   0.000     .0192015    .0278292
           2013  |   .0218529   .0029972     7.29   0.000     .0159782    .0277277
           2014  |   .0272034   .0038541     7.06   0.000     .0196492    .0347576
           2015  |   .0267968   .0046023     5.82   0.000      .017776    .0358176
           2016  |   .0279896   .0054554     5.13   0.000     .0172966    .0386826
           2017  |   .0320082   .0063008     5.08   0.000     .0196583    .0443581
           2018  |   .0458582   .0073004     6.28   0.000      .031549    .0601674
           2019  |   .0532852   .0081849     6.51   0.000     .0372424    .0693281
                 |
           _cons |   .0408039   .0271331     1.50   0.133    -.0123788    .0939866
    -------------+----------------------------------------------------------------
         sigma_u |  .06500605
         sigma_e |  .16249555
             rho |   .1379597   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------

  • #2
    The variable that drops out appears to have no variation over time within firm, and firm fixed effects eliminates such variables. You can try correlated random effects for unbalanced panels, as I discuss in my 2019 Journal of Econometrics paper. That said, it's hard to make a convincing case for a "causal" effect without some time variation.

    Also, for the reg command, you should use vce(cluster NPC_FIC) to account for serial correlation.

    Comment


    • #3
      Dear Jeff, thank you for getting back to me.
      You are right -immi_sh does not change in some years.
      In terms of using random effect, Hausmantest says to apply the fixed effect. So what shall I do practically?

      Comment

      Working...
      X