Announcement

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

  • -reghdfe- and degree of freedom

    Hi all,

    I am having problem figuring out the correct degree of freedom (df) from -reghdfe- results. I am running -reghdfe- using pooled individual-level data across years with absorbing multiple fixed effects (e.g. time, state, industry, etc). I am trying to do a F-test of no pre-trend, and need df of N-K, but I get confused on the df reported from -reghdfe-.

    My naïve thought is that e(N) = e(df_r) + e(df_m) + absorbed df. Am I wrong about how df is calculated in -reghdfe- ? In reported data, I find, e(df_r) = 31, and e(df_m) = 67, e(df_a) = 6433, and all these df do not sum up to e(N) = 411418. Any help would be appreciated! Thank you!

    Below is the reported ereturn list and the table results.

    Code:
    scalars:
        e(report_constant) =  1
              e(converged) =  1
                     e(ic) =  6
             e(sumweights) =  643393987.7511139
            e(r2_a_within) =  .0704817963078309
                   e(r2_a) =  .3799237769984229
              e(r2_within) =  .0706355863023422
                     e(r2) =  .3897671179698056
                   e(ll_0) =  -1795488.799942529
                     e(ll) =  -1780419.720321791
                      e(F) =  .
                   e(rmse) =  18.47805467413722
                    e(mss) =  88298809.44856453
                    e(rss) =  138243670.3493461
             e(tss_within) =  148750768.0645063
                    e(tss) =  226542479.7979107
                   e(df_m) =  67
                   e(df_r) =  31
                   e(rank) =  67
                      e(N) =  411418
                 e(N_full) =  411672
         e(num_singletons) =  254
        e(drop_singletons) =  1
            e(df_a_nested) =  32
         e(df_a_redundant) =  269
           e(df_a_initial) =  6702
                   e(df_a) =  6433
        e(N_hdfe_extended) =  4
                 e(N_hdfe) =  4
               e(N_clust1) =  32
          e(N_clustervars) =  1
                e(N_clust) =  32
    Code:
    HDFE Linear regression                            Number of obs   =    411,418
    Absorbing 4 HDFE groups                           F(  67,     31) =          .
    Statistics robust to heteroskedasticity           Prob > F        =          .
                                                      R-squared       =     0.3898
                                                      Adj R-squared   =     0.3799
                                                      Within R-sq.    =     0.0706
    Number of clusters (state_code_census) =         32Root MSE       =    18.4781
    
                           (Std. Err. adjusted for 32 clusters in state_code_census)
    --------------------------------------------------------------------------------
                   |               Robust
    re_caring_wo~M |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    ---------------+----------------------------------------------------------------
          years_23 |
                1  |   .9919705   .3724542     2.66   0.012     .2323452    1.751596
                2  |   1.598075   .4209958     3.80   0.001     .7394489    2.456702
                3  |   1.851101   .5539009     3.34   0.002     .7214124    2.980789
                4  |   1.116223   .5319318     2.10   0.044     .0313412    2.201105
                5  |   2.542907   .5741966     4.43   0.000     1.371825    3.713988
                6  |   1.233233   .4338037     2.84   0.008     .3484844    2.117981
                7  |   1.496063    .461687     3.24   0.003     .5544461     2.43768
                8  |   .9271761    .417414     2.22   0.034     .0758546    1.778498
                9  |   .7132363   .4386013     1.63   0.114    -.1812968    1.607769
               10  |  -.0872098   .4454745    -0.20   0.846    -.9957611    .8213415
               11  |   2.082407   .4088558     5.09   0.000      1.24854    2.916274
               12  |   2.092709   .5877807     3.56   0.001     .8939223    3.291496
               13  |   1.957509   .4706451     4.16   0.000     .9976224    2.917396
               14  |   .9445423   .5272858     1.79   0.083    -.1308642    2.019949
               15  |   1.241498   .5292371     2.35   0.026     .1621121    2.320884
               16  |   .5044626   .4324811     1.17   0.252    -.3775884    1.386514
               17  |   .6128867   .6191473     0.99   0.330    -.6498726    1.875646
               18  |  -.5033032   .4995753    -1.01   0.322    -1.522194    .5155873
               19  |   .5111114   .4870344     1.05   0.302    -.4822018    1.504425
               20  |   .4739347   .2758336     1.72   0.096    -.0886316    1.036501
               21  |   .4482408   .3361083     1.33   0.192    -.2372566    1.133738
               24  |   .2357569   .2252456     1.05   0.303    -.2236345    .6951482
               25  |  -.4283681   .2676664    -1.60   0.120    -.9742772    .1175411
               26  |  -.5689729   .2627846    -2.17   0.038    -1.104926   -.0330202
               27  |   .0488333   .3822994     0.13   0.899    -.7308714    .8285381
               28  |  -.3546079    .255738    -1.39   0.175    -.8761891    .1669733
               29  |   .1542909   .2606191     0.59   0.558    -.3772452     .685827
               30  |  -.5390402   .2975555    -1.81   0.080    -1.145909    .0678282
               31  |  -.3836032   .3365146    -1.14   0.263    -1.069929    .3027228
               32  |  -.1585311   .3447817    -0.46   0.649     -.861718    .5446559
               33  |  -.6677153   .3043337    -2.19   0.036    -1.288408   -.0470226
               34  |  -.2069282   .3688007    -0.56   0.579    -.9591021    .5452457
               35  |  -.3109342   .3688873    -0.84   0.406    -1.063285    .4414165
               36  |  -.3936873   .3332719    -1.18   0.246      -1.0734    .2860252
               37  |  -.5215181   .2906202    -1.79   0.082    -1.114242    .0712058
               38  |  -.6520205   .2759389    -2.36   0.025    -1.214802   -.0892393
               39  |   -.719748   .2384159    -3.02   0.005    -1.206001   -.2334955
               40  |  -.8269267   .2480615    -3.33   0.002    -1.332852   -.3210019
               41  |  -.8462573   .2063203    -4.10   0.000     -1.26705   -.4254644
               42  |  -.9774718   .1983986    -4.93   0.000    -1.382108   -.5728353
               43  |  -.6844414   .2327311    -2.94   0.006      -1.1591   -.2097831
               44  |  -.7927493   .2247374    -3.53   0.001    -1.251104   -.3343945
               45  |  -.8344636   .2860695    -2.92   0.007    -1.417906    -.251021
               46  |  -.9340013   .2908262    -3.21   0.003    -1.527145   -.3408573
               47  |     -.7944   .4395029    -1.81   0.080    -1.690772    .1019722
               48  |  -.6527734   .2688042    -2.43   0.021    -1.201003   -.1045435
               49  |  -.9472554   .3183957    -2.98   0.006    -1.596628    -.297883
               50  |  -.7739992   .2552812    -3.03   0.005    -1.294649   -.2533497
               51  |  -.6591308   .2749931    -2.40   0.023    -1.219983   -.0982786
               52  |  -.7478838   .2499912    -2.99   0.005    -1.257744   -.2380234
               53  |  -.9599688   .2617877    -3.67   0.001    -1.493888   -.4260493
               54  |  -1.261569   .3325019    -3.79   0.001    -1.939711   -.5834266
               55  |   .2361319   .6036391     0.39   0.698    -.9949982    1.467262
               56  |          0  (omitted)
                   |
               age |  -.0488436   .0341683    -1.43   0.163    -.1185304    .0208431
              age2 |   .0005306   .0003901     1.36   0.184    -.0002651    .0013263
           edu_ref |   1.964396    .037998    51.70   0.000     1.886899    2.041894
            lnwage |   .0459319   .0261057     1.76   0.088    -.0073111    .0991749
       usual_hours |   .0938964   .0050051    18.76   0.000     .0836883    .1041045
            nchild |  -.0189383   .0887455    -0.21   0.832    -.1999361    .1620594
    dummy_youngkid |   .1336484   .1054411     1.27   0.214    -.0814002     .348697
                   |
          race_ref |
                2  |  -5.101245   .6336882    -8.05   0.000    -6.393661    -3.80883
                3  |  -2.006494    .753452    -2.66   0.012     -3.54317    -.469819
                4  |  -2.752406   .4684655    -5.88   0.000    -3.707848   -1.796965
                5  |  -3.377558   .2411825   -14.00   0.000    -3.869453   -2.885663
                   |
    2.workstat_ref |    .272921   .2093059     1.30   0.202    -.1539612    .6998031
                   |
    property_group |
                2  |  -.2092973   .3389107    -0.62   0.541    -.9005102    .4819155
                3  |    .339929   .1931255     1.76   0.088    -.0539531    .7338112
                   |
             _cons |   32.52504   .5508157    59.05   0.000     31.40164    33.64844
    --------------------------------------------------------------------------------
    
    Absorbed degrees of freedom:
    -----------------------------------------------------------+
           Absorbed FE | Categories  - Redundant  = Num. Coefs |
    -------------------+---------------------------------------|
     state_code_census |        32          32           0    *|
                  year |        33           1          32     |
               ind1990 |       235           1         234     |
          ind1990#year |      6402         235        6167    ?|
    -----------------------------------------------------------+
    ? = number of redundant parameters may be higher
    * = FE nested within cluster; treated as redundant for DoF computation
    Best regards,
    Michelle
Working...
X