set more 1 /* File: cepr_org_empstat.do Date: Nov 14, 2005, CEPR ORG Version 1.0 Desc: Creates consistent employment status variables for CEPR consistent extract of CPS ORG Note: See copyright notice at end of program. */ /* Determine data year */ local year=year in 1 /* Labor-market status */ if 1979<=`year' & `year'<=1988 { gen byte lfstat=1 if esr==1 | esr==2 replace lfstat=2 if esr==3 replace lfstat=3 if 4<=esr & esr<=7 } if 1989<=`year' & `year'<=1993 { gen byte lfstat=1 if lfsr89==1 | lfsr89==2 replace lfstat=2 if 3<=lfsr89 & lfsr89<=4 replace lfstat=3 if 5<=lfsr89 & lfsr89<=7 } if 1994<=`year' { gen byte lfstat=1 if lfsr94==1 | lfsr94==2 replace lfstat=2 if 3<=lfsr94 & lfsr94<=4 replace lfstat=3 if 5<=lfsr94 & lfsr94<=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=3 if lfstat==2 lab var nilf "Not in labor force" notes nilf: CPS: derived from a-lfsr, pemlr /* Self-employed (unincorporated) */ if `year'<=1988 { gen byte selfemp=0 if class~=. & class~=8 /* 8 = never worked */ replace selfemp=1 if class==6 } if 1989<=`year' & `year'<=1993 { gen byte selfemp=0 if classer1~=. & classer1~=8 /* 8 = never worked */ replace selfemp=1 if classer1==6 } if 1994<=`year' { gen byte selfemp=0 if class94~=. replace selfemp=1 if class94==7 } lab var selfemp "Self-employed" notes selfemp: Unincorporated self-employed only notes selfemp: CPS: derived from a-clswkr, peio1cow /* Incorporated self-employed */ if `year'<=1988 { gen byte selfinc=0 if class~=. & class~=8 /* 8 = never worked */ replace selfinc=1 if class==5 } if 1989<=`year' & `year'<=1993 { gen byte selfinc=0 if classer1~=. & classer1~=8 /* 8 = never worked */ replace selfinc=1 if classer1==5 } if 1994<=`year' { gen byte selfinc=0 if class94~=. replace selfinc=1 if class94==6 } lab var selfinc "Incorporated self-employed" notes selfinc: Incorporated self-employed only notes selfinc: CPS: derived from a-clswkr, peio1cow /* Public sector */ if `year'<=1988 { gen byte pubsect=0 if class~=. & class~=8 /* 8 = never worked */ replace pubsect=1 if 2<=class & class<=4 } if 1989<=`year' & `year'<=1993 { gen byte pubsect=0 if classer1~=. & classer1~=8 /* 8 = never worked */ replace pubsect=1 if 2<=classer1 & classer1<=4 } if 1994<=`year' { gen byte pubsect=0 if class94~=. replace pubsect=1 if 1<=class94 & class94<=3 } lab var pubsect "Public sector" notes pubsect: Federal, state, and local notes pubsect: CPS: derived from a-clswkr, peio1cow /* Federal */ if `year'<=1988 { gen byte pubfed=0 if class~=. & class~=8 /* 8 = never worked */ replace pubfed=1 if class==2 } if 1989<=`year' & `year'<=1993 { gen byte pubfed=0 if classer1~=. & classer1~=8 /* 8 = never worked */ replace pubfed=1 if classer1==2 } if 1994<=`year' { gen byte pubfed=0 if class94~=. replace pubfed=1 if class94==1 } lab var pubfed "Federal employee" notes pubfed: CPS: derived from a-clswkr, peio1cow /* State */ if `year'<=1988 { gen byte pubst=0 if class~=. & class~=8 /* 8 = never worked */ replace pubst=1 if class==3 } if 1989<=`year' & `year'<=1993 { gen byte pubst=0 if classer1~=. & classer1~=8 /* 8 = never worked */ replace pubst=1 if classer1==3 } if 1994<=`year' { gen byte pubst=0 if class94~=. replace pubst=1 if class94==2 } lab var pubst "State employee" notes pubst: CPS: derived from a-clswkr, peio1cow /* Local */ if `year'<=1988 { gen byte publoc=0 if class~=. & class~=8 /* 8 = never worked */ replace publoc=1 if class==4 } if 1989<=`year' & `year'<=1993 { gen byte publoc=0 if classer1~=. & classer1~=8 /* 8 = never worked */ replace publoc=1 if classer1==4 } if 1994<=`year' { gen byte publoc=0 if class94~=. replace publoc=1 if class94==3 } lab var publoc "Local employee" notes publoc: CPS: derived from a-clswkr, peio1cow /* Union */ /* Member */ if `year'<=1982 { gen byte unmem=. } if 1983<=`year' { gen byte unmem=0 if unionmme~=. replace unmem=1 if unionmme==1 } lab var unmem "Union member" notes unmem: Not available before 1983 notes unmem: CPS: a-unmem, peernlab /* Coverage */ if `year'<=1982 { gen byte uncov=0 } if 1983<=`year' { gen byte uncov=0 if unioncov~=. replace uncov=1 if unioncov==1 } lab var uncov "Union coverage" notes uncov: Not available before 1983 notes uncov: CPS: a-uncov, peerncov /* Member or covered */ if `year'<=1982 { gen byte union=. } if 1983<=`year' { gen byte union=0 if unmem~=. 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 */ if `year'<=1983 { gen byte student=. } if 1984<=`year' { gen byte student=0 replace student=1 if studftpt==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 */ if `year'<=1983 { gen byte studpt=. } if 1984<=`year' { gen byte studpt=0 replace studpt=1 if studftpt==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 2003 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. */