Skip to content

selfemp: Self-employed (unincorporated)

selfemp title image

Description

selfemp indicates whether or not the respondent is self-employed and unincorporated. See also selfinc.

Availability

Sample Years
Basic All years
May All years
ORG All years

Values

Value Label
0 Not self-employed
1 Self-employed

Detailed comments

The analysis above uses employed workers in the CPS Basic for 1976-2023 and CPS May 1973-1975.

Code

Variable creation
*******************************************************************************
* Self-employed (unincorporated)
*******************************************************************************
gen byte selfemp = .

if $maycps == 1 {
    if tm(1973m1) <= $date & $date <= tm(1981m12) {
        replace selfemp = 0 if class4 >= 1 & class4 != .
        replace selfemp = 1 if class4 == 3
    }
}

if $monthlycps == 1 {
    if tm(1976m1) <= $date & $date <= tm(1978m12) {
        replace selfemp = 0 if class >= 1 & class != .
        replace selfemp = 1 if class == 3
    }
    if tm(1979m1) <= $date & $date <= tm(1988m12) {
        replace selfemp = 0 if class >= 1 & class != .
        replace selfemp = 1 if class == 3
    }
    if tm(1989m1) <= $date & $date <= tm(1993m12) {
        replace selfemp = 0 if class >= 1 & class != .
        replace selfemp = 1 if class == 6
    }
    if tm(1994m1) <= $date {
        replace selfemp = 0 if peio1cow >= 1 & peio1cow != .
        replace selfemp = 1 if peio1cow == 7
    }
}

lab var selfemp "Self-employed (unincorporated)"
lab def selfemp 1 "Self-employed" 0 "Not self-employed"
lab val selfemp selfemp
notes selfemp: Unincorporated self-employed only
notes selfemp: 1994-present CPS: peio1cow
notes selfemp: 1994-present: For first job
notes selfemp: 1976-1993 Unicon Basic: class
notes selfemp: 1973-1981 Unicon May: class4
notes selfemp: Universe: Class of worker assigned (not necessarily employed)
notes selfemp: Different definitions/universes: 1973-1988, 1989-1993, 1994-present
Figure creation
keep if selfemp ~= .
keep if age >= 16 & age <= 64
keep if emp == 1

gcollapse (mean) selfemp_ = selfemp [pw=basicwgt], by(year female) fast

* make wide and graph
reshape wide selfemp_, i(year) j(female)
foreach var of varlist selfemp_* {
    replace `var' = `var' * 100
    sum `var' if year == 2014
    local `var'yvalue = r(mean)
    local `var'xvalue = 2014
}
local selfemp_0yvalue = `selfemp_0yvalue' + 1
local selfemp_1yvalue = `selfemp_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 selfemp_0 selfemp_1 year if year <= 1975, lcolor("`color4'" "`color2'") || ///
line selfemp_0 selfemp_1 year if 1976 <= year & year <= 1988, lcolor("`color4'" "`color2'") || ///
line selfemp_0 selfemp_1 year if 1989 <= year & year <= 1993, lcolor("`color4'" "`color2'") || ///
line selfemp_0 selfemp_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("Self-employed share of workforce, ages 16-64, by gender", size(medium)) ///
text(`selfemp_0yvalue' `selfemp_0xvalue' "Male", color("`color4'") placement(c)) ///
text(`selfemp_1yvalue' `selfemp_1xvalue' "Female", color("`color2'") placement(c))
graph export ${variableimages}selfemp_titleimage.svg, replace

/***
The analysis above uses employed workers in the CPS Basic for 1976-2023 and CPS May 1973-1975.
***/