Hello stata community,
The following command produces the picture I have attached. I can tweak my comand but there is a certain segment I'm not able to understand here , and therefore instead of getting a connected line I'm getting only one point for both regressions.
This part of the regression I'm not understandg how I have to create with respect to my coding. Is it the interaction with time with groups of education and race. And, how they are translating to the keep command of coefplot where it mentions only this part
.
Like if I want to create a subsample of low education and high education should I create a time interaction variable with education like: i.edu##i.year , and should I use that in keep command (i.edu##i.year) of coefplot ? Is my understanding correct to produce a graph like following ?
The following command produces the picture I have attached. I can tweak my comand but there is a certain segment I'm not able to understand here , and therefore instead of getting a connected line I'm getting only one point for both regressions.
Code:
ib1965.year $inter_industry_long ib1.sex ib100.race
Code:
baselevels omitted keep(inter*)
Like if I want to create a subsample of low education and high education should I create a time interaction variable with education like: i.edu##i.year , and should I use that in keep command (i.edu##i.year) of coefplot ? Is my understanding correct to produce a graph like following ?
Code:
*low-education reghdfe ln_annual_wage covered_1966 ib1965.year $inter_industry_long ib1.sex ib100.race $covar [pw=weight] /// if covered_all & flag_employed & in_sample & inrange(age,25,55) & inlist(race,100,200) & inrange(year,1961,1980) & year!=1962 & inrange(educ,010,071) & !inlist(educ,000,999) /// , absorb(i.industry) vce(cluster industry) eststo aw_long_ls *high-education reghdfe ln_annual_wage covered_1966 ib1965.year $inter_industry_long ib1.sex ib100.race $covar [pw=weight] /// if covered_all & flag_employed & in_sample & inrange(age,25,55) & inlist(race,100,200) & inrange(year,1961,1980) & year!=1962 & inrange(educ,072,125) & !inlist(educ,000,999) /// , absorb(i.industry) vce(cluster industry) eststo aw_long_hs *output graph coefplot(aw_long_ls, baselevels omitted keep(inter*) label("Low-education") connect(direct) lcolor(mydeepblue) lw(medthick) msymbol(square) msize(medlarge) mcolor(mydeepblue) mlcolor(mydeepblue)) /// (aw_long_hs, baselevels omitted keep(inter*) label("High-education") connect(direct) lcolor(mydeepblue) lw(medthick) msymbol(square_hollow) msize(large) mcolor(mydeepblue) mlcolor(mydeepblue) ) /// , vertical levels(95) pstyle(matrix) noci /// yline(0, lstyle(major_grid)) ytitle("Estimated Effect on Log Annual Earnings", color(gs4)) /// ylabel(-0.1(.1).2,labsize(medsmall) labcolor(gs4)) graphregion(color(white)) /// xline(6.5, lcolor(myred)) yline(0,lcolor(gs7) lw(medthin)) xlabel(1 "1961" 5 "1965" 10 "1970" 15 "1975" 20 "1980") /// legend(order(1 "Low-education" 2 "High-education") ring(0) position(4) bmargin(large) color(gs1) c(1) region(col(white))) gr export "figures/aw_lshs.pdf", replace