Announcement

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

  • Question about reghdfe

    Could you please answer my questions about reghdfe command?




    1. When I conducted estimation using reghdfe, the following error messages appears after estimation.




    Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
    WARNING: Missing F statistic (dropped variables due to collinearity or too few clusters).




    1) Could you please let me know the reason why these messages appeared?

    2) Even though adjustment from Cameron, Gelbach & Miller is applied and F statistic is missing, are the estimates of coefficients and standard errors still valid?




    2. I tried to estimate standard errors clustered by individuals (pubid) and states (state) because some respondents moved across states between survey waves. There are 8635 clusters for individuals and 49 clusters for states. But the estimation results show that standard errors are adjusted only for 49 clusters in individuals and states. Maybe this happened because most individuals did not move across states for the all of the targeted periods. However, it is sure that there are individuals who moved between states. Are the estimates of standard errors still valid?

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. We'll be a lot more able to help you if we really know exactly what you ran, exactly what Stata came back with, and have data to replicate the problem.

    It appears you have created colinearity somehow. Something is really wrong with your setup if you expect 8600 clusters and only get 49. It is strange that you get states but not individuals - normally if people don't move across states, you'd get the people fixed effects but not the state. I'd look at the individual-level variables, but that is just a guess.

    And, no, you cannot interpret these results until you figure out what is going on. Whatever it is doing is not what you thought it was doing.

    Comment


    • #3
      Thank you for your advice. This is the first time for me to ask questions here. I attach the STATA code and outputs.



      Code:
      . local regressors "realntax hhincome97 hhincomemissing97 hhincome9801 parentincome9801 incomemissing9801 hhincome0203 hhincomemissing0203 familyincome0415 familyincomemissing0415 lesshigh associate bachelor graduate female black hispanic mixed age13 age14 age15 age16 age17 age18 age19 age20 age21 age22 age23 age24 age25 age26 age27 age28 age29 age30 age31 age32 legal"
      
      .
      . reghdfe smoking realtax `regressors', absorb(state year) vce(cluster pubid state)
      (converged in 6 iterations)
      Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
      WARNING: Missing F statistic (dropped variables due to collinearity or too few clusters).
      
      HDFE Linear regression                            Number of obs   =     83,229
      Absorbing 2 HDFE groups                           F(  37,     48) =          .
      Statistics robust to heteroskedasticity           Prob > F        =          .
                                                        R-squared       =     0.0950
                                                        Adj R-squared   =     0.0938
      Number of clusters (pubid)   =      8,624         Within R-sq.    =     0.0686
      Number of clusters (state)   =         49         Root MSE        =     0.4404
      
                                            (Std. Err. adjusted for 49 clusters in pubid state)
      -----------------------------------------------------------------------------------------
                              |               Robust
                      smoking |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      ------------------------+----------------------------------------------------------------
                      realtax |   .0149553   .0078014     1.92   0.061    -.0007304     .030641
                     realntax |   .0178787   .0099832     1.79   0.080    -.0021939    .0379513
                   hhincome97 |  -9.53e-07   1.24e-07    -7.70   0.000    -1.20e-06   -7.05e-07
            hhincomemissing97 |   -.034007   .0107274    -3.17   0.003    -.0555759   -.0124381
                 hhincome9801 |   2.85e-07   1.18e-07     2.41   0.020     4.77e-08    5.22e-07
             parentincome9801 |  -9.54e-07   9.54e-08   -10.00   0.000    -1.15e-06   -7.62e-07
            incomemissing9801 |   -.021323   .0063077    -3.38   0.001    -.0340054   -.0086405
                 hhincome0203 |  -2.29e-07   1.09e-07    -2.11   0.040    -4.47e-07   -1.06e-08
          hhincomemissing0203 |  -.0216894   .0129545    -1.67   0.101    -.0477361    .0043574
             familyincome0415 |  -2.00e-07   5.40e-08    -3.71   0.001    -3.09e-07   -9.19e-08
      familyincomemissing0415 |  -.0013417   .0101669    -0.13   0.896    -.0217837    .0191003
                     lesshigh |   .1960776   .0163181    12.02   0.000      .163268    .2288873
                    associate |  -.0947629   .0238533    -3.97   0.000    -.1427233   -.0468026
                     bachelor |  -.1667064   .0151759   -10.98   0.000    -.1972196   -.1361933
                     graduate |  -.2498111   .0261917    -9.54   0.000    -.3024731   -.1971491
                       female |  -.0350707   .0129207    -2.71   0.009    -.0610495    -.009092
                        black |  -.1816015   .0106916   -16.99   0.000    -.2030984   -.1601045
                     hispanic |  -.1375272   .0126527   -10.87   0.000     -.162967   -.1120873
                        mixed |  -.0224019   .0316608    -0.71   0.483    -.0860601    .0412563
                        age13 |   .0369542   .0085529     4.32   0.000     .0197575    .0541508
                        age14 |   .0969187   .0079417    12.20   0.000     .0809509    .1128864
                        age15 |   .1538798   .0102412    15.03   0.000     .1332885    .1744712
                        age16 |   .2032319   .0130441    15.58   0.000      .177005    .2294588
                        age17 |   .2488463   .0135138    18.41   0.000     .2216751    .2760176
                        age18 |   .3225279   .0167723    19.23   0.000     .2888049    .3562509
                        age19 |   .3946302   .0229694    17.18   0.000     .3484472    .4408132
                        age20 |   .4184126   .0252508    16.57   0.000     .3676424    .4691828
                        age21 |   .4329011   .0248821    17.40   0.000     .3828723    .4829298
                        age22 |   .4574017    .027769    16.47   0.000     .4015683    .5132351
                        age23 |   .4670891    .026595    17.56   0.000     .4136163     .520562
                        age24 |   .4797491   .0275633    17.41   0.000     .4243293    .5351689
                        age25 |   .4891478   .0298193    16.40   0.000     .4291921    .5491034
                        age26 |   .4825524   .0334886    14.41   0.000     .4152191    .5498858
                        age27 |    .489365   .0339563    14.41   0.000     .4210913    .5576386
                        age28 |   .4723952   .0370862    12.74   0.000     .3978285     .546962
                        age29 |   .4833662   .0410037    11.79   0.000     .4009227    .5658096
                        age30 |   .4887624   .0434964    11.24   0.000      .401307    .5762179
                        age31 |   .5001792    .048128    10.39   0.000     .4034115     .596947
                        age32 |   .1252636    .130082     0.96   0.340    -.1362838     .386811
                        legal |   .0391313   .0088119     4.44   0.000     .0214137    .0568489
      -----------------------------------------------------------------------------------------
      
      Absorbed degrees of freedom:
      --------------------------------------------------------------------------+
                  Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     |
      ------------------------+-------------------------------------------------|
                        state |            0              49             49 *   |
                         year |           15              16              1     |
      --------------------------------------------------------------------------+
      * = fixed effect nested within cluster; treated as redundant for DoF computation

      Comment


      • #4
        Junhyun:

        I was wondering if you could get it fixed? I am getting the same error messages when using the reghdfe. Any comments are much appreciated!

        Kind regards,
        Yumeng

        Comment

        Working...
        X