set more 1 /* File: cepr_basic_demog.do Date: Nov 21, 2006 Feb 16, 2008 Feb 10, 2009 Oct 27, 2009 Jan 4, 2010 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 `year'==2006 | `year'==2009 { rename ptdtrace prdtrace } if 2003<=`year' & `year'<=2009 { 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 /* Race and ethnicity --separate category for Asian Pacific */ gen byte wbhao=. if 1989<=`year' & `year'<=1991 { replace wbhao=1 if adrace==1 /* white */ replace wbhao=2 if adrace==2 /* black */ replace wbhao=4 if adrace==4 /* asian */ replace wbhao=5 if adrace==3 | adrace==5 /* american indian, aleut eskimo; asian or pacific island; other */ replace wbhao=3 if (1<=adreorgn & adreorgn<=7) /* hispanic */ } if 1994<=`year' & `year'<=2002 { replace wbhao=1 if perace==1 /* white */ replace wbhao=2 if perace==2 /* black */ replace wbhao=4 if perace==4 /* asian */ replace wbhao=5 if perace==3 | adrace==5 /* american indian, aleut eskimo; asian or pacific island; other */ replace wbhao=3 if (1<=prorigin & prorigin<=7) /* hispanic */ } if 2003<=`year' & `year'<=2009 { replace wbhao=1 if prdtrace==1 /* white only */ replace wbhao=2 if prdtrace==2 /* black only */ replace wbhao=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 wbhao=4 if prdtrace==4 | prdtrace==5 /* asian & hawaiian/pacific islander */ /* */ | prdtrace==8 /* white-asian */ | prdtrace==9 /* white-HP */ | prdtrace==13 /* */ /* AI-Asian */ | prdtrace==14 /* asian-HP */ | prdtrace==17 /* W-AI-A */ /* */ | prdtrace==18 /* W-A-HP */ replace wbhao=5 if prdtrace==3 /* AI only */ | prdtrace==7 /* white-AI */ /* */ | prdtrace==20 /* 2 or 3 races */ | prdtrace==21 /* 4 or 5 races */ replace wbhao=3 if (1<=prdthsp & prdthsp<=5) /* hispanic */ } lab var wbhao "Race/ethnicity, inc. Asian" lab def wbhao 1 White 2 Black 3 Hispanic 4 Asian 5 Other lab val wbhao wbhao notes wbhao: Racial and ethnic categories are mutually exclusive notes wbhao: From 2003, black includes all respondents listing black; asian /* */ includes all respondents listing asian (except those also listing black; /* */ other includes all respondents /* */ listing non-white, non-black or non-asian races, excluding those also /* */ listing black or asian notes wbhao: asians include hawaiian/pacific islanders notes wbhao: CPS: derived from prdthsp a-reorgn notes wbhao: Available 89-08 only /* wbhom */ gen byte wbhom=. if 1979<=`year' & `year'<=2002 { * wbhom not available } if 2003<=`year' & `year'<=2009 { 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 /* wbhaom */ gen byte wbhaom=. if 2003<=`year' & `year'<=2009 { replace wbhaom=1 if prdtrace==1 replace wbhaom=2 if prdtrace==2 replace wbhaom=4 if prdtrace==4 | prdtrace==5 /* Asian or HP */ replace wbhaom=5 if prdtrace==3 /* AI only */ replace wbhaom=6 if 6<=prdtrace & prdtrace<=21 replace wbhaom=3 if 1<=prdthsp & prdthsp<=5 } lab var wbhaom "Race, inc. Asian and Mixed" lab def wbhaom 1 White 2 Black 3 Hispanic 4 Asian 5 "Native American" 6 Mixed lab val wbhaom wbhaom notes wbhaom: Racial and ethnic categories are mutually exclusive notes wbhaom: CPS: derived from prdthsp a-reorgn notes wbhaom: Major recoding of race variable in 2003 notes wbhaom: From 2003, black, white, asian, and other exclude all /* */ respondents listing more than one race notes wbhaom: Not available 1979-2002 notes wbhaom: CPS: derived from perace, prdtrace, and prorigin /* hawaiian/pacific islanders */ gen byte racehpi=. if 2003<=`year' & `year'<=2009 { replace racehpi=1 if prdtrace==5 replace racehpi=0 if prdtrace~=5 } lab var racehpi "Hawaiian/Pacific Islanders" notes racehpi: CPS: derived from perace, prdtrace, 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'<=2009 { 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'<=2009 { 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<=19 * 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 usyr2005 } 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-03" 19 "2004-06" ; #delimit cr lab val prinusyr usyr2006 } if `year'==2007 { capture lab drop usyr2007 #delimit ; lab define usyr2007 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-03" 19 "2004-07" ; #delimit cr lab val prinusyr usyr2007 } if `year'==2008 { capture lab drop usyr2008 #delimit ; lab define usyr2008 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-03" 19 "2004-05" 20 "2006-08" ; #delimit cr lab val prinusyr usyr2008 } if `year'==2009 { capture lab drop usyr2009 #delimit ; lab define usyr2009 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-03" 19 "2004-05" 20 "2006-09" ; #delimit cr lab val prinusyr usyr2009 } 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 "Elsewhere, Country Not Known" ; #delimit cr lab val penatvty cob } if 2007<=`year' & `year'<=2009 { lab var penatvty "Country of birth" capture lab drop cob #delimit ; lab define cob 57 "United States" 60 "American Samoa" 66 "Guam" 73 "Puerto Rico" 78 "U.S. Virgin Islands" 96 "Other US Island Areas" 102 "Austria" 103 "Belgium" 104 "Bulgaria" 105 "Czechoslovakia" 106 "Denmark" 108 "Finland" 109 "France" 110 "Germany" 116 "Greece" 117 "Hungary" 119 "Ireland/Eire" 120 "Italy" 126 "Netherlands" 127 "Norway" 128 "Poland" 129 "Portugal" 130 "Azores" 132 "Romania" 134 "Spain" 136 "Sweden" 137 "Switzerland" 138 "United Kingdom" 139 "England" 140 "Scotland" 141 "Wales" 142 "Northern Ireland" 147 "Yugoslavia" 148 "Czech Republic" 149 "Slovakia" 150 "Bosnia & Herzegovina" 151 "Croatia" 152 "Macedonia" 154 "Serbia" 156 "Latvia" 157 "Lithuania" 158 "Armenia" 159 "Azerbaijan" 160 "Belarus" 161 "Georgia" 162 "Moldova" 163 "Russia" 164 "Ukraine" 165 "USSR" 166 "Europe, n.s." 167 "Kosovo" 200 "Afghanistan" 202 "Bangladesh" 205 "Myanmar (Burma)" 206 "Cambodia" 207 "China" 208 "Cyprus" 209 "Hong Kong" 210 "India" 211 "Indonesia" 212 "Iran" 213 "Iraq" 214 "Israel" 215 "Japan" 216 "Jordan" 217 "Korea" 220 "South Korea" 222 "Kuwait" 223 "Laos" 224 "Lebanon" 226 "Malaysia" 229 "Nepal" 231 "Pakistan" 233 "Philippines" 235 "Saudi Arabia" 236 "Singapore" 238 "Sri Lanka" 239 "Syria" 240 "Taiwan" 242 "Thailand" 243 "Turkey" 246 "Uzbekistan" 247 "Vietnam" 248 "Yemen" 249 "Asia, n.s." 252 "Middle East" 300 "Bermuda" 301 "Canada" 303 "Mexico" 310 "Belize" 311 "Costa Rica" 312 "El Salvador" 313 "Guatemala" 314 "Honduras" 315 "Nicaragua" 316 "Panama" 321 "Antigua and Barbuda" 323 "Bahamas" 324 "Barbados" 327 "Cuba" 328 "Dominica" 329 "Dominican Republic" 330 "Grenada" 332 "Haiti" 333 "Jamaica" 338 "St. Kitts--Nevis" 339 "St. Lucia" 340 "St. Vincent and the Grenadines" 341 "Trinidad & Tobago" 343 "West Indies, n.s." 360 "Argentina" 361 "Bolivia" 362 "Brazil" 363 "Chile" 364 "Colombia" 365 "Ecuador" 368 "Guyana" 369 "Paraguay" 370 "Peru" 372 "Uruguay" 373 "Venezuela" 374 "South America, n.s." 399 "Americas, n.s." 400 "Algeria" 407 "Cameroon" 408 "Cape Verde" 414 "Egypt" 416 "Ethiopia" 417 "Eritrea" 421 "Ghana" 427 "Kenya" 429 "Liberia" 436 "Morocco" 440 "Nigeria" 444 "Senegal" 447 "Sierra Leone" 448 "Somolia" 449 "South Africa" 451 "Sudan" 453 "Tanzania" 457 "Uganda" 461 "Zimbabwe" 462 "Africa, n.s." 501 "Australia" 508 "Fiji" 515 "New Zealand" 523 "Tonga" 527 "Samoa" 528 "Oceania, n.s." 555 "Elsewhere" ; #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' & `year'<=2009 { 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. */