pubfed: Federal government employee¶
Description¶
pubfed
indicates whether the respondent is a federal government employee.
Availability¶
Sample | Years |
---|---|
Basic | 1989 - present |
ORG | 1989 - present |
Values¶
Value | Label |
---|---|
0 | Not in federal government |
1 | In federal government |
Detailed comments¶
The analysis above uses employed workers in the CPS Basic for 1989-2023.
Code¶
Variable creation
*******************************************************************************
* Public sector: federal
*******************************************************************************
gen byte pubfed = .
if $monthlycps == 1 {
if tm(1989m1) <= $date & $date <= tm(1993m12) {
replace pubfed = 0 if class >= 1 & class ~= .
replace pubfed = 1 if class == 2
}
if tm(1994m1) <= $date {
replace pubfed = 0 if peio1cow >= 1 & peio1cow ~= .
replace pubfed = 1 if peio1cow == 1
}
}
lab var pubfed "Federal government employee"
lab def pubfed 1 "In federal government" 0 "Not in federal government"
lab val pubfed pubfed
notes pubfed: Different definitions/universes in 1989-1993, 1994-present
notes pubfed: 1994-present: For first job only
notes pubfed: 1989-1993 Unicon: class
notes pubfed: 1994-present CPS: peio1cow
Figure creation
keep if pubfed ~= .
keep if age >= 16 & age <= 64
keep if emp == 1
gcollapse (mean) pubfed_ = pubfed [pw=basicwgt], by(year female) fast
* make wide and graph
reshape wide pubfed_, i(year) j(female)
foreach var of varlist pubfed_* {
replace `var' = `var' * 100
sum `var' if year == 2014
local `var'yvalue = r(mean)
local `var'xvalue = 2014
}
local pubfed_0yvalue = `pubfed_0yvalue' + 1
local pubfed_1yvalue = `pubfed_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
line pubfed_0 pubfed_1 year if year <= 1975, lcolor("`color4'" "`color2'") || ///
line pubfed_0 pubfed_1 year if 1976 <= year & year <= 1988, lcolor("`color4'" "`color2'") || ///
line pubfed_0 pubfed_1 year if 1989 <= year & year <= 1993, lcolor("`color4'" "`color2'") || ///
line pubfed_0 pubfed_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("Federal government share of workforce, ages 16-64, by gender", size(medium)) ///
text(`pubfed_0yvalue' `pubfed_0xvalue' "Male", color("`color4'") placement(c)) ///
text(`pubfed_1yvalue' `pubfed_1xvalue' "Female", color("`color2'") placement(c))
graph export ${variableimages}pubfed_titleimage.svg, replace
/***
The analysis above uses employed workers in the CPS Basic for 1989-2023.
***/