hello everyone,
I am working with survey data in my thesis to find out the effect of minimum wage in wage distribution.
but im still struggling to run data using stata. I want to make the same as the figure 4a in the Dinardo et al (1996) paper "Labor Market institution and th distribution of wages"
but still failed,
would u guys help me with this problem
regards
this is the program that I try to construct :
******;** do graph 4a) for all males;
replace wage=wage*65.8/104.3 if year88==1 /*transform to 1979 dollars*/
gen lwage=log(wage)
*to simplify the kernel density estimation, it will be estimate only at 200 values;
sum lwage, detail
gen xstep=(r(max)-r(min))/200
*kwage will be the wage at which the density is estimated;
gen kwage=r(min)+(_n-1)*xstep if _n<=200
gen hweight=eweight*uhrswk /*hours weighted*/
kdensity lwage [aweight=hweight] if year88==1 , at(kwage) gauss width(0.065) generate(w88 fd88) nograph
kdensity lwage [aweight=hweight] if year88==0 , at(kwage) gauss width(0.065) generate(w79 fd79) nograph
label var fd88 "Men 1988"
label var fd79 "Men 1979"
label var kwage "Log(Wage)"
graph twoway (connected fd88 kwage if kwage>=0 & kwage<=3.91, msymbol(i) clwidth(medium) ) (connected fd79 kwage if kwage>=0 & kwage<=3.91, msymbol(i) lpattern(dash) clwidth(medium) ), xlabel(.69 1.61 2.3 3.22) xline(0.748 1.065)scheme(sj) saving(dflfig4a,replace)
**construct figure 4b**
gen belowm=cond(lwage<=1.065,1,0)
probit belowm ee1-ee15 exper exper2 exper3 exper4 edex educ reg1-reg3 ind1-ind18 occ1 occ2 nonwhite partt married smsa [pweight=eweight] if belowm==1
predict py88 if belowm==1, p
summ py88 , detail
summ year88 [weight=eweight]
gen pbar=r(mean)
gen phix=(py88/(1-py88))*((1-pbar)/pbar)
replace phix=phix*hweight /*sample and hours weighted*/
kdensity lwage [aweight=phix] if year==1, at(kwage) gauss width(0.065) generate(w88m79 fd88m79) nograph
graph twoway (connected fd88 kwage if kwage>=0 & kwage<=3.91, msymbol(i) clwidth(medium) ) (connected fd88m79 kwage if kwage>=0 & kwage<=3.91, msymbol(i) lpattern(dash) clwidth(medium) ), xlabel(.69 1.61 2.3 3.22) xline(0.748 1.065) scheme(sj)
I am working with survey data in my thesis to find out the effect of minimum wage in wage distribution.
but im still struggling to run data using stata. I want to make the same as the figure 4a in the Dinardo et al (1996) paper "Labor Market institution and th distribution of wages"
but still failed,
would u guys help me with this problem
regards
this is the program that I try to construct :
******;** do graph 4a) for all males;
replace wage=wage*65.8/104.3 if year88==1 /*transform to 1979 dollars*/
gen lwage=log(wage)
*to simplify the kernel density estimation, it will be estimate only at 200 values;
sum lwage, detail
gen xstep=(r(max)-r(min))/200
*kwage will be the wage at which the density is estimated;
gen kwage=r(min)+(_n-1)*xstep if _n<=200
gen hweight=eweight*uhrswk /*hours weighted*/
kdensity lwage [aweight=hweight] if year88==1 , at(kwage) gauss width(0.065) generate(w88 fd88) nograph
kdensity lwage [aweight=hweight] if year88==0 , at(kwage) gauss width(0.065) generate(w79 fd79) nograph
label var fd88 "Men 1988"
label var fd79 "Men 1979"
label var kwage "Log(Wage)"
graph twoway (connected fd88 kwage if kwage>=0 & kwage<=3.91, msymbol(i) clwidth(medium) ) (connected fd79 kwage if kwage>=0 & kwage<=3.91, msymbol(i) lpattern(dash) clwidth(medium) ), xlabel(.69 1.61 2.3 3.22) xline(0.748 1.065)scheme(sj) saving(dflfig4a,replace)
**construct figure 4b**
gen belowm=cond(lwage<=1.065,1,0)
probit belowm ee1-ee15 exper exper2 exper3 exper4 edex educ reg1-reg3 ind1-ind18 occ1 occ2 nonwhite partt married smsa [pweight=eweight] if belowm==1
predict py88 if belowm==1, p
summ py88 , detail
summ year88 [weight=eweight]
gen pbar=r(mean)
gen phix=(py88/(1-py88))*((1-pbar)/pbar)
replace phix=phix*hweight /*sample and hours weighted*/
kdensity lwage [aweight=phix] if year==1, at(kwage) gauss width(0.065) generate(w88m79 fd88m79) nograph
graph twoway (connected fd88 kwage if kwage>=0 & kwage<=3.91, msymbol(i) clwidth(medium) ) (connected fd88m79 kwage if kwage>=0 & kwage<=3.91, msymbol(i) lpattern(dash) clwidth(medium) ), xlabel(.69 1.61 2.3 3.22) xline(0.748 1.065) scheme(sj)