set more 1 /* File: cepr_org_idvar.do Date: Nov 14, 2005, CEPR ORG Version 1.0 Desc: Creates consistent household and personal identifiers and weights for CEPR consistent extract of CPS ORG Note: See copyright notice at end of program. */ /* Determine data year */ local year=year in 1 lab var year "Year" notes year: CPS: h-year /* Month of interview */ rename intmonth month lab var month "Month" notes month: CPS: h-month, hrmonth /* Month in sample */ lab var minsamp "Month in sample" notes minsamp: ORG consists of months 4 and 8 only notes minsamp: CPS: h-mis, hrmis /* hhid */ lab var hhid "Household ID" notes hhid: Unique to address, not household notes hhid: CPS: h-id, hrhid /* hhid2 */ gen byte hhid2=. lab var hhid2 "Household ID Part 2" notes hhid2: Unique to address, not household notes hhid2: Available Aug 2005- only notes hhid2: From 2005, concatenate hhid2 with hhid to uniquely identify HH notes hhid2: CPS: hrhhid2 /* hrsample */ gen byte hrsample=. lab var hrsample "Household sample ID" notes hrsample: Available 2003- only /* hrsersuf */ gen byte hrsersuf=. lab var hrsersuf "Household serial suffix" notes hrsersuf: Use to differentiate HH with same hhid notes hrsersuf: Available 2003 and 2004 only /* hhnum */ lab var hhnum "Household counter" notes hhnum: Increments by 1 for each new household at hhid address notes hhnum: CPS: h-hhnum, huhhnum /* hrlonglk */ if `year'<1994 {gen hrlonglk=.} lab var hrlonglk "Longitudinal link" lab def link 0 "Replacement" 2 "Continuing" lab val hrlonglk link notes hrlonglk: Longitudinal link is month-to-month, not year to year notes hrlonglk: CPS: hrlonglk /* lineno */ lab var lineno "Person number" notes lineno: Person line number within household notes lineno: CPS: a-lineno, pulineno /* Weights */ rename weight fnlwgt lab var fnlwgt "Final weight" notes fnlwgt: CPS: a_fnlwgt, pwsswgt rename earnwt orgwgt lab var orgwgt "Earnings weight" notes orgwgt: Sum to civilian, non-institutional population in each month notes orgwgt: To obtain approximate US population with full year of data, /* */ divide orgwgt by 12 notes orgwgt: CPS: a-ernlwt, pworwgt /* 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. */