Skip to content

pubst: State government employee

pubst title image

Description

pubst indicates whether the respondent is a state government employee.

Availability

Sample Years
Basic 1989 - present
ORG 1989 - present

Values

Value Label
0 Not in state government
1 In state government

Detailed comments

The analysis above uses employed workers in the CPS Basic for 1989-2023.

Code

Variable creation
*******************************************************************************
* Public sector: state
*******************************************************************************
gen byte pubst = .

if $monthlycps == 1 {
    if tm(1989m1) <= $date & $date <= tm(1993m12) {
        replace pubst = 0 if class >= 1 & class ~= .
        replace pubst = 1 if class == 3
    }
    if tm(1994m1) <= $date {
        replace pubst = 0 if peio1cow >= 1 & peio1cow ~= .
        replace pubst = 1 if peio1cow == 2
    }
}

lab var pubst "State government employee"
lab def pubst 1 "In state government" 0 "Not in state government"
lab val pubst pubst
notes pubst: Different definitions/universes in 1989-1993, 1994-present
notes pubst: 1994-present: For first job only
notes pubst: 1989-1993 Unicon: class
notes pubst: 1994-present CPS: peio1cow
Figure creation
keep if pubst ~= .
keep if age >= 16 & age <= 64
keep if emp == 1

gcollapse (mean) pubst_ = pubst [pw=basicwgt], by(year female) fast

* make wide and graph
reshape wide pubst_, i(year) j(female)
foreach var of varlist pubst_* {
    replace `var' = `var' * 100
    sum `var' if year == 2014
    local `var'yvalue = r(mean)
    local `var'xvalue = 2014
}
local pubst_0yvalue = `pubst_0yvalue' - 2
local pubst_1yvalue = `pubst_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 pubst_0 pubst_1 year if year <= 1975, lcolor("`color4'" "`color2'") || ///
line pubst_0 pubst_1 year if 1976 <= year & year <= 1988, lcolor("`color4'" "`color2'") || ///
line pubst_0 pubst_1 year if 1989 <= year & year <= 1993, lcolor("`color4'" "`color2'") || ///
line pubst_0 pubst_1 year if 1994 <= year, lcolor("`color4'" "`color2'") ///
legend(off) ///
xlabel(1990(5)2020) ///
ylabel(0(5)20 25 "25%", angle(0) gmin gmax) ///
xtitle("") ytitle("") ///
lcolor("`color4'" "`color2'") ///
graphregion(color(white)) plotregion(color(white)) ///
title("State government share of workforce, ages 16-64, by gender", size(medium)) ///
text(`pubst_0yvalue' `pubst_0xvalue' "Male", color("`color4'") placement(c)) ///
text(`pubst_1yvalue' `pubst_1xvalue' "Female", color("`color2'") placement(c))
graph export ${variableimages}pubst_titleimage.svg, replace

/***
The analysis above uses employed workers in the CPS Basic for 1989-2023.
***/