Skip to content

wbhao: Race/ethnicity, including Asian

wbhao title image

Description

wbhao is the five-category race or ethnicity of the individual, including Asian.

Availability

Sample Years
Basic 1989 - present
ORG 1989 - present

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
2 Black
3 Hispanic
4 Asian
5 Other

Detailed comments

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

Code

Variable creation
********************************************************************************
* Race: WBHAO
********************************************************************************
* follow coding at http://ceprdata.org

gen byte wbhao = .

if $monthlycps == 1 {
    if tm(1989m1) <= $date & $date <= tm(1993m12) {
        replace wbhao = 1 if race == 1
        replace wbhao = 2 if race == 2
        replace wbhao = 4 if race == 4
        replace wbhao = 5 if race == 3 | race == 5
        * Hispanic ethnicity
        replace wbhao = 3 if hispanic == 1
    }
    if tm(1994m1) <= $date & $date <= tm(2002m12) {
        replace wbhao = 1 if perace == 1
        replace wbhao = 2 if perace == 2
        replace wbhao = 4 if perace == 4
        replace wbhao = 5 if perace == 3 | perace == 5
        * Hispanic ethnicity
        replace wbhao = 3 if hispanic == 1
    }
    if tm(2003m1) <= $date & $date <= tm(2012m4) {
        * May 2004- July 2005: ptdtrace variable renamed to ptdtrace
        if tm(2004m5) <= $date & $date <= tm(2005m7) {
            *ptdtrace will exist due to generate_wbho.do. else:
            *gen ptdtrace = prdtrace
        }
        replace wbhao=1 if ptdtrace==1 /* white only */
        replace wbhao=2 if ptdtrace==2 /* black only */
        replace wbhao=2 if ptdtrace==6 /* black-white */ | ptdtrace==10 /*
        */ /* black-AI */ | ptdtrace==11 /* black-asian */ | ptdtrace==12 /*
        */ /* black-HP */ | ptdtrace==15 /* W-B-AI */ | ptdtrace==16 /* W-B-A */ /*
        */ | ptdtrace==19 /* W-B-AI-A */
        replace wbhao=4 if ptdtrace==4 | ptdtrace==5 /* asian & HP */ /*
        */ | ptdtrace==8 /* white-asian */ | ptdtrace==9 /* white-HP */ | ptdtrace==13 /*
        */ /* AI-Asian */ | ptdtrace==14 /* asian-HP */ | ptdtrace==17 /* W-AI-A */ /*
        */ | ptdtrace==18 /* W-A-HP */
        replace wbhao=5 if ptdtrace==3 /* AI only */ | ptdtrace==7 /* white-AI */ /*
        */ | ptdtrace==20 /* 2 or 3 races */ | ptdtrace==21 /* 4 or 5 races */
        * Hispanic ethnicity
        replace wbhao = 3 if hispanic == 1
    }
    if tm(2012m5) <= $date {
        replace wbhao=1 if ptdtrace==1 /* white only */
        replace wbhao=2 if ptdtrace==2 /* black only */
        replace wbhao=2 if ptdtrace==6 /* black-white */ | ptdtrace==10 /*
        */ /* black-AI */ | ptdtrace==11 /* black-asian */ | ptdtrace==12 /*
        */ /* black-HP */ | ptdtrace==16 /* W-B-AI */ | ptdtrace==17 /* W-B-A */ /*
        */ | ptdtrace==18 /* W-B-HP */ | ptdtrace==22 /* B-AI-A */ /*
        */ | ptdtrace==23 /* W-B-AI-A */
        replace wbhao=4 if  ptdtrace==4 | ptdtrace==5 /* asian & hawaiian/pacific islander */ /*
        */ | ptdtrace==8 /* white-asian */ | ptdtrace==9 /* white-HP */ | ptdtrace==13 /*
        */ /* AI-Asian */ | ptdtrace==14 /*AI-HP */ | ptdtrace==15 /* asian-HP */ /*
        */ | ptdtrace==19 /* W-AI-A */ | ptdtrace==20 /* W-AI-HP */ /*
        */ | ptdtrace==21 /* W-A-HP */ | ptdtrace==24 /* W-AI-A-HP */
        replace wbhao=5 if ptdtrace==3 /* AI only */ | ptdtrace==7 /* white-AI */ /*
        */ | ptdtrace==25 /* Other 3 races */ | ptdtrace==26 /* Other 4 and 5 races */
        * Hispanic ethnicity
        replace wbhao = 3 if hispanic == 1
    }

}

lab var wbhao "Race/ethnicity, including Asian"
#delimit ;
lab define wbhao
1 "White"
2 "Black"
3 "Hispanic"
4 "Asian"
5 "Other";
#delimit cr
lab val wbhao wbhao
notes wbhao: Racial and ethnic categories are mutually exclusive
notes wbhao: Asians include Hawaiian/Pacific Islanders
notes wbhao: Available 1989-present; definition changes in 1996, 2003, 2012m5, 2014
notes wbhao: From 2003, black includes all respondents listing black; other /*
*/ includes all respondents listing non-white or non-black races, except /*
*/ those also listing black
notes wbhao: 1989-present: Hispanic definition from variable hispanic
notes wbhao: 1989-1993 Unicon: race
notes wbhao: 1994-2002 CPS: perace
notes wbhao: 2003-present CPS: ptdtrace
Figure creation
keep if age >= 16 & age ~= .
keep if wbhao ~= .

cap drop hispanic

gen byte white = wbhao == 1
gen byte black = wbhao == 2
gen byte hispanic = wbhao == 3
gen byte asian = wbhao == 4
gen byte other = wbhao == 5

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

* http://colorbrewer2.org/#type=qualitative&scheme=Set1&n=5
local color1 228 26 28
local color2 55 126 184
local color3 77 175 74
local color4 152 78 163
local color5 255 127 0

line white black hispanic asian other year, ///
legend(off) ///
xlabel(1990(5)2020) ///
ylabel(0(20)60 80 "80%", angle(0) gmin gmax) ///
xtitle("") ytitle("") ///
lcolor("`color1'" "`color2'" "`color3'" "`color4'" "`color5'") ///
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", color("`color1'") placement(e)) ///
text(`blackyvalue' `blackxvalue' "Black", color("`color2'") placement(e)) ///
text(`hispanicyvalue' `hispanicxvalue' "Hispanic", color("`color3'") placement(e)) ///
text(`asianyvalue' `asianxvalue' "Asian", color("`color4'") placement(e)) ///
text(`otheryvalue' `otherxvalue' "Other", color("`color5'") placement(e))
graph export ${variableimages}wbhao_titleimage.svg, replace

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