Dear Statalisters,
I have a scaling problem with the margins plot of a linear fixed effects regression that I have not managed to solve by looking at previous posts. I apologize in case I overlooked similar issues that had already been discussed.
I have a quarterly dataset of individuals across firms. I am interested in the marginal effect of wage on a separation indicator (that is 1 when the worker leaves the firm). I am running the following regression where I include individual, industry and quarter fixed effects, and further allow for skill-specific wage coefficients:
To see how the marginal effect of w_ln on sep differs depending on age, I use the marginsplot command:
This is what I get:

When I instead include the interaction c.w_ln_resc#i.skill without absorbing it, I get a very different result. With the followig code
I get

As far as I understand, the slope of the two plots can differ because when absorbing the interaction c.w_ln_resc#i.skill, the margins command does not adjust for the fact that the mean of skill differs across ages. What I however do not understand is why also the total level of the marginal effect is so different.
Any insights would be much appreciated.
Thank you,
Nina
I have a scaling problem with the margins plot of a linear fixed effects regression that I have not managed to solve by looking at previous posts. I apologize in case I overlooked similar issues that had already been discussed.
I have a quarterly dataset of individuals across firms. I am interested in the marginal effect of wage on a separation indicator (that is 1 when the worker leaves the firm). I am running the following regression where I include individual, industry and quarter fixed effects, and further allow for skill-specific wage coefficients:
Code:
reghdfe sep c.w_ln_resc#c.age, absorb(persnr industry1_destatis quarter c.w_ln_resc#i.skill) vce(cluster betnr quarter)
Code:
margins, dydx(w_ln_resc) over(age) post vsquish
marginsplot, xdimension(age) graphregion(color(white) lcolor(none)) recast(line) ///
recastci(rarea) ciopts(fintensity(15) lcolor(white)) ytitle(labor supply elasticity)
When I instead include the interaction c.w_ln_resc#i.skill without absorbing it, I get a very different result. With the followig code
Code:
reghdfe sep c.w_ln_resc#c.age c.w_ln_resc#i.skill, ///
absorb(persnr industry1_destatis quarter) vce(cluster betnr quarter)
margins, dydx(w_ln_resc) over(age) post vsquish
marginsplot, xdimension(age) graphregion(color(white) lcolor(none)) recast(line) ///
recastci(rarea) ciopts(fintensity(15) lcolor(white)) ytitle(labor supply elasticity)
As far as I understand, the slope of the two plots can differ because when absorbing the interaction c.w_ln_resc#i.skill, the margins command does not adjust for the fact that the mean of skill differs across ages. What I however do not understand is why also the total level of the marginal effect is so different.
Any insights would be much appreciated.
Thank you,
Nina
