Announcement

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

  • Reghdfe: Test coefficients of absorbed FEs after using reghdfe

    Hello Statalist users,

    I am trying to test the statistical significance of coefficients of absorbed fixed effects generated using the reghdfe command. Unfortunately, I keep getting errors. For example, consider the following code:

    webuse nlswork
    reghdfe ln_w grade age ttl_exp tenure not_smsa south , a(idcode year)

    Here, both idcode and year are treated as fixed effects and their coefficients are not reported in the final output table. But what if I want to test if their coefficients are statistically different than zero? If I use the command

    test 69.year

    I get the error "factor 'year' not found in list of covariates." I attempted to follow the instructions in the help site for reghdfe (http://scorreia.com/help/reghdfe.html) for saving fixed absorbed effects but I still have no luck. The only way I can get the test command to work for the regression above is if I take year out of the list of absorbed fixed effects and include it in the main regression.

    Unfortunately, the actual application I am working on has a large number of fixed effects (thousands) and I have not been able to get my computer to successfully run the model with the large number of fixed effects in the main model, and not in the list of absorbed fixed effects. When I try this, I get the error:

    Factor::sort(): 3900 unable to allocate real <tmp>[2284668,376] FixedEffects::project_one_fe(): - function returned error transform_sym_kaczmarz(): - function returned error accelerate_cg(): - function returned error FixedEffects::_partial_out(): - function returned error FixedEffects::partial_out(): - function returned error <istmt>: - function returned error When I run the model with the large number of fixed effects in the list of absorbed fixed effects, I run into the same problem as above...I cannot run the test command. If anyone has any ideas, I would appreciate your input. Thanks!

  • #2
    Unfortunately, the actual application I am working on has a large number of fixed effects (thousands) and I have not been able to get my computer to successfully run the model with the large number of fixed effects in the main model, and not in the list of absorbed fixed effects.
    OK, but suppose you could do this. What would you do with these thousands of significance tests? How could you make any sense of them? What meaning would they have? How would you even read them all?

    Comment


    • #3
      Thank you for your quick response, and great question. My only interest in the coefficients is knowing their statistical significance. In my specific application, I have a much more parsimonious model I use as my main specification. In this more condensed model, I use three variables that essentially capture the information of the multiple fixed effects. For comparison's sake, I want to show that even with thousands of fixed effects, only ### are statistically significant, and as you point out above, it is difficult, or impossible, to make good use or sense of them anyway.

      Comment


      • #4
        Well, why not just use -reghdfe- with everything absorbed, as you have already done, and then with your parsimonious model, and directly compare the results. And if you wanted to formally test it, if the three variables that capture the information of the multiple fixed effects are designed in a way that makes them aggregates of the original ones, so you can treat them as nested models, and then do an F-test on the difference in R2 between them.

        Comment


        • #5
          reghdfe is from SSC (FAQ Advice #12).

          Originally posted by DrewHanks View Post
          Hello Statalist users,

          I am trying to test the statistical significance of coefficients of absorbed fixed effects generated using the reghdfe command.
          Previous versions of reghdfe used to provide you with this statistic, saved as e(F_absorb). If you include the option -old-, it will call the old version which will give you the statistic.

          Code:
          webuse grunfeld, clear
          reghdfe invest mvalue kstock, a(company year) old
          ereturn list
          Res.:

          Code:
          . ereturn list
          
          scalars:
                            e(N) =  200
                         e(df_r) =  169
                          e(rss) =  452147.0426797893
                            e(F) =  217.4423167127084
                         e(df_m) =  2
                         e(rank) =  2
                       e(N_hdfe) =  2
              e(N_hdfe_extended) =  2
                     e(mobility) =  1
              e(M_due_to_nested) =  0
                         e(df_a) =  29
                           e(M1) =  0
                           e(K1) =  10
                     e(M1_exact) =  1
                    e(M1_nested) =  0
                           e(G1) =  1
                           e(M2) =  1
                          e(tss) =  9359943.916562419
                         e(rmse) =  51.72452308186215
                     e(F_absorb) =  17.40314638883027
                  e(r2_a_within) =  .7168333311777847
                         e(r2_a) =  .9431182669397118
                    e(r2_within) =  .7201452220412023
                           e(r2) =  .9516934025769411
                         e(ll_0) =  -1183.480688194081
                           e(ll) =  -1056.132242143526
                          e(mss) =  8907796.873882631
                           e(G2) =  2
                    e(M2_nested) =  0
                     e(M2_exact) =  1
                           e(K2) =  20

          Comment

          Working...
          X