I am estimating a triple Difference-in-Differences model in STATA to analyse the effects of a policy that was implemented in a staggered way in a country’s provinces over multiple years. The the differences are:
- time: pre/post
- regions: different regions a re treated at different points in time
- subgroup of population: say I want to estimate the effect of the policy on the population with a characteristic C vs. the rest of the population.
Array
Where C_i is whether individual I has the characteristic C, \phi_j is a set of municipality fixed effects, and \phi_t are year fixed effects. Since Treated\_mun_{jt} is a time-varying dummy for whether municipality j is treated in t, the first line is the triple interaction. The second line are the simple interactions and the third line contain the main effects.
The coefficients that I am really interested in are \beta (triple interaction) and \delta (main effect of characteristic C), since I want to see by how much the gap (\delta) closes with the implementation of the policy (\beta).
The problem: Since I have data in the millions and a large amount of fixed effects it takes a relatively long time to estimate this via the usual reg command in STATA. So I turned to reghdfe which seems to be well suited for this estimation. However, whatever way of specifying the command I cannot get it to show me the \delta coefficient. I have tried the following:
1) Leaving the C main effect outside of the absorb() option:
Code:
reghdfe y 1.C#1.Treated_mun 1.C , absorb(i.year##i.municipality i.year#i.C i.municipality#i.C) vce(cl municipality)
2) Including the C main effect in the absorb() option and using the save FE feature:
Code:
reghdfe y 1.C#1.Treated_mun, absorb( C_FE=1.C i.year##i.municipality i.year#i.C i.municipality#i.C) vce(cl municipality)
Here the issue is that I don’t quite understand how the FE is saved. As it is a binary variable I am expecting a single value for the individuals with characteristic C. Instead what reghdfe saves are two values one for individuals with characteristic C and one for individuals without characteristic C. They don’t add up or similar to the FE I am getting when using the reg command on the same data. How do I interpret the saved FE?
Does anybody how I can solve this issue? Doesn’t matter whether it’s via fixing the first or the second reghdfe specification or any other way of speeding up the estimation procedure significantly.
Thanks a lot!
Best,
Laurenz
0 Response to reghdfe: saving fixed effect + its standard error
Post a Comment