set more 1 /* File: cepr_org_geog.do Date: Nov 14, 2005, CEPR ORG Version 1.0 Desc: Creates consistent geographical variables for CEPR consistent extract of CPS ORG Note: See copyright notice at end of program. */ /* Determine data year */ local year=year in 1 /* State */ lab var state "State" #delimit ; lab def state 11 ME 12 NH 13 VT 14 MA 15 RI 16 CT 21 NY 22 NJ 23 PA 31 OH 32 IN 33 IL 34 MI 35 WI 41 MN 42 IA 43 MO 44 ND 45 SD 46 NE 47 KS 51 DE 52 MD 53 DC 54 VA 55 WV 56 NC 57 SC 58 GA 59 FL 61 KY 62 TN 63 AL 64 MS 71 AR 72 LA 73 OK 74 TX 81 MT 82 ID 83 WY 84 CO 85 NM 86 AZ 87 UT 88 NV 91 WA 92 OR 93 CA 94 AK 95 HI ; #delimit cr lab val state state notes state: CPS: hg-st60, gestcen /* Metropolitan area */ gen byte metro=0 if smsastat==2 replace metro=1 if smsastat==1 lab var metro "Metropolitan area" notes metro: CPS: h-metsta, gemetsta /* Central city */ tempvar urb gen `urb'=centcity drop centcity if `year'~=1995 { gen byte centcity=0 if `urb'~=. replace centcity=1 if `urb'==1 } if `year'==1995 { gen byte centcity=. } lab var centcity "Central city" notes centcity: BLS considers all 1995 data on SMSAs suspect notes centcity: CPS: derived from hg-msas, gemsast, gtmsast /* Suburb */ if `year'~=1995 { gen byte suburb=0 if `urb'~=. replace suburb=1 if `urb'==2 } if `year'==1995 { gen byte suburb=. } lab var suburb "Suburbs" notes suburb: BLS considers all 1995 data on SMSAs suspect notes suburb: CPS: derived from hg-msas, gemsast, gtmsast /* Rural */ if `year'~=1995 { gen byte rural=0 if `urb'~=. replace rural=1 if `urb'==3 } if `year'==1995 { gen byte rural=. } lab var rural "Rural" notes rural: BLS considers all 1995 data on SMSAs suspect notes rural: CPS: derived from hg-msas, gemsast, gtmsast /* City codes */ /* city-related variables from the NBER extracts are included, but not yet documented or supported; note that NBER reports that BLS warns that all SMSA coding for 1995 is suspect; city codes were changed substantially in May 2004; coding below makes no attempt to correct for these coding changes */ /* smsastat */ notes smsastat: CPS: h-metsta gemetsta /* centcity */ notes centcity: Not available 1995:6-1995:8 notes centcity: CPS: hg-msas, gemsast, gtmsast /* smsa70 */ if 1986<=`year' {gen byte smsa70=.} notes smsa70: Available 1979-1985:6 /* smsa80 */ if `year'<=1984 | 1996<=`year' {gen byte smsa80=.} notes smsa80: NBER says available 1985:10-1994:3, but appears in 1995 /* smsa93 */ if `year'<=1994 {gen byte smsa93=.} notes smsa93: Available 1995:9- /* smsarank */ if 1986<=`year' {gen byte smsarank=.} notes smsarank: Available 1979-1985:6 /* cmsarank */ if `year'<=1985 | 1995<=`year' {gen byte cmsarank=.} notes cmsarank: Available 1986-1994:3 notes cmsarank: CPS: hg-msar, gemsark /* pmsarank */ if `year'<=1985 | 1995<=`year' {gen byte pmsarank=.} notes pmsarank: Available 1986-1994:3 notes pmsarank: CPS: hg-pmsa, gepmsrk /* icntcity */ if `year'<=1985 {gen byte icntcity=.} notes icntcity: Available 1986- notes icntcity: CPS: h-inducc, geindvcc /* msafips */ if `year'<=1988 {gen byte msafips=.} notes msafips: Available 1989-94 notes msafips: Available 1995:1-1995:5; 1995:9- notes msafips: Coding changes between 1994 and 1995 /* cmsacode */ if `year'<=1988 {gen byte cmsacode=.} notes cmsacode: Available 1989-1993 notes cmsacode: Available 1994:1-1994:3; 1995:9- /* 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. */