Skip to content

wbo_only: Race: white only, black only, other

wbo_only title image

Description

wbo_only is the three-category race the individual for only White, only Black, 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 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
********************************************************************************
* wbo_only: White-only, Black-only, and other
********************************************************************************

gen byte wbo_only = .

if $monthlycps == 1 | $maycps == 1 {
    if tm(1973m1) <= $date & $date <= tm(1988m12) {
        replace wbo_only = 1 if race == 1 /* White */
        replace wbo_only = 2 if race == 2 /* Black */
        replace wbo_only = 3 if race == 3 /* Other */
    }
    if tm(1989m1) <= $date & $date <= tm(1993m12) {
        replace wbo_only = 1 if race == 1 /* White */
        replace wbo_only = 2 if race == 2 /* Black */
        replace wbo_only = 3 if 3 <= race & race <= 5
    }
    if tm(1994m1) <= $date & $date <= tm(1995m12) {
        replace wbo_only = 1 if perace == 1 /* White */
        replace wbo_only = 2 if perace == 2 /* Black */
        replace wbo_only = 3 if 3 <= perace & perace <= 5
    }
    if tm(1996m1) <= $date & $date <= tm(2002m12) {
        replace wbo_only = 1 if perace == 1 /* White */
        replace wbo_only = 2 if perace == 2 /* Black */
        replace wbo_only = 3 if 3 <= perace & perace <= 4
    }
    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 wbo_only = 1 if ptdtrace == 1 /* White */
        replace wbo_only = 2 if ptdtrace == 2 /* Black */
        replace wbo_only = 3 if 3 <= ptdtrace & ptdtrace <= 21
    }
    if tm(2012m5) <= $date {
        replace wbo_only = 1 if ptdtrace == 1 /* White */
        replace wbo_only = 2 if ptdtrace == 2 /* Black */
        replace wbo_only = 3 if 3 <= ptdtrace & ptdtrace <= 26
    }
}

lab var wbo_only "Race: white only, black only, other"
#delimit ;
lab define wbo_only
1 "White only"
2 "Black only"
3 "Other"
;
#delimit cr
lab val wbo_only wbo_only
notes wbo_only: Coding changes in 1989, 1996, 2003, 2012m5
notes wbo_only: 1973-1993 Unicon: race
notes wbo_only: 1994-2002 CPS: perace
notes wbo_only: 2003-present CPS: ptdtrace
Figure creation
keep if age >= 16 & age ~= .

gen byte white = wbo_only == 1 if wbo_only ~= .
gen byte black = wbo_only == 2 if wbo_only ~= .
gen byte other = wbo_only == 3 if wbo_only ~= .

gcollapse (mean) white black other [pw=basicwgt], by(year) fast
sum year
local maxyear = r(max)
foreach var of varlist white black 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 other year, ///
legend(off) ///
xlabel(1975(5)2020) ///
ylabel(0(20)60 80 "80%", angle(0) gmin gmax) ///
xtitle("") ytitle("") ///
lcolor("`color1'" "`color2'" "`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(`otheryvalue' `otherxvalue' "Other", color("`color4'") placement(e))
graph export ${variableimages}wbo_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.
***/