set more 1 /* File: cepr_org_prep_otc.do Date: Nov 14, 2005, CEPR ORG Version 1.0 Desc: Prepares overtime, tips, and commissions data from Basic CPS 1994-2002 for later merging with NBER data Note: See copyright notice at end of program. */ capture program drop otc program define otc 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 gestcen /* */ peernuot ptern ptern2 ptot 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" replace ptern=ptern/100 /* two implied decimal places in CPS data */ replace ptern2=ptern2/100 /* two implied decimal places in CPS data */ drop pesex order hhid hhnum lineno hrlonglk month minsamp state age female /* */ peernuot ptern ptern2 ptot 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 "$locotc/otc`1'.dta", replace } if $gnulin==0 { save "$locotc\otc`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. */