Hi Everyone,
I am running regressions using individual and state times year fixed effects. The data is at the individual (person) - year level. The dependent variable is a binary variable that varies by individual - year and the variable of interest is continuous and varies annually. When using the absorb option with reghdfe, the variable of interest gets omitted when adding the state times year fixed effects. However, when I use indicators for state times year combinations, the variable is not omitted. Could someone help me understand what the difference is in these two approaches, specifically why the variable of interest is omitted in the first case and not the second? The code and results are posted below:
I am running regressions using individual and state times year fixed effects. The data is at the individual (person) - year level. The dependent variable is a binary variable that varies by individual - year and the variable of interest is continuous and varies annually. When using the absorb option with reghdfe, the variable of interest gets omitted when adding the state times year fixed effects. However, when I use indicators for state times year combinations, the variable is not omitted. Could someone help me understand what the difference is in these two approaches, specifically why the variable of interest is omitted in the first case and not the second? The code and results are posted below:
Code:
egen state_time_fe=group(state year)
//METHOD 1
reghdfe hstock ffr inflation age educ inc_win_sc wealth_exstock_sc disp_inc_g_xtile [pw=wgt],///
a(id state_time_fe) cluster(sample_stratum)
HDFE Linear regression Number of obs = 340,008
Absorbing 2 HDFE groups F( 4, 62) = 37.50
Statistics robust to heteroskedasticity Prob > F = 0.0000
R-squared = 0.5542
Adj R-squared = 0.4960
Within R-sq. = 0.0125
Number of clusters (sample_stratum) = 63 Root MSE = 0.2826
(Std. err. adjusted for 63 clusters in sample_stratum)
-----------------------------------------------------------------------------------
| Robust
hstock | Coefficient std. err. t P>|t| [95% conf. interval]
------------------+----------------------------------------------------------------
ffr | 0 (omitted)
inflation | 0 (omitted)
age | .0020165 .0002516 8.01 0.000 .0015135 .0025196
educ | .0076792 .0013636 5.63 0.000 .0049535 .0104049
inc_win_sc | .6274015 .0896416 7.00 0.000 .4482105 .8065924
wealth_exstock_sc | .0183634 .0060017 3.06 0.003 .0063661 .0303606
disp_inc_g_xtile | 0 (omitted)
_cons | -.0274445 .0241652 -1.14 0.260 -.0757501 .0208611
-----------------------------------------------------------------------------------
Absorbed degrees of freedom:
-------------------------------------------------------+
Absorbed FE | Categories - Redundant = Num. Coefs |
---------------+---------------------------------------|
id | 38673 38673 0 *|
state_time_fe | 573 0 573 |
-------------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation
//METHOD 2
reghdfe hstock ffr inflation age educ inc_win_sc wealth_exstock_sc disp_inc_g_xtile i.state_time_fe [pw=wgt] ,///
a(id) cluster(sample_stratum)
HDFE Linear regression Number of obs = 340,008
Absorbing 1 HDFE group F( 576, 62) = .
Statistics robust to heteroskedasticity Prob > F = .
R-squared = 0.5542
Adj R-squared = 0.4960
Within R-sq. = 0.0488
Number of clusters (sample_stratum) = 63 Root MSE = 0.2826
(Std. err. adjusted for 63 clusters in sample_stratum)
-----------------------------------------------------------------------------------
| Robust
hstock | Coefficient std. err. t P>|t| [95% conf. interval]
------------------+----------------------------------------------------------------
ffr | .033729 .0197572 1.71 0.093 -.005765 .073223
inflation | 11.40619 23.6248 0.48 0.631 -35.8191 58.63148
age | .0020165 .0002516 8.01 0.000 .0015135 .0025196
educ | .0076792 .0013636 5.63 0.000 .0049535 .0104049
inc_win_sc | .6274015 .0896416 7.00 0.000 .4482105 .8065924
wealth_exstock_sc | .0183634 .0060017 3.06 0.003 .0063661 .0303606
disp_inc_g_xtile | -.3981373 1.93887 -0.21 0.838 -4.273882 3.477608
|
state_time_fe |
2 | -.0113447 .1488725 -0.08 0.940 -.3089365 .2862471
3 | .1940478 .1602658 1.21 0.231 -.1263189 .5144145
4 | -.1372389 .2069215 -0.66 0.510 -.550869 .2763912
5 | -.2478486 .1370385 -1.81 0.075 -.5217848 .0260875
6 | .2692664 .5907969 0.46 0.650 -.9117197 1.450252
7 | -.1412744 .1361649 -1.04 0.304 -.4134641 .1309153
8 | .0990564 .2175213 0.46 0.650 -.3357626 .5338753
9 | .2491288 .609815 0.41 0.684 -.969874 1.468132
...
NOTE: 573 values of state_time_fe (3 omitted because of collinearity)

Comment