Hello, I am looking for clarification on post-estimation margins command after reghdfe. I am running a pretty standard Diff-in-Diff (effect of a state-level insurance policy change on cancer screening rates in younger vs older individuals) using reghdfe, and want to confirm that I am using/interpreting the margins command correctly.
When I run the margins command (albeit with the 'noestimcheck' option, but I think is kosher for calculating marginal effects), it omits one category of individual. This because it is collinear with the fixed effects, yes?
When I do it a different way, it tells me that the predicted change for the older group is 0. This "0" predicted change is garbage, similarly because it is collinear with the fixed effects, yes?
So, do I understand correctly that there is no way to get the marginal effect of pre vs post for the older group? Thanks
Code:
reghdfe screen i.age##i.post i.RACE i.EDUC , absorb(state_num year month) vce(cluster state_num) (MWFE estimator converged in 4 iterations) note: 1bn.post is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09) HDFE Linear regression Number of obs = 2,056,819 Absorbing 3 HDFE groups F( 10, 14) = 776.20 Statistics robust to heteroskedasticity Prob > F = 0.0000 R-squared = 0.0049 Adj R-squared = 0.0049 Within R-sq. = 0.0042 Number of clusters (state_num) = 15 Root MSE = 0.2780 (Std. Err. adjusted for 15 clusters in state_num) -------------------------------------------------------------------------------------- | Robust screen | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------------------+---------------------------------------------------------------- age | older | -.0260963 .0022391 -11.65 0.000 -.0308987 -.0212939 1.post | 0 (omitted) | age#post | older#1 | .0032939 .00066 4.99 0.000 .0018784 .0047094 | RACE | Black, NH | .0078715 .0007183 10.96 0.000 .0063309 .0094121 Hispanic | .0222411 .001537 14.47 0.000 .0189446 .0255376 Asian | .043212 .00239 18.08 0.000 .0380859 .0483381 | | EDUC | HS | -.0067054 .0008325 -8.05 0.000 -.0084909 -.00492 SOME COLLEGE | -.0154122 .0009276 -16.61 0.000 -.0174018 -.0134226 BACHELOR/GRADUATE | -.0364558 .0016695 -21.84 0.000 -.0400365 -.0328751 | _cons | .0947413 .0005795 163.48 0.000 .0934983 .0959843 -------------------------------------------------------------------------------------- Absorbed degrees of freedom: -----------------------------------------------------+ Absorbed FE | Categories - Redundant = Num. Coefs | -------------+---------------------------------------| state_num | 15 15 0 *| year | 9 1 8 | month | 12 1 11 | -----------------------------------------------------+ * = FE nested within cluster; treated as redundant for DoF computation
Code:
. margins age, dydx(post) noestimcheck Conditional marginal effects Number of obs = 2,056,819 Model VCE : Robust -------------------------------------------------------------------------------- | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] ---------------+---------------------------------------------------------------- 1.post | age | older | 0 (omitted) younger | .0032939 .00066 4.99 0.000 .0020004 .0045875 --------------------------------------------------------------------------------
Code:
. margins age#post, noestimcheck Predictive margins Number of obs = 2,056,819 Model VCE : Robust Expression : Linear prediction, predict() -------------------------------------------------------------------------------------- | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] ---------------------+---------------------------------------------------------------- age#post | older#0 | .0945361 .000978 96.66 0.000 .0926192 .096453 older#1 | .0945361 .000978 96.66 0.000 .0926192 .096453 younger#0 | .0684398 .0012712 53.84 0.000 .0659483 .0709314 younger#1 | .0717337 .0017257 41.57 0.000 .0683514 .0751161 --------------------------------------------------------------------------------------
Comment