Hi!
I am trying to create a marginsplot on top of a scatter plot. The problem I have is with the layering of the two plots. The marginsplot is hidden behind the scatter plot. Ideally I would like the marginsplot to be the top layer.
I am using the following code:
xtreg swl0_20 c.inntekt100k##c.inntekt100k age i.sf12t01 i.intervjurunde, vce (cluster ref_nr) fe
margins, at(inntekt100k=(-3.5(1)109.6))
marginsplot, recast(line) recastci(rarea) addplot(scatter swl0_20 inntekt100k, mcolor(%20) jitter(5))
graph export "Eksamen/figurer/Curve_FE_margins.png", replace
The output is as follows:
I am trying to create a marginsplot on top of a scatter plot. The problem I have is with the layering of the two plots. The marginsplot is hidden behind the scatter plot. Ideally I would like the marginsplot to be the top layer.
I am using the following code:
xtreg swl0_20 c.inntekt100k##c.inntekt100k age i.sf12t01 i.intervjurunde, vce (cluster ref_nr) fe
margins, at(inntekt100k=(-3.5(1)109.6))
marginsplot, recast(line) recastci(rarea) addplot(scatter swl0_20 inntekt100k, mcolor(%20) jitter(5))
graph export "Eksamen/figurer/Curve_FE_margins.png", replace
The output is as follows:
Comment