Hi All,
I am in the midst of running a regression with many fixed effects. As such, I am using the reghdfe command.
My specific question is as follows:
I am estimating an equation of employer wages as a function of employer ratings, and employer fixed effects. The dataset is by sector-year (the sector of the employee is specified (say coal production), along with the year the wages were recorded). I am considering augmenting the regression to include the effect of education (separate dummy variables for High School, College, None), fully interacted with year and sector effects). In essence, I am considering a fully flexible model which allows for heterogenous effects by sector-year-education, so that for example, the effect of high school on wages is different in 2007 in the coal sector, relative to different years, different schooling levels, and different sectors. As you can imagine, this saturated model contains a lot of dummy variables, and I am having trouble with the code as it is generating sets of superfluous variables.
Thus, far, this is what I have:
Although the estimation procedure works, it produces alongside it *separate* dummy variables for year effects and sector effects. These are not needed- all I care about are the interactions themselves. The regression procedure in other words produces along with it year dummies and sector dummies separately in addition to the interacted variables. Is there any way I can obviate the creation of these additional variables?
Thank you so much for all your help!!
I am in the midst of running a regression with many fixed effects. As such, I am using the reghdfe command.
My specific question is as follows:
I am estimating an equation of employer wages as a function of employer ratings, and employer fixed effects. The dataset is by sector-year (the sector of the employee is specified (say coal production), along with the year the wages were recorded). I am considering augmenting the regression to include the effect of education (separate dummy variables for High School, College, None), fully interacted with year and sector effects). In essence, I am considering a fully flexible model which allows for heterogenous effects by sector-year-education, so that for example, the effect of high school on wages is different in 2007 in the coal sector, relative to different years, different schooling levels, and different sectors. As you can imagine, this saturated model contains a lot of dummy variables, and I am having trouble with the code as it is generating sets of superfluous variables.
Thus, far, this is what I have:
Code:
egen fe=group( employer year sector) ///This generates the employer fixed effects by year, by sector reghdfe wages i*education##i.year##schooling*, absorb (beta=fe) ///The schooling variables are Schooling1, Schooling2 and Schooling3 respectively
Thank you so much for all your help!!
Comment