pubsec: Public sector employee¶
Description¶
pubsec
indicates whether the respondent is a public sector employee (local, state, or federal).
Availability¶
Sample | Years |
---|---|
Basic | All years |
May | All years |
ORG | All years |
Values¶
Value | Label |
---|---|
0 | Not in public sector |
1 | In public sector |
Detailed comments¶
The analysis above uses employed workers in the CPS Basic for 1976-2023 and the CPS May for 1973-1975.
Code¶
Variable creation
*******************************************************************************
* Public sector
*******************************************************************************
gen byte pubsec = .
if $maycps == 1 {
if tm(1973m1) <= $date & $date <= tm(1981m12) {
replace pubsec = 0 if class4 >= 1 & class4 ~= .
replace pubsec = 1 if class4 == 2
}
}
if $monthlycps == 1 {
if tm(1976m1) <= $date & $date <= tm(1988m12) {
replace pubsec = 0 if class >= 1 & class ~= .
replace pubsec = 1 if class == 2
}
if tm(1989m1) <= $date & $date <= tm(1993m12) {
replace pubsec = 0 if class >= 1 & class ~= .
replace pubsec = 1 if 2 <= class & class <= 4
}
if tm(1994m1) <= $date {
replace pubsec = 0 if peio1cow >= 1 & peio1cow ~= .
replace pubsec = 1 if 1 <= peio1cow & peio1cow <= 3
}
}
lab var pubsec "Public sector employee"
lab def pubsec 1 "In public sector" 0 "Not in public sector"
lab val pubsec pubsec
notes pubsec: Different definitions/universes CPS Basic: 1976-1988, 1989-1993, 1994-present
notes pubsec: Different definitions/universes CPS May: 1973-1981
notes pubsec: 1994-present: For first job only
notes pubsec: 1973-1981 Unicon May: class4
notes pubsec: 1976-1993 Unicon Basic: class
notes pubsec: 1994-present CPS: peio1cow
Figure creation
keep if pubsec ~= .
keep if age >= 16 & age <= 64
keep if emp == 1
gcollapse (mean) pubsec_ = pubsec [pw=basicwgt], by(year female) fast
* make wide and graph
reshape wide pubsec_, i(year) j(female)
foreach var of varlist pubsec_* {
replace `var' = `var' * 100
sum `var' if year == 2014
local `var'yvalue = r(mean)
local `var'xvalue = 2014
}
local pubsec_0yvalue = `pubsec_0yvalue' - 2
local pubsec_1yvalue = `pubsec_1yvalue' + 2
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 pubsec_0 pubsec_1 year if year <= 1975, lcolor("`color4'" "`color2'") || ///
line pubsec_0 pubsec_1 year if 1976 <= year & year <= 1988, lcolor("`color4'" "`color2'") || ///
line pubsec_0 pubsec_1 year if 1989 <= year & year <= 1993, lcolor("`color4'" "`color2'") || ///
line pubsec_0 pubsec_1 year if 1994 <= year, lcolor("`color4'" "`color2'") ///
legend(off) ///
xlabel(1975(5)2020) ///
ylabel(0(5)20 25 "25%", angle(0) gmin gmax) ///
xtitle("") ytitle("") ///
lcolor("`color4'" "`color2'") ///
graphregion(color(white)) plotregion(color(white)) ///
title("Public sector share of workforce, ages 16-64, by gender", size(medium)) ///
text(`pubsec_0yvalue' `pubsec_0xvalue' "Male", color("`color4'") placement(c)) ///
text(`pubsec_1yvalue' `pubsec_1xvalue' "Female", color("`color2'") placement(c))
graph export ${variableimages}pubsec_titleimage.svg, replace
/***
The analysis above uses employed workers in the CPS Basic for 1976-2023 and the CPS May for 1973-1975.
***/