Skip to content

wbho_only: Race: white only, black only, hispanic, other

wbho_only title image

Description

wbho_only is the four-category race the individual for only White, only Black, Hispanic, and all Other categories.

Availability

Sample Years
Basic All years
May All years
ORG All years

Warning

This variable is mostly consistent over time, but there are race/ethnicity coding changes in 1989, 1996, 2003, 2012m5, and 2014. See the race/ethnicity methodology for more details.

Values

Value Label
1 White only
2 Black only
3 Hispanic
4 Other

Detailed comments

Significant race/ethnicity coding changes occur in 1989, 1996, 2003, 2012m5, and 2014.

In the figure above, 1973-1975 data are from the EPI CPS May extracts, and 1976-2023 data are from the EPI CPS Basic Monthly extracts.

Code

Variable creation
********************************************************************************
* wbho_only: White-only, Black-only, Hispanic, and other
********************************************************************************
gen byte wbho_only = .

if $monthlycps == 1 | $maycps == 1 {
    if tm(1973m1) <= $date & $date <= tm(1988m12) {
        replace wbho_only = 1 if race == 1 /* White */
        replace wbho_only = 2 if race == 2 /* Black */
        replace wbho_only = 4 if race == 3 /* Other */
      * Hispanic ethnicity
        replace wbho_only = 3 if hispanic == 1
    }
    if tm(1989m1) <= $date & $date <= tm(1993m12) {
        replace wbho_only = 1 if race == 1 /* White */
        replace wbho_only = 2 if race == 2 /* Black */
        replace wbho_only = 4 if (3 <= race & race <= 5) /* Other */
        * Hispanic ethnicity
        replace wbho_only = 3 if hispanic == 1
    }
    if tm(1994m1) <= $date & $date <= tm(1995m12) {
        replace wbho_only = 1 if perace == 1 /* White */
        replace wbho_only = 2 if perace == 2 /* Black */
        replace wbho_only = 4 if 3 <= perace & perace <= 5 /* Other */
        * Hispanic ethnicity
        replace wbho_only = 3 if hispanic == 1
    }
    if tm(1996m1) <= $date & $date <= tm(2002m12) {
        replace wbho_only = 1 if perace == 1 /* White */
        replace wbho_only = 2 if perace == 2 /* Black */
        replace wbho_only = 4 if (3 <= perace & perace <= 4) /* Other */
        * Hispanic ethnicity
        replace wbho_only = 3 if hispanic == 1
    }
    if tm(2003m1) <= $date & $date <= tm(2012m4) {
        * May 2004- June 2005: ptdtrace variable renamed to prdtrace
        if tm(2004m5) <= $date & $date <= tm(2005m7) {
            *ptdtrace will exist due to generate_wbho.do. else:
            *gen ptdtrace = prdtrace
        }
        replace wbho_only = 1 if ptdtrace == 1 /* White */
        replace wbho_only = 2 if ptdtrace == 2 /* Black */
        replace wbho_only = 4 if 3 <= ptdtrace & ptdtrace <= 21 /* Other */
        * Hispanic ethnicity
        replace wbho_only = 3 if hispanic == 1
    }
    if tm(2012m5) <= $date {
        replace wbho_only = 1 if ptdtrace == 1 /* White */
        replace wbho_only = 2 if ptdtrace == 2 /* Black */
        replace wbho_only = 4 if 3 <= ptdtrace & ptdtrace <= 26 /* Other */
        * Hispanic ethnicity
        replace wbho_only = 3 if hispanic == 1
    }
}

lab var wbho_only "Race: white only, black only, hispanic, other"
#delimit ;
lab define wbho_only
1 "White only"
2 "Black only"
3 "Hispanic"
4 "Other"
;
#delimit cr
lab val wbho_only wbho_only
notes wbho_only: Racial and ethnic categories are mutually exclusive
notes wbho_only: Coding changes in 1989, 1996, 2003, 2012m5
notes wbho_only: Hispanic definition from variable hispanic
notes wbho_only: 1973-1993 Unicon: race
notes wbho_only: 1994-2002 CPS: perace
notes wbho_only: 2003-present CPS: ptdtrace
Figure creation
keep if age >= 16 & age ~= .

cap drop hispanic

gen byte white = wbho_only == 1 if wbho_only ~= .
gen byte black = wbho_only == 2 if wbho_only ~= .
gen byte hispanic = wbho_only == 3 if wbho_only ~= .
gen byte other = wbho_only == 4 if wbho_only ~= .

gcollapse (mean) white black hispanic other [pw=basicwgt], by(year) fast
sum year
local maxyear = r(max)
foreach var of varlist white black hispanic other {
    replace `var' = `var' * 100
    sum `var' if year == `maxyear'
    local `var'yvalue = r(mean)
    local `var'xvalue = `maxyear' + 0.5
}

local color1 228 26 28
local color2 55 126 184
local color3 77 175 74
local color4 152 78 163

line white black hispanic other year, ///
legend(off) ///
xlabel(1975(5)2020) ///
ylabel(0(20)60 80 "80%", angle(0) gmin gmax) ///
xtitle("") ytitle("") ///
lcolor("`color1'" "`color2'" "`color3'" "`color4'") ///
graphregion(color(white) margin(r=17)) plotregion(color(white)) ///
title("Share of population by race/ethnicity, ages 16 and over", size(medium)) ///
text(`whiteyvalue' `whitexvalue' "White only", color("`color1'") placement(e)) ///
text(`blackyvalue' `blackxvalue' "Black only", color("`color2'") placement(e)) ///
text(`hispanicyvalue' `hispanicxvalue' "Hispanic", color("`color3'") placement(e)) ///
text(`otheryvalue' `otherxvalue' "Other", color("`color4'") placement(e))
graph export ${variableimages}wbho_only_titleimage.svg, replace

/***
Significant race/ethnicity coding changes occur in 1989, 1996, 2003, 2012m5, and 2014.  

In the figure above, 1973-1975 data are from the EPI CPS May extracts, and 1976-2023 data are from the EPI CPS Basic Monthly extracts.
***/