Dear All,
I am trying plot the difference of two kernel densities over quantiles.
Here is what I am doing first:
So these are the male and female wage distributions. I want to plot the difference over various quantiles and obtain a graph like figure 3 in this paper:
https://www.sciencedirect.com/scienc...47596707000844
Here is what I have tried:
After this, I am unsure. Can someone please suggest the next steps or point to a more direct way of doing this?
Thanks in advance.
I am trying plot the difference of two kernel densities over quantiles.
Here is what I am doing first:
Code:
use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta, clear twoway (kdensity lnwage if female == 0 [aweight=wt]) (kdensity lnwage if female == 1 [aweight=wt]), ytitle(Density) xtitle(Log Hourly Wages) legend(order(1 "Male" 2 "Female"))
https://www.sciencedirect.com/scienc...47596707000844
Here is what I have tried:
Code:
kdensity lnwage if female == 0 [aweight=wt], gen(male_x male_d) kdensity lnwage if female == 1 [aweight=wt], gen(fem_x fem_d)
Thanks in advance.
Comment