OpenSDP Analysis / Human Capital Analysis: Recruitment / Examine the Distribution of Teachers and Students by Race
Compares the shares of all teachers, newly hired teachers, and students by race.
tidschool_yeart_new_hiret_race_ethnicitysids_race_ethnicityYou may wish to replicate this analysis for specific schools or groups of schools.
matrix race = J(4, 4, .)
matrix colnames race = race teacher new_teacher studentuse "${analysis}\Teacher_Year_Analysis.dta", clear
isid tid school_yeargen t_black = (t_race_ethnicity == 1)
gen t_asian = (t_race_ethnicity == 2)
gen t_latino = (t_race_ethnicity == 3)
gen t_white = (t_race_ethnicity == 5)keep if school_year == 2015
keep if !missing(t_race_ethnicity)
keep if !missing(t_new_hire)tab school_year t_race_ethnicity, mi
tab t_new_hire t_white, mi row
tab t_new_hire t_black, mi row
tab t_new_hire t_latino, mi row
tab t_new_hire t_asian, mi rowsumm tid
local teacher_years = string(r(N), "%6.0fc")
preserve 
    bys tid: keep if _n == 1
    summ tid
    local unique_teachers = string(r(N), "%6.0fc")
restorelocal i = 1
foreach race of varlist t_white t_black t_latino t_asian {
    matrix race[`i', 1] = `i'
    summ `race'
    matrix race[`i', 2] = 100 * r(mean)
    summ `race' if t_new_hire == 1
    matrix race[`i', 3] = 100 * r(mean)
    local i = `i' + 1
}use "${analysis}\Student_School_Year.dta", clearkeep sid school_year s_race_ethnicity
duplicates drop
isid sid school_yearkeep if school_year == 2015
keep if !missing(s_race_ethnicity)tab school_year s_race_ethnicity, migen s_black = (s_race_ethnicity == 1)
gen s_asian = (s_race_ethnicity == 2)
gen s_latino = (s_race_ethnicity == 3)
gen s_white = (s_race_ethnicity == 5)summ sid
local student_years = string(r(N), "%9.0fc")
preserve
    bys sid: keep if _n == 1
    summ sid
    local unique_students = string(r(N), "%9.0fc")
restorelocal i = 1
foreach race of varlist s_white s_black s_latino s_asian{
    summ `race'
    matrix race[`i', 4] = 100 * r(mean)
    local i = `i' + 1
}clear 
svmat race, names(col)#delimit ;
graph bar teacher new_teacher student, 
    bar(1, fcolor(dknavy) lcolor(dknavy)) 
    bar(2, fcolor(dknavy*.7) lcolor(dknavy*.7)) 
    bar(3, fcolor(maroon) lcolor(maroon))
    blabel(bar, position(outside) color(black) format(%10.0f))
    over(race, relabel(1 "White" 2 "Black" 3 "Latino" 4 "Asian") 
        label(labsize(medsmall)))
    title("Share of Teachers and Students", span)
    subtitle("by Race", span)
    ytitle("Percent", size(medsmall))
    ylabel(0(20)100, labsize(medsmall) nogrid)
    legend(order(1 "All Teachers" 2 "Newly Hired Teachers" 3 "Students")
        position(6) symxsize(2) symysize(2) rows(1)
        size(medsmall) region(lstyle(none) lcolor(none) color(none)))
    graphregion(color(white) fcolor(white) lcolor(white))
    plotregion(color(white) fcolor(white) lcolor(white) margin(5 5 2 0))
    note(" " "Notes: Sample includes teachers and students in the 2014-15 school year, 
with `unique_teachers' unique teachers and `unique_students' unique students.", size(vsmall) 
span);      
#delimit crgraph export "${graphs}/Share_Teachers_Students_by_Race.emf", replace
graph save "${graphs}/Share_Teachers_Students_by_Race.gph", replacePrevious Analysis: Compare the Shares of New Hires Across School Poverty Quartiles