set more 1 /* File: cepr_jt_master.do Date: Mar 10, 2006 Desc: Create consistent extract of Job Tenure and Mobility Supplement for 1998, 2000, 2002, and 2004 */ /* Acknowledgements The raw Current Population Survey and most of the accompanying documentation used to produce the CEPR Job Tenure extract are freely available from the National Bureau of Economic Research (www.nber.org). The Stata (www.stata.com) retrieval programs used here to convert the raw CPS data into Stata format have been adapted from programs written by Jean Roth (jroth@nber.org). I thank Dean Baker and Heather Boushey for extensive comments. These Job Tenure programs rely on the CEPR CPS Displaced Worker Survey do-files, available at www.ceprdata.org. */ /* Notice The underlying Current Population Survey data referenced here are all in thepublic domain. This program and most of the programs referenced in it are distributed under the GNU General Public License (GPL). See end of this file and http://www.gnu.org/licenses/ for details. */ /* set directories */ global gnulin = 1 /*Set gnulin=0 if you run Windows; 1 if GNU/Linux*/ if $gnulin==1 { /*do files and dictionaries*/ global jtdo "/ceprdata/CPS_JobTenure/Dofiles" /* JT do files */ global dwsdo "/ceprdata/CPS_DisplacedWorker/Dofiles" /* DWS do files */ global basicdo "/ceprdata/CPS_Basic/CEPR/DoFiles" /* BasicCPS dofiles*/ /* data */ global dwsdata "/ceprdata/CPS_DisplacedWorker" /*raw DWS data*/ global orgdata "/ceprdata/CPS_ORG/CEPR" /* final CEPR ORG extract */ global working "/home/stata/working" global final "/ceprdata/CPS_JobTenure" /* final DWS */ } if $gnulin==0 { /*do files and dictionaries*/ global jtdo "C:\DATA\CPS_JobTenure\Dofiles" /* JT do files */ global dwsdo "C:\DATA\CPS_DisplacedWorker\Dofiles" /* DWS do files */ global basicdo "C:\DATA\CPS_Basic\CEPR\DoFiles" /* BasicCPS dofiles */ /* data */ global dwsdata "C:\DATA\CPS_DisplacedWorker" /*raw DWS data*/ global orgdata "C:\DATA\CPS_ORG\CEPR" /* final CEPR ORG extract */ global working "C:\DATA\CPS_JobTenure\Workfiles" global final "C:\DATA\CPS_JobTenure" /* final DWS */ } /* read and label raw CPS data */ /* 1998, Feb; 2000, Feb; 2002, Jan; 2004, Jan */ capture program drop dwsread program define dwsread while "`1'"~="" { cd $dwsdo /*for year 1, use DWSretrievalprogram*/ /* these do-files require CEPR's DWS raw data directory naming conventions; see individual do-files for examples */ do cepr_dws_read_`1'.do gen int year=`1' compress cd $working save cps_jt_raw_`1'.dta, replace mac shift } end /*create job tenure extracts from raw labeled data*/ capture program drop jtall program define jtall version 5.0 while "`1'"~="" { drop _all set mem 300m cd $working use cps_jt_raw_`1'.dta, clear * process Job Tenure responses cd $jtdo do cepr_jt_jt.do * process Basic CPS responses cd $basicdo do cepr_basic_idvar.do cd $basicdo do cepr_basic_demog.do cd $basicdo do cepr_basic_family.do cd $basicdo do cepr_basic_empstat.do cd $basicdo do cepr_basic_geog.do cd $basicdo do cepr_basic_educ.do cd $basicdo do cepr_basic_ind.do cd $basicdo do cepr_basic_occ.do cd $basicdo do cepr_basic_hours.do * to facilitate merge, keep only necessary variables global keep year /* */ ten_num ten_per ten_mth ten_raw tenure prevten tot_num tot_per /* */ tot_ten yearago jtwgt jtstat /* */ month minsamp hhid hhnum hrlonglk lineno fnlwgt orgwgt lonwgt famwgt /* */ age female wbho wbhom forborn citizen prcitshp penatvty pemntvty pefntvty /* */ prinusyr arrived vet /* */ married ownchild ch02 ch05 ch35 ch613 ch1417 famrel84 famrel94 faminc /* */ lfstat empl unem nilf selfemp selfinc pubsect pubfed pubst publoc /* */ unmem uncov union student studpt /* */ state metro centcity suburb rural /* */ educ /* */ ind_nber ind_2d ind70 ind80 ind03 agric manuf servs /* */ docc70 docc80 docc03 occ70 occ80 occ03 manag83 manag03 /* */ hourslw reason94 absent94 uhourse ptecon unempt prhrusl pehrusl1 /* */ pehrusl2 pehruslt peernhro imphrs hrsimptd hrernhr uhoursi * merge with CEPR CPS ORG wage data cd $jtdo do cepr_jt_org.do * tidy keep year /* */ ten_num ten_per ten_mth ten_raw tenure prevten tot_num tot_per /* */ tot_ten yearago jtwgt jtstat /* */ month minsamp hhid hhnum hrlonglk lineno fnlwgt orgwgt lonwgt famwgt /* */ age female wbho wbhom forborn citizen prcitshp penatvty pemntvty pefntvty /* */ prinusyr arrived vet /* */ married ownchild ch02 ch05 ch35 ch613 ch1417 famrel84 famrel94 faminc /* */ lfstat empl unem nilf selfemp selfinc pubsect pubfed pubst publoc /* */ unmem uncov union student studpt /* */ state metro centcity suburb rural /* */ educ /* */ ind_nber ind_2d ind70 ind80 ind03 agric manuf servs /* */ docc70 docc80 docc03 occ70 occ80 occ03 manag83 manag03 /* */ hourslw reason94 absent94 uhourse ptecon unempt prhrusl pehrusl1 /* */ pehrusl2 pehruslt peernhro imphrs hrsimptd hrernhr uhoursi /* */ paidhre earnhre uearnwk uearnwke earnwk wkotc otmgfail /* */ tc w_nber w_no_no w_no_ot w_ln_no w_ln_ot /* */ w_p7_no w_p7_ot w_p8_no w_p8_ot w_p9_no w_p9_ot rw rw_ot /* */ blsimpt blsimph blsimpw order year /* */ ten_num ten_per ten_mth ten_raw tenure prevten tot_num tot_per /* */ tot_ten yearago jtwgt jtstat /* */ month minsamp hhid hhnum hrlonglk lineno fnlwgt orgwgt lonwgt famwgt /* */ age female wbho wbhom forborn citizen prcitshp penatvty pemntvty pefntvty /* */ prinusyr arrived vet /* */ married ownchild ch02 ch05 ch35 ch613 ch1417 famrel84 famrel94 faminc /* */ lfstat empl unem nilf selfemp selfinc pubsect pubfed pubst publoc /* */ unmem uncov union student studpt /* */ state metro centcity suburb rural /* */ educ /* */ ind_nber ind_2d ind70 ind80 ind03 agric manuf servs /* */ docc70 docc80 docc03 occ70 occ80 occ03 manag83 manag03 /* */ hourslw reason94 absent94 uhourse ptecon unempt prhrusl pehrusl1 /* */ pehrusl2 pehruslt peernhro imphrs hrsimptd hrernhr uhoursi /* */ paidhre earnhre uearnwk uearnwke earnwk wkotc otmgfail /* */ tc w_nber w_no_no w_no_ot w_ln_no w_ln_ot /* */ w_p7_no w_p7_ot w_p8_no w_p8_ot w_p9_no w_p9_ot rw rw_ot /* */ blsimpt blsimph blsimpw compress sort month state minsamp hhid hhnum lineno lab data "CEPR Job Tenure Extract, Version 0.91, `1'" cd $final save cepr_jt_`1'.dta, replace saveold cepr_jt_`1'_ver7.dta, replace mac shift } end /* program switches */ dwsread 1998 2000 2002 2004 jtall 1998 2000 2002 2004 /* Release notes 0.91 March 2006 *nixified and cleaned up programs incorporated CEPR topcode revisions to ORG switched CEPR JT do-files to rely on original CEPR DWS do-files 0.9 Month Day, 2004 Beta release */ /* Copyright 2006 CEPR and John Schmitt Center for Economic and Policy Research 1621 Connecticut Avenue, NW Washington, DC 20009 Tel: (202) 293-5380 Fax: (202) 588-1356 http://www.cepr.net/ This program 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. */