set more 1 /* File: cepr_basic_demog.do Date: Nov 21, 2006 Desc: Creates consistent demographic variables for CEPR consistent extract of Basic CPS Note: See copyright notice at end of program. */ /* note: any pre-1994 data processing is not yet correct; use only to process data from 1994 forward */ /* Determine data year */ local year=year in 1 /* Age */ gen int age=. if `year'==1991 { replace age=adage replace age=. if adage<0 | 90=8 & month<=12 } if 2006 <= `year' { rename ptdtrace prdtrace } if 2003 <= `year' { replace wbho=1 if prdtrace==1 replace wbho=2 if prdtrace==2 replace wbho=2 if prdtrace==6 /* black-white */ | prdtrace==10 /* */ /* black-AI */ | prdtrace==11 /* black-asian */ | prdtrace==12 /* */ /* black-HP */ | prdtrace==15 /* W-B-AI */ | prdtrace==16 /* W-B-A */ /* */ | prdtrace==19 /* W-B-AI-A */ replace wbho=4 if 3<=prdtrace & prdtrace<=5 replace wbho=4 if prdtrace==7 /* white-AI */ | prdtrace==8 /* */ /* white-asian */ | prdtrace==9 /* white-hawaiian */ | prdtrace==13 /* */ /* AI-asian */ | prdtrace==14 /* Asian-HP */ | prdtrace==17 /* W-AI-A */ /* */ | prdtrace==18 /* W-A-HP */ | prdtrace==20 /* 2 or 3 races */ /* */ | prdtrace==21 /* 4 or 5 races */ replace wbho=3 if 1<=prdthsp & prdthsp<=5 } lab var wbho "Race" #delimit ; lab define wbho 1 "White" 2 "Black" 3 "Hispanic" 4 "Other"; #delimit cr lab val wbho wbho notes wbho: Racial and ethnic categories are mutually exclusive notes wbho: Major recoding of race variable in 2003 notes wbho: From 2003, black includes all respondents listing black; other /* */ includes all respondents listing non-white or non-black races, except /* */ those also listing black notes wbho: CPS: derived from perace, prdtrace, and prorigin /* wbhom */ gen byte wbhom=. if 1979<=`year' & `year'<=2002 { * wbhom not available } if 2003<=`year' & `year'<=2006 { replace wbhom=1 if prdtrace==1 replace wbhom=2 if prdtrace==2 replace wbhom=4 if 3<=prdtrace & prdtrace<=5 replace wbhom=4 if prdtrace==13 /* AI-asian */ | prdtrace==14 /* Asian-HP */ replace wbhom=5 if 6<=prdtrace & prdtrace<=21 replace wbhom=3 if 1<=prdthsp & prdthsp<=5 } lab var wbhom "Race, inc. mixed" #delimit ; lab define wbhom 1 "White" 2 "Black" 3 "Hispanic" 4 "Other" 5 "Mixed"; #delimit cr lab val wbhom wbhom notes wbhom: Racial and ethnic categories are mutually exclusive notes wbhom: CPS: derived from prdtrace notes wbhom: Major recoding of race variable in 2003 notes wbhom: From 2003, black, white, and other exclude all respondents /* */ listing more than one race (except mixes of AI, Asian, and HP, which /* */ are included in other notes wbhom: Not available 1979-2002 notes wbhom: CPS: derived from perace, prdtrace, and prorigin /* Citizenship status and nativity (from 1994 only) */ gen byte forborn=. gen byte citizen=. if 1979<=`year' & `year'<=1993 { gen byte prcitshp=. } if 1994<=`year' & `year'<=2006 { replace forborn=0 if prcitshp~=. replace forborn=1 if prcitshp==4 | prcitshp==5 * replace citizen=0 if prcitshp~=. replace citizen=1 if 1<=prcitshp & prcitshp<=4 } lab var forborn "Foreign born" notes forborn: Not available 1979-1993 notes forborn: CPS: derived from prcitshp lab var citizen "US citizen" notes citizen: Not available 1979-1993 notes citizen: CPS: derived from prcitshp lab var prcitshp "Citizenship status" capture lab drop prcitshp #delimit ; lab define prcitshp 1 "Born in US" 2 "Born in Puerto Rico, Outlying Areas" 3 "Foreign born, US parents" 4 "Foreign born, naturalized" 5 "Foreign born"; #delimit cr lab val prcitshp prcitshp notes prcitshp: Not available 1979-1993 notes prcitshp: CPS: prcitshp /* Year arrived in the United States */ gen byte arrived=. if 1994<=`year' & `year'<=2006 { if `year'==1994 {rename peinusyr prinusyr} if `year'==2001 {capture rename prinuyer prinusyr} replace arrived=prinusyr replace arrived=. if prinusyr<=0 replace arrived=13 if 14<=prinusyr & prinusyr<=18 * replace prinusyr=. if prinusyr<=0 } lab var arrived "Year entered US" capture lab drop arrived #delimit ; lab define arrived 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-"; #delimit cr lab val arrived arrived notes arrived: See "prinusyr" for year-specific variable notes arrived: Not available 1979-1993 notes arrived: CPS: prinusyr /* due to inconsistencies over time in coding structure of prinusyr, the last value of "arrived" (==13) refers to 1992 or later, with no finer, consistent breakdown; in each individual year of the data, the dataset retains the inconsistently coded prinusyr variable for more detailed analysis */ if 1979<=`year' & `year'<=1993 { gen byte prinusyr=. } if 1994<=`year' & `year'<=1995 { capture lab drop usyr1994 #delimit ; lab define usyr1994 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-95"; #delimit cr lab val prinusyr usyr1994 } if 1996<=`year' & `year'<=1997 { capture lab drop usyr1996 #delimit ; lab define usyr1996 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-97"; #delimit cr lab val prinusyr usyr1996 } if `year'==1998 { #delimit ; capture lab drop usyr1998 lab define usyr1998 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-95" 15 "1996-98"; #delimit cr lab val prinusyr usyr1998 } if `year'==1999 { capture lab drop usyr1999 #delimit ; lab define usyr1999 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-95" 15 "1996-99"; #delimit cr lab val prinusyr usyr1999 } if `year'==2000 { capture lab drop usyr2000 #delimit ; lab define usyr2000 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-95" 15 "1996-97" 16 "1998-00"; #delimit cr lab val prinusyr usyr2000 } /* according to NBER documentation, 16 in 2001 is "1998" only */ if `year'==2001 { capture lab drop usyr2001 #delimit ; lab define usyr2001 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-95" 15 "1996-97" 16 "1998-00"; #delimit cr lab val prinusyr usyr2001 } /* according to NBER documentation, 16 in 2001 is "1998" only */ if `year'==2002 { capture lab drop usyr2002 #delimit ; lab define usyr2002 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-95" 15 "1996-97" 16 "1998-99" 17 "2000-02"; #delimit cr lab val prinusyr usyr2002 } * if `year'==2003 { capture lab drop usyr2003 #delimit ; lab define usyr2003 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-95" 15 "1996-97" 16 "1998-99" 17 "2000-03"; #delimit cr lab val prinusyr usyr2003 } if `year'==2004 { capture lab drop usyr2004 #delimit ; lab define usyr2004 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-95" 15 "1996-97" 16 "1998-99" 17 "2000-01" 18 "2002-04" ; #delimit cr lab val prinusyr usyr2004 } if `year'==2005 { capture lab drop usyr2005 #delimit ; lab define usyr2005 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-95" 15 "1996-97" 16 "1998-99" 17 "2000-01" 18 "2002-05" ; #delimit cr lab val prinusyr usyr2004 } if `year'==2006 { capture lab drop usyr2006 #delimit ; lab define usyr2006 1 "<1950" 2 "1950-59" 3 "1960-64" 4 "1965-69" 5 "1970-74" 6 "1975-79" 7 "1980-81" 8 "1982-83" 9 "1984-85" 10 "1986-87" 11 "1988-89" 12 "1990-91" 13 "1992-93" 14 "1994-95" 15 "1996-97" 16 "1998-99" 17 "2000-01" 18 "2002-06" ; #delimit cr lab val prinusyr usyr2006 } lab var prinusyr "Year entered US" notes prinusyr: Coding not consistent across years notes prinusyr: See "arrived" for variable that is consistent over time notes prinusyr: Not available 1979-1993 notes prinusyr: CPS: prinusyr /* Country of birth */ if 1979<=`year' & `year'<=1993 { gen byte penatvty=. /* respondent */ gen byte pemntvty=. /* respondent's mother */ gen byte pefntvty=. /* respondent's father */ } if 1994<=`year' & `year'<=2006 { lab var penatvty "Country of birth" capture lab drop cob #delimit ; lab define cob 57 "United States" 60 "American Samoa" 66 "Guam" 72 "Puerto Rico" 78 "U.S. Virgin Islands" 96 "No coding available/US Outlying Area" 102 "Austria" 103 "Belgium" 105 "Czechoslovakia" 106 "Denmark" 108 "Finland" 109 "France" 110 "Germany" 116 "Greece" 117 "Hungary" 119 "Ireland/Eire" 120 "Italy" 126 "Holland/Netherlands" 127 "Norway" 128 "Poland" 129 "Portugal" 130 "Azores" 132 "Romania" 134 "Spain" 136 "Sweden" 137 "Switzerland" 138 "Great Britain" 139 "England" 140 "Scotland" 142 "Northern Ireland" 147 "Yugoslavia" 148 "Europe" 155 "Czech Republic" 156 "Slovakia/Slovak Republic" 180 "USSR" 183 "Latvia" 184 "Lithuania" 185 "Armenia" 192 "Russia" 195 "Ukraine" 200 "Afghanistan" 202 "Bangladesh" 205 "Burma" 206 "Cambodia" 207 "China" 209 "Hong Kong" 210 "India" 211 "Indonesia" 212 "Iran" 213 "Iraq" 214 "Israel" 215 "Japan" 216 "Jordan" 217 "Korea/South Korea" 218 "Korea/ South Korea" 221 "Laos" 222 "Lebanon" 224 "Malaysia" 229 "Pakistan" 231 "Philippines" 233 "Saudi Arabia" 234 "Singapore" 237 "Syria" 238 "Taiwan" 239 "Thailand" 240 "Turkey" 242 "Vietnam" 245 "Asia" 252 "Middle East" 253 "Palestine" 300 "Bermuda" 301 "Canada" 304 "North America" 310 "Belize" 311 "Costa Rica" 312 "El Salvador" 313 "Guatemala" 314 "Honduras" 315 "Mexico" 316 "Nicaragua" 317 "Panama" 318 "Central America" 333 "Bahamas" 334 "Barbados" 337 "Cuba" 338 "Dominica" 339 "Dominican Republic" 342 "Haiti" 343 "Jamaica" 351 "Trinidad & Tobago" 353 "Caribbean" 375 "Argentina" 376 "Bolivia" 377 "Brazil" 378 "Chile" 379 "Colombia" 380 "Ecuador" 383 "Guyana" 385 "Peru" 387 "Uruguay" 388 "Venezuela" 389 "South America" 415 "Egypt" 417 "Ethiopia" 421 "Ghana" 427 "Kenya" 436 "Morocco" 440 "Nigeria" 449 "South Africa" 462 "Other Africa" 468 "North Africa" 501 "Australia" 507 "Fiji" 514 "New Zealand" 527 "Pacific Islands" 555 "Other/Abroad, Country Not Known" ; #delimit cr lab val penatvty cob } lab var pemntvty "Country birth" notes penatvty: Not available 1979-1993 notes penatvty: CPS: penatvty lab var pemntvty "Country birth, mother" notes pemntvty: Not available 1979-1993 notes pemntvty: CPS: pemntvty lab var pefntvty "Country birth, father" notes pefntvty: Not available 1979-1993 notes pefntvty: CPS: pefntvty /* Veteran */ gen byte vet=. /* if `year'<=1988 { gen byte vet=0 if veteran~=. replace vet=1 if 1<=veteran & veteran<=5 replace vet=. if female==1 } */ if `year'==1991 { replace vet=0 if 1<=advet & advet<=6 replace vet=1 if 1<=advet & advet<=5 } if 1994<=`year' & `year'<=2004 { replace vet=0 if peafwhen~=. replace vet=1 if 1<=peafwhen & peafwhen<=5 /* following NBER */ } if 2005 == `year' { replace vet=0 if peafwhen~=. & (1<=month & month<=7) replace vet=0 if peafever==2 & (8<=month & month<=12) replace vet=1 if 1<=peafwhen & peafwhen<=9 /* trying to follow NBER */ replace vet=1 if 1<=peafwhn1 & peafwhn1<=9 } if 2006 == `year' { replace vet=0 if peafever==2 replace vet=1 if 1<=peafwhn1 & peafwhn1<=9 } lab var vet "Veteran" notes vet: Question not asked consistently of women before 1989 notes vet: CPS: derived from peafwhen /* Copyright 2004 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. */