Announcement

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

  • Too many predictors when using Time fixed effects for panel data

    Hello,
    I am running an xtreg-fe cluster(panelvar) on monthly data. I employ time-fixed effects too. However, the regression output contains too many predictors. The number of predictors> the number of clusters. Is there a way out of this predicament?
    Here is my code:
    Code:
    xtreg laod  lnl lpr lt lh lp lwi lf la lpop lndvi i.month, fe cluster(sd)
    Result:
    Code:
    note: lpop omitted because of collinearity
    
    Fixed-effects (within) regression               Number of obs     =      5,826
    Group variable: sd                              Number of groups  =         59
    
    R-sq:                                           Obs per group:
         within  = 0.3639                                         min =         80
         between = 0.5746                                         avg =       98.7
         overall = 0.4326                                         max =        102
    
                                                    F(58,58)          =          .
    corr(u_i, Xb)  = -0.3306                        Prob > F          =          .
    
                                        (Std. Err. adjusted for 59 clusters in sd)
    ------------------------------------------------------------------------------
                 |               Robust
            laod |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             lnl |   .0444047   .0189316     2.35   0.022      .006509    .0823003
             lpr |   .0073755   .0040048     1.84   0.071     -.000641    .0153921
              lt |  -3.884795   1.871788    -2.08   0.042    -7.631587   -.1380035
              lh |   .5299972   .0476566    11.12   0.000     .4346021    .6253922
              lp |   4.666758   6.377097     0.73   0.467    -8.098389     17.4319
             lwi |  -.3078047    .058291    -5.28   0.000    -.4244869   -.1911225
              lf |    .565516   .6729575     0.84   0.404    -.7815548    1.912587
              la |    .307257   .1024781     3.00   0.004     .1021247    .5123892
            lpop |          0  (omitted)
           lndvi |  -.2585523   .0444562    -5.82   0.000     -.347541   -.1695636
                 |
           month |
            649  |  -.1233491   .0306944    -4.02   0.000    -.1847905   -.0619077
            650  |  -.0332226   .0468975    -0.71   0.482     -.127098    .0606529
            651  |   .1017779   .0643089     1.58   0.119    -.0269503     .230506
            652  |   .0465545   .0721204     0.65   0.521    -.0978102    .1909193
            653  |   .1329436   .1007038     1.32   0.192    -.0686368    .3345241
            654  |   .0536357   .1015976     0.53   0.600     -.149734    .2570054
            655  |  -.1270271   .0812046    -1.56   0.123    -.2895757    .0355216
            656  |  -.3396463   .0666669    -5.09   0.000    -.4730947    -.206198
            657  |  -.1076306   .0529593    -2.03   0.047    -.2136402    -.001621
            658  |   .0830799   .0496674     1.67   0.100    -.0163402       .1825
            659  |   -.121576   .0278431    -4.37   0.000      -.17731    -.065842
            660  |  -.1345138   .0250915    -5.36   0.000    -.1847399   -.0842877
            661  |  -.1078254   .0322146    -3.35   0.001      -.17231   -.0433409
            662  |  -.0871166   .0491051    -1.77   0.081    -.1854111    .0111779
            663  |   .0174388   .0497147     0.35   0.727    -.0820761    .1169536
            664  |   .2145259   .0837729     2.56   0.013     .0468362    .3822157
            665  |    .031304   .1028956     0.30   0.762    -.1746639    .2372719
            666  |   .2418876   .1020404     2.37   0.021     .0376316    .4461436
            667  |  -.0446145    .082237    -0.54   0.590    -.2092298    .1200008
            668  |  -.2410526   .0697299    -3.46   0.001    -.3806322    -.101473
            669  |   -.091523   .0435524    -2.10   0.040    -.1787026   -.0043434
            670  |  -.0992061    .056894    -1.74   0.087    -.2130917    .0146795
            671  |  -.2472565   .0264505    -9.35   0.000    -.3002029   -.1943101
            672  |  -.0079172   .0290274    -0.27   0.786    -.0660218    .0501874
            673  |   .0613458   .0326798     1.88   0.066      -.00407    .1267615
            674  |   .0185414   .0510152     0.36   0.718    -.0835766    .1206594
            675  |   .0246948   .0633253     0.39   0.698    -.1020646    .1514542
            676  |  -.0176356    .084514    -0.21   0.835    -.1868087    .1515375
            677  |  -.1145517   .1096654    -1.04   0.301     -.334071    .1049675
            678  |  -.0882696   .1083409    -0.81   0.419    -.3051375    .1285984
            679  |  -.1288769   .0862318    -1.49   0.140    -.3014886    .0437348
            680  |   -.252661   .0796029    -3.17   0.002    -.4120035   -.0933185
            681  |  -.1868149   .0611212    -3.06   0.003    -.3091622   -.0644676
            682  |   .0267119   .0466807     0.57   0.569    -.0667296    .1201534
            683  |  -.1697311   .0430275    -3.94   0.000    -.2558601   -.0836022
            684  |  -.0028064   .0208123    -0.13   0.893    -.0444668     .038854
            685  |  -.0862943   .0407558    -2.12   0.039    -.1678759   -.0047127
            686  |   -.005816   .0440132    -0.13   0.895    -.0939181    .0822861
            687  |   .2303101    .066068     3.49   0.001     .0980606    .3625596
            688  |   .0515448   .0816173     0.63   0.530    -.1118301    .2149196
            689  |  -.1343553   .1008913    -1.33   0.188    -.3363112    .0676005
            690  |   -.071389   .1032045    -0.69   0.492    -.2779752    .1351972
            691  |  -.0436445    .101499    -0.43   0.669    -.2468168    .1595278
            692  |  -.3623209   .0795405    -4.56   0.000    -.5215385   -.2031033
            693  |   -.137231   .0668359    -2.05   0.045    -.2710177   -.0034443
            694  |   .0502787   .0588681     0.85   0.397    -.0675586     .168116
            695  |  -.0297487   .0249504    -1.19   0.238    -.0796923    .0201949
            696  |   .2128178   .0492536     4.32   0.000      .114226    .3114095
            697  |  -.1318354   .0319908    -4.12   0.000    -.1958719   -.0677989
            698  |   .1500738   .0592733     2.53   0.014     .0314254    .2687222
            699  |   .0708001   .0651461     1.09   0.282    -.0596041    .2012042
            700  |   .1466561   .0819551     1.79   0.079    -.0173948    .3107071
            701  |   .0960467   .1118363     0.86   0.394     -.127818    .3199115
            702  |  -.0199497   .1224544    -0.16   0.871    -.2650688    .2251694
            703  |   .1611545   .1091591     1.48   0.145    -.0573511    .3796602
            704  |  -.3932091   .0616178    -6.38   0.000    -.5165505   -.2698677
            705  |  -.1384157   .0415515    -3.33   0.002    -.2215901   -.0552413
            706  |  -.1232199   .0393126    -3.13   0.003    -.2019126   -.0445272
            707  |   .0229704   .0443862     0.52   0.607    -.0658783    .1118191
            708  |    .003345   .0300747     0.11   0.912     -.056856    .0635461
            709  |  -.1586821   .0255624    -6.21   0.000    -.2098508   -.1075134
            710  |  -.0659489   .0494828    -1.33   0.188    -.1649995    .0331018
            711  |  -.0910197   .0650305    -1.40   0.167    -.2211924     .039153
            712  |   .1705902   .0803942     2.12   0.038     .0096637    .3315167
            713  |  -.0349302   .0975616    -0.36   0.722     -.230221    .1603607
            714  |   .0457064   .1174711     0.39   0.699    -.1894375    .2808503
            715  |   -.091042   .0997719    -0.91   0.365    -.2907573    .1086732
            716  |  -.2498159   .0979934    -2.55   0.013    -.4459709   -.0536608
            717  |  -.3566553    .057478    -6.21   0.000    -.4717101   -.2416006
            718  |   .0368881   .0480439     0.77   0.446    -.0592823    .1330585
            719  |   -.099185   .0316461    -3.13   0.003    -.1625316   -.0358384
            720  |  -.1638996   .0166212    -9.86   0.000    -.1971706   -.1306286
            721  |  -.0645378   .0305725    -2.11   0.039    -.1257354   -.0033402
            722  |  -.1241648    .043424    -2.86   0.006    -.2110874   -.0372422
            723  |  -.0614872   .0544523    -1.13   0.263    -.1704854     .047511
            724  |  -.0086622   .0832141    -0.10   0.917    -.1752334     .157909
            725  |   -.213926   .1238311    -1.73   0.089    -.4618009    .0339488
            726  |  -.2437386   .1041832    -2.34   0.023    -.4522839   -.0351932
            727  |  -.1545941   .1188872    -1.30   0.199    -.3925728    .0833845
            728  |  -.3049369   .0829763    -3.67   0.001    -.4710321   -.1388417
            729  |  -.0042765   .0881209    -0.05   0.961    -.1806697    .1721166
            730  |   .0111962   .0514665     0.22   0.829    -.0918253    .1142177
            731  |  -.0253891   .0363513    -0.70   0.488    -.0981542    .0473761
            732  |   .1024035   .0263547     3.89   0.000     .0496489    .1551581
            733  |   .0508763   .0299352     1.70   0.095    -.0090456    .1107982
            734  |   .2174193   .0536344     4.05   0.000     .1100584    .3247801
            735  |   .2987526   .0671605     4.45   0.000     .1643162    .4331891
            736  |  -.0379749   .0809879    -0.47   0.641    -.2000899    .1241401
            737  |  -.0257866   .1015697    -0.25   0.800    -.2291004    .1775271
            738  |  -.0003278   .1141334    -0.00   0.998    -.2287907    .2281351
            739  |  -.0071986   .0921522    -0.08   0.938    -.1916612    .1772641
            740  |  -.2660276   .0953891    -2.79   0.007    -.4569696   -.0750856
            741  |  -.1511299   .0671898    -2.25   0.028    -.2856248    -.016635
            742  |  -.0220244   .0602739    -0.37   0.716    -.1426757    .0986269
            743  |   .1625696   .0367626     4.42   0.000     .0889812     .236158
            744  |  -.0285415   .0379808    -0.75   0.455    -.1045682    .0474853
            745  |   .0387975    .044154     0.88   0.383    -.0495863    .1271812
            746  |    .322907   .0602675     5.36   0.000     .2022685    .4435455
            747  |   .3102825   .0777607     3.99   0.000     .1546276    .4659374
            748  |   .3304651   .0885366     3.73   0.000     .1532399    .5076904
            749  |   .2293189   .1110574     2.06   0.043     .0070134    .4516244
                 |
           _cons |  -21.81826   76.01927    -0.29   0.775    -173.9874    130.3508
    -------------+----------------------------------------------------------------
         sigma_u |  .16010163
         sigma_e |  .22657205
             rho |  .33303091   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    Last edited by Monica Jaison; 16 Mar 2023, 23:25.

  • #2
    Monica:
    this is not an issue (see -help j_robustsingular-).
    That said, your panel-wise effect seems limping (if existing at all sigma_u<sigma_e).
    In addition, you're probably taking -xtreg- to its limit, as you seem to have a T>N panel dataset (see -xtregar,fe-).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,

      I decided to run the code:
      Code:
      xtregar laod lnl lpr lt lh lp lwi lf la lpop lndvi, fe
      the results are:
      Code:
      FE (within) regression with AR(1) disturbances  Number of obs     =      5,767
      Group variable: sd                              Number of groups  =         59
      
      R-sq:                                           Obs per group:
           within  = 0.3782                                         min =         79
           between = 0.3283                                         avg =       97.7
           overall = 0.2170                                         max =        101
      
                                                      F(9,5699)         =     385.20
      corr(u_i, Xb)  = 0.1013                         Prob > F          =     0.0000
      
      ------------------------------------------------------------------------------
              laod |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               lnl |   .0385658     .00847     4.55   0.000     .0219614    .0551702
               lpr |   .0017984   .0022246     0.81   0.419    -.0025627    .0061594
                lt |  -.8268044   .4244654    -1.95   0.051    -1.658918    .0053092
                lh |   .3431221   .0197289    17.39   0.000     .3044459    .3817983
                lp |   1.158246   .2137022     5.42   0.000     .7393089    1.577184
               lwi |  -.1486478   .0201606    -7.37   0.000    -.1881702   -.1091255
                lf |   .9495168   .1730063     5.49   0.000     .6103588    1.288675
                la |   .2914388   .0486246     5.99   0.000     .1961161    .3867615
              lpop |          0  (omitted)
             lndvi |  -.2980514    .019274   -15.46   0.000    -.3358358   -.2602671
             _cons |  -.3072107   .0876244    -3.51   0.000    -.4789879   -.1354335
      -------------+----------------------------------------------------------------
            rho_ar |  .28474839
           sigma_u |  .18441393
           sigma_e |  .25078577
           rho_fov |  .35095764   (fraction of variance because of u_i)
      ------------------------------------------------------------------------------
      F test that all u_i=0: F(58,5699) = 16.06                    Prob > F = 0.0000
      However I am unsure how I can justify shifting to -xtregar- ignoring time fixed effects. Can you please explain how I can describe this?

      Comment


      • #4
        Monica:
        the justificatiom rests on the fact that you have a T>N panel dataset (whereas -xtreg- was developed for N>T panel datasets).
        xtregar- allows you to calculate whether or not the epsilon residuals follow an AR1 process.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thank you Carlo. Now I understand it well.

          Comment

          Working...
          X