I am having a confusing problem -- when I ran my code last week, everything was normal. Now, not so much.
I have a crossectional data set (DHS for Colombia), and am running a diff-in-diff specification. I have three years of data (2005, 2010, 2015), and tabbing my "year" variable confirms this. My "post" variable is equal to 1 if year == 2015. I have a "policy" variable which is equal to one for certain geographic departments in the treated group, and my difference in difference variable is did = post*policy.
When I run a regression, I am including department and year fixed effects. As I also have to cluster at the department level, the power for this group goes away, which should leave three degrees of freedom, one for each year. Now there are only two, and I'm not sure why. This first appeared when I re-ran all of my code from the start of my data cleaning file through to the regressions, but I'm not sure why this would change. When I ran it last week, there were three df, which I noticed when I plotted an event study (all three years showed up, now only two show up).
Why would this happen? Please let me know if more explanation or code is needed. I am using reghdfe; the following is the basic format: reghdfe y did $controls [pweight = wtvar], absorb(dept year) cluster(dept)
I actually have seven different outcomes, so I am representing them just by "y". Thank you all!
0 Response to Category omitted from fixed effect when running regression
Post a Comment