set more 1 /* File: cepr_org_prep_hv.do Date: Feb 21, 2006 Desc: Prepares data on hours-vary from Basic CPS 1994-2002 for later merging with NBER data Note: See copyright notice at end of program. */ capture program drop hv program define hv version 6.0 while "`1'"~="" { if $gnulin==1 { use "$locbas/`1'/cpsb`1'x.dta", clear } if $gnulin==0 { use "$locbas\`1'\cpsb`1'x.dta", clear } keep hhid hhnum lineno hrlonglk hrmonth hrmis peage pesex /* */ prhrusl pehrusl1 pehrusl2 pehruslt peernhro gestcen /* */ hurespli proldrrp puslfprx rename hrmonth month rename hrmis minsamp rename gestcen state * carry age and sex variables as a check rename peage age replace age=90 if 90<=age & age~=. gen byte female=1 if pesex==2 replace female=0 if pesex==1 lab var female "Female" order hhid hhnum lineno hrlonglk month minsamp state age female /* */ prhrusl pehrusl1 pehrusl2 pehruslt peernhro /* */ hurespli proldrrp puslfprx sort month state minsamp hhid hhnum lineno * unique identifiers NBER: * 1979-93: hhid, hhnum, lineno, minsamp, month * 1994- : hhid, hhnum, lineno, minsamp, month, state compress if $gnulin==1 { save "$lochv/hv`1'.dta", replace } if $gnulin==0 { save "$lochv\hv`1'.dta", replace } mac shift } end /* 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. */