Announcement

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

  • Problem in Omitted Dummies with REGHDFE

    Hi All,

    I am new to the forum, so please let me know if I am not formatting my request properly, and I'll be happy to make the appropriate changes. I am having problems running an event-study in Stata with two-dimensional fixed-effects.

    I have a panel of firms and year, with a shock (i.e., a change in a law) occurring in a staggered fashion to several groups of firms, so that by the end of the sample period all the firms are eventually treated. I am trying to run an event study, where the dependent variable "y" is regressed on firm and year dummies, plus a set of dummies to check for the absence of a pre-trend. For example, dumm5 is equal to 1 form firm i in year t if the shock to firm i occurred in year t-5. dumm_1 is omitted, so that all the remaining dummies should all be identified. Indeed, if I use "areg", this is my output:

    Code:
    . areg  y dumm* i.year,absorb(id) 
    note: 151.year omitted because of collinearity
    
    Linear regression, absorbing indicators    Number of obs   =      42928
        F(  42,  40192) =      33.09
        Prob > F        =     0.0000
        R-squared       =     0.4961
        Adj R-squared   =     0.4618
        Root MSE        =     4.2764
    
        
    y       Coef.   Std. Err.      t    P>t     [95% Conf. Interval]
        
    dumm_13   -.1311646   .2493519    -0.53    0.599       -.6199    .3575709
    dumm_12   -.0774617   .2734669    -0.28    0.777    -.6134632    .4585397
    dumm_11    .4890132    .254919     1.92    0.055    -.0106338    .9886602
    dumm_10    .3322305   .2209377     1.50    0.133    -.1008124    .7652734
    dumm_9   -.5587808   .1927939    -2.90    0.004    -.9366612   -.1809004
    dumm_8   -.4640176   .1665719    -2.79    0.005    -.7905024   -.1375329
    dumm_7   -.3920493   .1746904    -2.24    0.025    -.7344464   -.0496522
    dumm_6   -.1567121    .157182    -1.00    0.319    -.4647924    .1513682
    dumm_5   -.5046396   .1608119    -3.14    0.002    -.8198345   -.1894446
    dumm_4    -.368474   .1597363    -2.31    0.021    -.6815608   -.0553872
    dumm_3   -.0716386    .156353    -0.46    0.647     -.378094    .2348167
    dumm_2    .0561017   .1523417     0.37    0.713    -.2424917     .354695
    dumm0    .4193639   .1537777     2.73    0.006      .117956    .7207718
    dumm1    .5340008   .1590671     3.36    0.001     .2222257     .845776
    dumm2    .7855772   .1642925     4.78    0.000       .46356    1.107594
    dumm3    .7899929   .1661612     4.75    0.000     .4643131    1.115673
    dumm4    1.059333   .1614825     6.56    0.000     .7428234    1.375842
    dumm5    1.072899    .177329     6.05    0.000     .7253299    1.420468
    dumm6    1.053102   .1719503     6.12    0.000     .7160757    1.390129
    dumm7    1.441002   .2046819     7.04    0.000      1.03982    1.842183
    dumm8    1.874835    .208242     9.00    0.000     1.466676    2.282994
    dumm9    1.725453   .2102388     8.21    0.000      1.31338    2.137526
    dumm10    1.567202   .2219407     7.06    0.000     1.132193    2.002211
    dumm11    1.597698   .2245723     7.11    0.000     1.157531    2.037865
                 
    year 
    133     .6652159   .1650878     4.03    0.000       .34164    .9887917
    134     .9618773   .1680508     5.72    0.000     .6324939    1.291261
    135     1.852587   .1598002    11.59    0.000     1.539375      2.1658
    136     .2299018   .1518721     1.51    0.130     -.067771    .5275745
    137      .675096   .1426957     4.73    0.000     .3954092    .9547828
    138     1.024808   .1567313     6.54    0.000     .7176108    1.332005
    139     1.730319   .1593536    10.86    0.000     1.417982    2.042656
    140    -.3696904   .1602825    -2.31    0.021    -.6838479    -.055533
    141     .1468877    .159575     0.92    0.357     -.165883    .4596584
    142     .3556635   .1622465     2.19    0.028     .0376567    .6736703
    143     .9430713   .1662872     5.67    0.000     .6171446    1.268998
    144    -1.238555   .1682256    -7.36    0.000    -1.568281   -.9088292
    145    -.6601735   .1676607    -3.94    0.000    -.9887924   -.3315547
    146     -.035841   .1550907    -0.23    0.817    -.3398224    .2681404
    147     .4189803   .1750731     2.39    0.017     .0758329    .7621277
    148    -1.994363   .1807396   -11.03    0.000    -2.348617    -1.64011
    149    -1.386854   .1809851    -7.66    0.000    -1.741589   -1.032119
    150    -.6422426   .1771769    -3.62    0.000    -.9895135   -.2949718
    151            0  (omitted)
                 
    _cons    3.724768   .1627825    22.88    0.000     3.405711    4.043826
        
    id     F(2693, 40192) =     14.192    0.000        (2694 categories)

    If I use instead "reghdfe", I get the following output, with one dummy omitted:



    Code:
    . reghdfe y dumm*,absorb(id year)
    (dropped 32 singleton observations)
    (converged in 7 iterations)
    note: dumm11 omitted because of collinearity
    
    HDFE Linear regression    Number of obs   =     42,896
    Absorbing 2 HDFE groups    F(  23,  40192) =       6.36
        Prob > F        =     0.0000
        R-squared       =     0.4957
        Adj R-squared   =     0.4618
        Within R-sq.    =     0.0036
        Root MSE        =     4.2764
    
        
    y       Coef.   Std. Err.      t    P>t     [95% Conf. Interval]
        
    dumm_13    1.466534   .4071696     3.60    0.000     .6684718    2.264596
    dumm_12    1.387095   .3852358     3.60    0.000     .6320241    2.142166
    dumm_11    1.820428   .3539591     5.14    0.000      1.12666    2.514196
    dumm_10    1.530504   .3209338     4.77    0.000     .9014666    2.159542
    dumm_9    .5063514    .289606     1.75    0.080    -.0612831    1.073986
    dumm_8     .467973   .2621949     1.78    0.074     -.045935     .981881
    dumm_7    .4067998    .241348     1.69    0.092    -.0662477    .8798474
    dumm_6    .5089955   .2089094     2.44    0.015     .0995282    .9184628
    dumm_5    .0279265   .2011369     0.14    0.890    -.3663064    .4221594
    dumm_4    .0309506   .1886372     0.16    0.870    -.3387826    .4006837
    dumm_3    .1946444   .1742638     1.12    0.264    -.1469167    .5362055
    dumm_2    .1892432   .1597645     1.18    0.236    -.1238989    .5023852
    dumm0    .2862224   .1483983     1.93    0.054    -.0046418    .5770865
    dumm1    .2677178   .1493352     1.79    0.073    -.0249827    .5604183
    dumm2    .3861526   .1534018     2.52    0.012     .0854816    .6868236
    dumm3    .2574268     .15638     1.65    0.100    -.0490816    .5639352
    dumm4    .3936252    .156271     2.52    0.012     .0873305    .6999199
    dumm5    .2740497   .1686489     1.62    0.104     -.056506    .6046055
    dumm6    .1211116   .1572343     0.77    0.441    -.1870713    .4292945
    dumm7    .3758694   .2076184     1.81    0.070    -.0310674    .7828061
    dumm8    .6765613   .2160116     3.13    0.002     .2531736    1.099949
    dumm9    .3940382   .2207188     1.79    0.074    -.0385758    .8266522
    dumm10    .1026452   .2301371     0.45    0.656    -.3484288    .5537192
    dumm11           0  (omitted)
        
    Absorbed     F(2680, 40192) =     14.534    0.000             (Joint test)
        
    
    Absorbed degrees of freedom:
        
    Absorbed FE   Num. Coefs.  =   Categories  -    Redundant      
        
    id          2662            2662    0      
    year            19              20    1
    If I cluster by firm, the problem seems to appear also with "areg". I would like to use "reghdfe", as I am planning to use multi-dimensional fixed-effects, but I would really like to plot all the coefficients, with just dumm_1 normalized to 0.

    Vincenzo

  • #2
    You'll often get a missing dummy because it is colinear (truly colinear) with the other dummies. Adding the fe's will change what is colinear.

    Comment


    • #3
      Thank you, I also had the feeling that there was some issue with collinearity. I'll try to figure out what went wrong.

      Comment

      Working...
      X