set more 1 /* File: cepr_basic_empstat.do Date: Nov 21, 2006 Desc: Creates consistent employment status variables for CEPR consistent extract of Basic CPS Note: See copyright notice at end of program. */ /* note: any pre-1994 data processing is not yet correct; use only to process data from 1994 forward */ /* Determine data year */ local year=year in 1 /* Labor-market status */ gen byte lfstat=. if `year'==1991 { replace lfstat=1 if adlfsr==1 | adlfsr==2 replace lfstat=2 if adlfsr==3 | adlfsr==4 replace lfstat=3 if 5<=adlfsr & adlfsr<=7 } if 1994<=`year' & `year'<=2006 { replace lfstat=1 if pemlr==1 | 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: CPS: derived from a-lfsr, pemlr /* Employed */ gen byte empl=0 if lfstat~=. replace empl=1 if lfstat==1 lab var empl "Employed" notes empl: CPS: derived from a-lfsr, pemlr /* Unemployed */ gen byte unem=0 if lfstat~=. replace unem=1 if lfstat==2 lab var unem "Unemployed" notes unem: CPS: derived from a-lfsr, pemlr /* Not in labor force */ gen byte nilf=0 if lfstat~=. replace nilf=1 if lfstat==3 lab var nilf "Not in labor force" notes nilf: CPS: derived from a-lfsr, pemlr /* Self-employed (unincorporated) */ gen byte selfemp=. if `year'==1991 { replace selfemp=0 if 1<=adclswkr & adclswkr<=8 replace selfemp=1 if adclswkr==5 | adclswkr==6 } if 1994<=`year' & `year'<=2006 { replace selfemp=0 if peio1cow~=. replace selfemp=1 if peio1cow==7 } lab var selfemp "Self-employed" notes selfemp: Unincorporated self-employed only notes selfemp: CPS: derived from a-clswkr, peio1cow /* Incorporated self-employed */ gen byte selfinc=. if `year'==1991 { replace selfinc=0 if 1<=adclswkr & adclswkr<=8 replace selfinc=1 if adclswkr==5 } if 1994<=`year' & `year'<=2006 { replace selfinc=0 if peio1cow~=. replace selfinc=1 if peio1cow==6 } lab var selfinc "Incorporated self-employed" notes selfinc: Incorporated self-employed only notes selfinc: CPS: derived from a-clswkr, peio1cow /* Public sector */ gen byte pubsect=. if `year'==1991 { replace pubsect=0 if 1<=adclswkr & adclswkr<=8 replace pubsect=1 if 2<=adclswkr & adclswkr<=4 } if 1994<=`year' & `year'<=2006 { replace pubsect=0 if peio1cow~=. replace pubsect=1 if 1<=peio1cow & peio1cow<=3 } lab var pubsect "Public sector" notes pubsect: Federal, state, and local notes pubsect: CPS: derived from a-clswkr, peio1cow /* Federal */ gen byte pubfed=. if `year'==1991 { replace pubfed=0 if 1<=adclswkr & adclswkr<=8 replace pubfed=1 if adclswkr==2 } if 1994<=`year' & `year'<=2006 { replace pubfed=0 if peio1cow~=. replace pubfed=1 if peio1cow==1 } lab var pubfed "Federal employee" notes pubfed: CPS: derived from a-clswkr, peio1cow /* State */ gen byte pubst=. if `year'==1991 { replace pubst=0 if 1<=adclswkr & adclswkr<=8 replace pubst=1 if adclswkr==3 } if 1994<=`year' & `year'<=2006 { replace pubst=0 if peio1cow~=. replace pubst=1 if peio1cow==2 } lab var pubst "State employee" notes pubst: CPS: derived from a-clswkr, peio1cow /* Local */ gen byte publoc=. if `year'==1991 { replace publoc=0 if 1<=adclswkr & adclswkr<=8 replace publoc=1 if adclswkr==4 } if 1994<=`year' & `year'<=2006 { replace publoc=0 if peio1cow~=. replace publoc=1 if peio1cow==3 } lab var publoc "Local employee" notes publoc: CPS: derived from a-clswkr, peio1cow /* Union */ /* Member */ gen byte unmem=. if `year'<=1982 { * not available } if `year'==1991 { replace unmem=0 if adunmem==2 replace unmem=1 if adunmem==1 } if 1994<=`year' & `year'<=2006 { replace unmem=0 if peernlab==2 /* asked only if in months 4 & 8 */ replace unmem=1 if peernlab==1 } lab var unmem "Union member" notes unmem: Not available before 1983 notes unmem: CPS: a-unmem, peernlab /* Coverage */ gen byte uncov=. if `year'<=1982 { * not available } if `year'==1991 { replace uncov=0 if aduncov==2 replace uncov=1 if aduncov==1 } if 1994<=`year' & `year'<=2006 { replace uncov=0 if peerncov==2 /* asked only if in months 4 & 8 */ replace uncov=1 if peerncov==1 } lab var uncov "Union coverage" notes uncov: Not available before 1983 notes uncov: CPS: a-uncov, peerncov /* Member or covered */ gen byte union=0 if unmem~=. replace union=0 if uncov~=. if 1983<=`year' & `year'<=2006 { replace union=1 if unmem==1 replace union=1 if uncov==1 } lab var union "Union" notes union: Not available before 1983 notes union: Union member or covered by union contract notes union: CPS: derived from a-unmem, peernlab, a-uncov, peerncov /* Full-time student */ gen byte student=. if `year'<=1983 { * not available } /* if 1984<=`year' & `year'<=1993 { replace student=0 replace student=1 if studftpt==1 } */ if 1994<=`year' & `year'<=2006 { replace student=0 replace student=1 if peschft==1 } lab var student "Full-time student" notes student: Not available before 1984 notes student: Part-time students coded as zero notes student: CPS: derived from a-ftpt, peschft /* Part-time student */ gen byte studpt=. if `year'<=1983 { * not available } /* if 1984<=`year' & `year'<=1993 { gen byte studpt=0 replace studpt=1 if studftpt==2 } */ if 1994<=`year' & `year'<=2006 { replace studpt=0 replace studpt=1 if peschft==2 } lab var studpt "Part-time student" notes studpt: Not available before 1984 notes studpt: Full-time students coded as zero notes studpt: CPS: derived from a-ftpt, peschft /* Copyright 2004 CEPR and John Schmitt This file is part of the cepr_org_master.do program. This file and all programs referenced in it are free software. You can redistribute the program or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */