************ ***** Invoked by: bhps_educ_master*.do ************ ******************* ** Graphical summary: use $path9\bh_temp.dta, clear collapse (mean) loc1 (count) ncase=loc1 [aweight=zxrwght] /// if !missing(midage) & !missing(educ1), by(wave educ1) rename educ1 educ gen edtype=1 summarize sav $path9\bit1.dta, replace use $path9\bh_temp.dta, clear collapse (mean) loc1 (count) ncase=loc1 [aweight=zxrwght] /// if !missing(midage) & !missing(educ2), by(wave educ2) rename educ2 educ gen edtype=2 summarize sav $path9\bit2.dta, replace use $path9\bit1.dta, clear append using $path9\bit2.dta gen loc1e1=loc1 if educ==0 & edtype==1 gen loc1e2=loc1 if educ==1 & edtype==1 replace wave=wave+0.2 if educ==1 & edtype==1 gen loc1e4=loc1 if educ==1 & edtype==2 replace wave=wave+0.4 if educ==1 & edtype==2 graph twoway (bar loc1e1 wave, bcolor(gs8) barwidth(0.3) ) /// (bar loc1e2 wave, bcolor(gs12) barwidth(0.3) ) /// (bar loc1e4 wave, bcolor(gs14) barwidth(0.3) ) , /// title("Prefers to move home, by educational qualifications and year", span) /// note("Souce: BHPS waves 1-17, ages 30-50 only, weighted with [xrwght].") /// legend(label(1 "No degree or diploma") label(2 "Degree or diploma") /// label(3 "Degree") ) graph export $graphs\moving_home_views1.emf, as(emf) replace ******************************************************************