lfstat: Labor-force status
Description
lfstat
is the three-category labor force status of the respondent (emp, unemp, NILF).
Availability
Sample |
Years |
Basic |
All years |
May |
All years |
ORG |
All years |
Values
Value |
Label |
1 |
Employed |
2 |
Unemployed |
3 |
NILF |
Code
Variable creation
*******************************************************************************
* Labor force status
*******************************************************************************
gen byte lfstat = .
if $marchcps == 1 {
if tm(1962m1) <= $date & $date <= tm(1993m12) {
replace lfstat = 1 if 1 <= _esr & _esr <= 2
replace lfstat = 2 if _esr == 3
replace lfstat = 3 if _esr == 7
}
if tm(1994m1) <= $date & $date <= tm(1997m12) {
replace lfstat = 1 if 1 <= mlr & mlr <= 2
replace lfstat = 2 if 3 <= mlr & mlr <= 4
replace lfstat = 3 if 5 <= mlr & mlr <= 7
}
if tm(1998m1) <= $date {
replace lfstat = 1 if 1 <= pemlr & pemlr <= 2
replace lfstat = 2 if 3 <= pemlr & pemlr <= 4
replace lfstat = 3 if 5 <= pemlr & pemlr <= 7
}
}
if $monthlycps == 1 | $maycps == 1 {
if tm(1973m1) <= $date & $date <= tm(1988m12) {
replace lfstat = 1 if 1 <= mlr & mlr <= 2
replace lfstat = 2 if mlr == 3
replace lfstat = 3 if 4 <= mlr & mlr <= 7
}
if tm(1989m1) <= $date & $date <= tm(1993m12) {
replace lfstat = 1 if 1 <= mlr & mlr <= 2
replace lfstat = 2 if 3 <= mlr & mlr <= 4
replace lfstat = 3 if 5 <= mlr & mlr <= 7
}
if tm(1994m1) <= $date {
replace lfstat = 1 if 1 <= pemlr & pemlr <= 2
replace lfstat = 2 if 3 <= pemlr & pemlr <= 4
replace lfstat = 3 if 5 <= pemlr & pemlr <= 7
}
}
lab var lfstat "Labor-force status"
#delimit ;
lab def lfstat
1 Employed
2 Unemployed
3 NILF
;
#delimit cr
lab val lfstat lfstat
notes lfstat: 1973-1993 Unicon: mlr
notes lfstat: 1994-present CPS: pemlr
Figure creation
gen byte lfpr = lfstat == 1 | lfstat == 2 if lfstat ~= .
keep if age >= 25 & age <= 54
keep if year >= 1976
gcollapse (mean) lfpr_ = lfpr [pw=basicwgt], by(year female) fast
foreach var of varlist lfpr_* {
replace `var' = `var' * 100
}
reshape wide lfpr_, i(year) j(female)
* grab useful values for figure values
foreach var of varlist lfpr_* {
sum `var' if year == 2009
local `var'yvalue = r(mean)
local `var'xvalue = 2009
}
local lfpr_0yvalue = `lfpr_0yvalue' + 3
local lfpr_1yvalue = `lfpr_1yvalue' - 3
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 lfpr_0 lfpr_1 year, ///
legend(off) ///
xlabel(1975(5)2020) ///
ylabel(50(10)90 100 "100%", angle(0)) ///
xtitle("") ytitle("") ///
lcolor("`color4'" "`color2'") ///
graphregion(color(white)) plotregion(color(white)) ///
title("Prime-age labor force participation rates, by gender", size(medium)) ///
text(`lfpr_0yvalue' `lfpr_0xvalue' "Male", color("`color4'") placement(c)) ///
text(`lfpr_1yvalue' `lfpr_1xvalue' "Female", color("`color2'") placement(c))
graph export ${variableimages}lfstat_titleimage.svg, replace