Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • margins after reghdfe - scaling of marginal effects

    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:

    Code:
    reghdfe sep c.w_ln_resc#c.age, absorb(persnr industry1_destatis quarter c.w_ln_resc#i.skill) vce(cluster betnr quarter)
    To see how the marginal effect of w_ln on sep differs depending on age, I use the marginsplot command:

    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)
    This is what I get:

    Click image for larger version

Name:	Graph_abs.png
Views:	1
Size:	45.9 KB
ID:	1660674

    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)
    I get
    Click image for larger version

Name:	Graph_fe.png
Views:	1
Size:	51.3 KB
ID:	1660675

    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
    Last edited by Nina Furbach; 20 Apr 2022, 09:45.
Working...
X