wage: Hourly wage (adjusted)

wage title image

Description

wage is the hourly wage in dollars per hour for workers paid hourly or nonhourly. In contrast to wage_noadj, wage includes imputed values for respondents with top-coded weekly earnings or weekly hours that vary.

Availability

Sample Years
ORG All years

wageotc is a similar variable available back to 1994 that includes overtime, tips, commissions for hourly workers.

Detailed comments

The analysis above uses the CPS ORG for 1979-2019 and the CPS May for 1973-1978.

Variable creation
********************************************************************************
* wage
* NBER-style wage variable usual hourly earnings
* EXcluding overtime, tips, commissions for hourly workers
* adjusted for top-coding, hours vary imputations, and trimmed of extreme values
********************************************************************************

* first generate adjusted hourly earnings for non-paid-hourly
gen wage2_adjusted = .

if $monthlycps == 1 | $maycps == 1 {
    if $earnerinfo == 1 {
        if tm(1973m1) <= $date & $date <= tm(1978m12) {
            replace wage2_adjusted = weekpay/hoursumay if paidhre == 0
        }
        if tm(1979m1) <= $date & $date <= tm(1993m12) {
            replace wage2_adjusted = weekpay/hoursuorg if paidhre == 0
        }
        if tm(1994m1) <= $date {
            replace wage2_adjusted = weekpay/hoursu1 if paidhre == 0
            * use imputed hours for hours vary respondents
            replace wage2_adjusted = weekpay/hoursu1i if paidhre == 0 & hoursvary == 1
        }
        replace wage2_adjusted = . if wage2_adjusted < 0
    }

    * now create top-code-adjusted and hours-adjusted wage variable
    capture confirm variable wage, exact
    if _rc == 0 {
        drop wage
    }
    gen wage = .
    if $earnerinfo == 1 {
        replace wage = wage_noadj if paidhre == 1
        replace wage = wage2_adjusted if paidhre == 0
    }
    drop wage2_adjusted

    * trim wage values according to extreme values
    merge m:1 year using $extremewages, assert(2 3) keepusing(wage_lower wage_upper)
    keep if _merge == 3
    replace wage = . if wage < wage_lower
    replace wage = . if wage > wage_upper
    drop _merge wage_lower wage_upper
}

lab var wage "Hourly wage (adjusted)"
notes wage: Dollars per hour, for hourly and nonhourly workers
notes wage: Approximates NBER's recommended wage variable
notes wage: Adjustments for weekly earnings top-coding, trimming of outliers
notes wage: Includes nonhourly workers whose usual hours vary
notes wage: Includes overtime, tips, commissions for nonhourly
notes wage: Excludes overtime, tips, commissions for hourly
Figure creation
keep if wage > 0 & wage ~= .
keep if age >= 16 & age != .

gen wgt = .
replace wgt = basicwgt if year <= 1978
replace wgt = orgwgt if year >= 1979

gcollapse (p50) wage_ = wage [pw=wgt], by(year female) fast
* inflation-adjust wages
preserve
sysuse cpi_annual, clear
keep year cpiurs
keep if year > = 1973
tempfile cpiurs
save `cpiurs'
restore
merge m:1 year using `cpiurs', keep(3) nogenerate
sum cpiurs if year == 2019
local basevalue = r(mean)
replace wage = wage * `basevalue' / cpiurs

* make wide and graph
reshape wide wage_, i(year) j(female)
foreach var of varlist wage_* {
    sum `var' if year == 2009
    local `var'yvalue = r(mean)
    local `var'xvalue = 2009
}
local wage_0yvalue = `wage_0yvalue' - 1.2
local wage_1yvalue = `wage_1yvalue' - 1

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

local dollar=char(36)

line wage_0 wage_1 year, ///
legend(off) ///
xlabel(1975(5)2015) ///
ylabel(12(2)22 22 "$22", angle(0)) ///
xtitle("") ytitle("") ///
lcolor("`color4'" "`color2'") ///
graphregion(color(white)) plotregion(color(white)) ///
title("Median real wages by gender (in 2019`dollar')", size(medium)) ///
text(`wage_0yvalue' `wage_0xvalue' "Male", color("`color4'") placement(c)) ///
text(`wage_1yvalue' `wage_1xvalue' "Female", color("`color2'") placement(c))

graph export ${variableimages}wage_titleimage.svg, replace

/***
The analysis above uses the CPS ORG for 1979-2019 and the CPS May for 1973-1978.
***/