***************************** *Preamble ***************************** set more off clear set maxvar 10000,permanently cd "E:\Wave_1"//Define the working directory /*Define the data source directory, where there should contain file IND2013ER & FAM2009ER and PEQUIV_LONG from CNEF-PSID*/ global datadir "E:\Original Data\US" ******************************************************************************** * Preparation:Basic Structure Construction ******************************************************************************** use "$datadir\IND2013ER.dta" //The whole data file will be based on PSID IND2013ER file *Keep only the necessary variables keep ER30000 ER30001 ER30002 ER31990-ER31997 ER32000-ER32051 ER33901-ER33951 ER34001-ER34046 save File_US, replace capture mkdir uscompute *Merge useful variables from family file PSID FAM2009ER use "$datadir\FAM2009ER" keep ER42002-ER42100 ER42132 ER46369 ER42134 ER46448 - ER46452 ER46542 - ER46546 ER46975A ER47012 save uscompute\fam,replace use File_US clonevar ER42002 = ER34001 merge m:1 ER42002 using uscompute\fam drop _merge *Keep only individuals available in 2009 drop if ER34001 == 0 drop if ER34002 == 0 | ER34002 >=81 & ER34002 <=89 *Define some common-used labels label define numerical_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" label define yesno -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" 0 "No" 1"Yes" save File_US, replace ***************************** *Part0. IDs and weights ***************************** * Year of survey clonevar a_syear=ER42014 label var a_syear "Year of Survey" * Month of survey clonevar a_smonth=ER42012 label var a_smonth "Month of Survey" * 2009 family ID clonevar a_fid=ER42002 label var a_fid "Family ID" * Cross wave identifiers /*ER30001: interview number ER30002: person number The combination of this variable and Person Number (ER30002) provides unique identification for each individual on the data file.*/ gen a_pidp=(ER30001*1000)+ER30002 label var a_pidp "Cross Wave Person Identifier" * a_pid Individual Number clonevar a_pid = a_pidp label var a_pid "Individual Number" * Cross sectional individual weights clonevar a_pweight=ER34046 label var a_pweight "Individual Sample Weight" * Family sample weight a_fweight *ER47012 "2009 CORE/IMMIGRANT FAM WEIGHT NUMBER 1" clonevar a_fweight=ER47012 label var a_fweight "Family sample Weight" save File_US, replace ***************************** *Part1. Basic Demographic ***************************** * Year of birth clonevar a_birthy=ER34006 mvdecode a_birthy, mv(0) replace a_birthy = -8 if a_birthy == 9999 label var a_birthy "R's Year of Birth" label define a_birthy_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" label value a_birthy a_birthy_l * Month of birth clonevar a_birthm=ER34005 mvdecode a_birthm, mv(0) replace a_birthm = -8 if a_birthm == 99 label var a_birthm "R's month of birth" label define a_birthm_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" label value a_birthm a_birthm_l tab a_birthm, mi * Age clonevar a_age=ER34004 mvdecode a_age, mv(0) replace a_age = -8 if a_age == 999 label var a_age "R's Age" label define a_age_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" 1 "Newborn up to second birthday" label value a_age a_age_l insp a_age * Gender clonevar a_gender=ER32000 replace a_gender = -8 if a_gender == 9 label var a_gender "R's gender" label define a_gender_l -8 "Not Applicable" 1 "Male" 2 "Female" label value a_gender a_gender_l tab a_gender, mi * R's ethnicity a_ethnica /* ETHNICITY for head and wife only; */ gen a_ethnica = . replace a_ethnica = ER46449 if ER34003 == 20|ER34003 == 22 replace a_ethnica = 8 if (ER46450 >=1&ER46450 <=7) & (ER34003 == 20|ER34003==22) //mixed-race replace a_ethnica = ER46543 if ER34003 == 10 replace a_ethnica = 8 if (ER46544 >=1&ER46544 <=7) & ER34003 == 10 //mixed-race recode a_ethnica (0=.)(9=-8)(7=6)(8=7) label var a_ethnica "R's Ethnicity" label define ethnica_l -8"Not Applicable" -2 "Refused to Answer" -1"Don't Know" /// 1 "White" 2"Black, African-American, or Negro" 3 "American Indian or Alaska Native" /// 4 "Asian" 5 "Native Hawaiian or Pacific Islander" 6"Other Single Race" 7"Mixed Races" label value a_ethnica ethnica_l * R's ethnicity: Majority or not a_ethnicb gen a_ethnicb = a_ethnica recode a_ethnicb(2/7=2) label var a_ethnicb "R's Ethnicity: Majority or not" label define a_ethnica_l 1 "Majority: White" 2 "Minority" -8"Not Applicable" -2 "Refused to Answer" -1"Don't Know" label value a_ethnicb a_ethnica_l * R's place of residence is urban or rural a_urban /*WIKI: United States urban area: Urbanized Areas have populations of greater than 50,000, while Urban Clusters have populations of less than 50,000 but more than 2,500.*/ gen a_urban=ER46975A recode a_urban(0=-8) (1/6 = 1)(7/9=2) label variable a_urban "R's place of residence is urban or rural" label define a_urban_l -8"Not Applicable" -2 "Refused to Answer" -1"Don't Know" /// 1"Urban" 2"Rural",modify label values a_urban a_urban_l tab a_urban, mi tab a_urban if a_urban >0 save File_US, replace * Number of siblings of R a_sib /*Head & Wife*/ use "$datadir\FAM2009ER" egen a_sia_w_09=rowtotal(ER46432 ER46438),missing replace a_sia_w_09 = ER46432 if ER46438 == 99 replace a_sia_w_09 = ER46438 if ER46432 == 99 replace a_sia_w_09 = -8 if ER46432 == 99 & ER46438 == 99 egen a_sia_h_09=rowtotal(ER46526 ER46532),missing replace a_sia_h_09 = ER46526 if ER46532 == 99 replace a_sia_h_09 = ER46532 if ER46526 == 99 replace a_sia_h_09 = -8 if ER46526 == 99 & ER46532 == 99 keep ER42002 a_sia_w_09 a_sia_h_09 save uscompute\fam, replace use File_US merge m:1 ER42002 using uscompute\fam drop _merge gen a_sib = . replace a_sib = a_sia_w_09 if ER34003 == 20|ER34003 == 22 replace a_sib = a_sia_h_09 if ER34003 == 10 label var a_sib "Number of siblings of R" label define numerical_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" label value a_sib numerical_l tab a_sib,mi tab a_sib if a_sib >=0 save File_US, replace * Birth order of R a_birthorder *to mother clonevar a_birthorder=ER32013 recode a_birthorder (99 = .) ( 98= -8) label value a_birthorder numerical_l label var a_birthorder "Birth Order of R" tab a_birthorder,mi tab a_birthorder if a_birthorder > 0 * Year of birth of R's father a_birthy_f clonevar a_birthy_f=ER32018 recode a_birthy_f (9998=-8) (9999=.) label var a_birthy_f "Year of birth of R's father" label value a_birthy_f numerical_l * Year of birth of R's mother a_birthy_m clonevar a_birthy_m=ER32011 recode a_birthy_m (9998=-8) (9999=.) label var a_birthy_m "Year of birth of R's mother" label value a_birthy_m numerical_l * Year of birth of R's spouse a_birthy_s *tab ER42017 age of head 09 *tab ER42019 age of wife 09 *year 2009 save File_US, replace use "$datadir\FAM2009ER" rename ER42017 ageh09 rename ER42019 agew09 recode ageh09 agew09 (999=-1) (0=-8) gen birthyh09 = 2009 -ageh09 if ageh09 >0 gen birthyw09 = 2009 -agew09 if agew09 >0 replace birthyh09 = ageh09 if ageh09 < 0 replace birthyw09 = agew09 if agew09 < 0 keep ER42002 ageh09 agew09 birthyh09 birthyw09 save uscompute\fam, replace use File_US merge m:1 ER42002 using uscompute\fam drop _merge save File_US, replace gen a_birthy_s = . replace a_birthy_s = birthyh09 if ER34003 == 20|ER34003 == 22 replace a_birthy_s = birthyw09 if ER34003 == 10 label value a_birthy_s numerical_l label var a_birthy_s "Year of birth of R's spouse" tab a_birthy_s, mi sum a_birthy_s if a_birthy_s > 0 * Age of R's spouse a_age_s gen a_age_s = . recode ageh09 agew09 (0=-8) replace a_age_s = ageh09 if ER34003 == 20|ER34003 == 22 replace a_age_s = agew09 if ER34003 == 10 label value a_age_s numerical_l label var a_age_s "Age of R's spouse" tab a_age_s, mi sum a_age_s if a_age_s > 0 * NUMBER OF CHILDREN *ER32022: # Live births to this individual *minus #children born after 2009 *ER32024 year 1st/only child born *ER32026 year youngest child born *ER32028 year 2nd youngest child born *ER32030 3rd *ER32032 4th clonevar a_child=ER32022 recode a_child (98=-8)(99=.) foreach i in ER32024 ER32026 ER32028 ER32030 ER32032 { recode `i' (9999 = -8) replace a_child = a_child - 1 if `i' >2009 & `i' != . } label var a_child "Number of Children of R" label value a_child numerical_l tab a_child, mi tab a_child if a_child >= 0 * Year of birth of R's children a_birthy_c1-a_birthy_c10 gen a_birthy_c1 = ER32024 //first child forvalues j = 2/5{ gen a_birthy_c`j' = . } local N = _N forvalues i = 1/`N' { if ER32032[`i'] > 0 { qui replace a_birthy_c2 in `i' = ER32032[`i'] qui replace a_birthy_c3 in `i' = ER32030[`i'] qui replace a_birthy_c4 in `i' = ER32028[`i'] qui replace a_birthy_c5 in `i' = ER32026[`i'] } else if ER32030[`i'] > 0 { qui replace a_birthy_c2 in `i' = ER32030[`i'] qui replace a_birthy_c3 in `i' = ER32028[`i'] qui replace a_birthy_c4 in `i' = ER32026[`i'] } else if ER32028[`i'] > 0 { qui replace a_birthy_c2 in `i' = ER32028[`i'] qui replace a_birthy_c3 in `i' = ER32026[`i'] } else if ER32026[`i'] > 0 { qui replace a_birthy_c2 in `i' = ER32026[`i'] } } forvalues j = 1/5 { replace a_birthy_c`j' = -8 if ER32022 == 0 replace a_birthy_c`j' = . if a_birthy_c`j' >2009 label var a_birthy_c`j' "Year of birth of R's children" label value a_birthy_c`j' numerical_l } * Month of birth of R's children a_birthm_c1-a_birthm_c10 *ER32023 1st/only child born *ER32025 youngest child born *ER32027 2nd youngest *ER32029 3rd *ER32031 4th recode ER32023 ER32025 ER32027 ER32029 ER32031 (21=1) (22=4)(23=7)(24=10) /// (98=-1) (99=.) gen a_birthm_c1 = ER32023 //first child forvalues j = 2/5{ gen a_birthm_c`j' = . } local N = _N forvalues i = 1/`N' { if ER32032[`i'] > 0 { qui replace a_birthm_c2 in `i' = ER32031[`i'] qui replace a_birthm_c3 in `i' = ER32029[`i'] qui replace a_birthm_c4 in `i' = ER32027[`i'] qui replace a_birthm_c5 in `i' = ER32025[`i'] } else if ER32030[`i'] > 0 { qui replace a_birthm_c2 in `i' = ER32029[`i'] qui replace a_birthm_c3 in `i' = ER32027[`i'] qui replace a_birthm_c4 in `i' = ER32025[`i'] } else if ER32028[`i'] > 0 { qui replace a_birthm_c2 in `i' = ER32027[`i'] qui replace a_birthm_c3 in `i' = ER32025[`i'] } else if ER32026[`i'] > 0 { qui replace a_birthm_c2 in `i' = ER32025[`i'] } } forvalues j = 1/5 { replace a_birthm_c`j' = -8 if ER32022 == 0 replace a_birthm_c`j' = . if a_birthy_c`j' >2009 label var a_birthm_c`j' "Month of birth of R's children" label value a_birthm_c`j' numerical_l } save File_US, replace ***************************** *Part 2. Education ***************************** * Years of schooling of R from IND2013ER clonevar a_eduy = ER34020 replace a_eduy = -8 if ER34020 == 99 //na replace a_eduy = -1 if ER34020 == 98 //dk replace a_eduy = -8 if a_age < 16 mvdecode a_eduy, mv(0) label define a_eduy_l -8"Not Applicable" -2 "Refused to Answer" -1"Don't Know" label var a_eduy "Years of Schooling of R" label value a_eduy a_eduy_l tab a_eduy, mi tab a_eduy if a_eduy >=0 * Highest educational level attained by R gen a_edu = . replace a_edu = 1 if (a_eduy <= 8 & a_eduy >= 0 ) // 1. Elementary and Below replace a_edu = 2 if (a_eduy <= 11 & a_eduy >= 9) // 2. Junior High and Vocational School replace a_edu = 3 if a_eduy == 12 // 3. Senior High and Vocational School replace a_edu = 4 if (a_eduy <= 15 & a_eduy >= 13) // 4. Vocational College or Some College replace a_edu = 5 if (a_eduy <= 20 & a_eduy >= 16) // 5. Bachelor Degree and above replace a_edu = a_eduy if mi(a_edu) label define a_edu_l 1 "Elementary and Below" 2 "Junior High and Vocational School" 3 "Senior High and Vocational School" 4 "Vocational College or Some College" 5 "Bachelor Degree and Above" -1 "Don't Know" -2 "Refuse to Answer" -8 "Not Applicable" label values a_edu a_edu_l label variable a_edu "Highest Educational Level Attained" tab a_edu , mi tab a_edu if a_edu >=0 save File_US, replace * Highest educational level attained by R's spouse /* ER46457 "K43 WTR WIFE EDUCATED IN US" ER46458 "K44 WTR GRADUATED HS-WF" ER46466 "K49 GRADE OF SCHOOL FINISHED-W" ER46474 "K55 HGHST COLLEGE DEGREE RECD-WF" ER46478 "K61 FOREIGN DEGREES-WIFE" ER46551 "L43 WTR HEAD EDUCATED IN US" ER46552 "L44 WTR GRADUATED HS-HD" ER46560 "L49 GRADE OF SCHOOL FINISHED-HD" ER46566 "L53 HGHST YR COLL COMPLETED-HD" ER46572 "L61 FOREIGN DEGREES-HEAD" */ use "$datadir\FAM2009ER" gen edu_w = . *US degree replace edu_w = 1 if ER46457 == 5 replace edu_w = 1 if ER46466 >= 1 & ER46466 <= 8 replace edu_w = 2 if ER46466 >= 9 & ER46466 <= 11 replace edu_w = 3 if ER46458 == 1 | ER46458 == 2 replace edu_w = 5 if ER46474 >= 1 replace edu_w = -8 if ER42019 == 0 *foreign degree gen edu_w_f = ER46478 recode edu_w_f (0 =. ) (6 7 = 5) (9=.) replace edu_w = edu_w_f if (mi(edu_w) | !mi(edu_w) & (edu_w < edu_w_f)) & !mi(edu_w_f) replace edu_w = -1 if ER46466 == 98 | ER46458 == 8 | ER46457 == 8 replace edu_w = -8 if ER46466 == 99 | ER46458 == 9 | ER46478 == 9 | ER46457 == 9 gen edu_h = . *US degree replace edu_h = 1 if ER46551 == 5 replace edu_h = 1 if ER46560 >= 1 & ER46560 <= 8 replace edu_h = 2 if ER46560 >= 9 & ER46560 <= 11 replace edu_h = 3 if ER46552 == 1 | ER46552 == 2 replace edu_h = 5 if ER46566 >= 1 *foreign degree gen edu_h_f = ER46572 recode edu_h_f (0 =. ) (6 7 = 5) (9=.) replace edu_h = edu_h_f if (mi(edu_h) | !mi(edu_h) & (edu_h < edu_h_f)) & !mi(edu_h_f) replace edu_h = -1 if ER46560 == 98 | ER46552 == 8 | ER46551 == 8 replace edu_h = -8 if ER46560 == 99 | ER46552 == 9 | ER46572 == 9 |ER46551 == 9 * Highest educational level attained by R's father a_edu_f *WF: ER46414: how much education father complete in the US (categories of grades) *WF: ER46418: highest degree/certificate earned outside US *HD: ER46508 :L5 EDUCATION OF FATHER IN US-HD *HD: ER46512 :L9 FOREIGN DEGREES OF FATHER-HD *Highest educational level attained by R's mother a_edu_m *ER46424 K15 EDUCATION OF MOTHER IN US-WF *ER46428 K19 FOREIGN DEGREES OF MOTHER-WF *ER46518 L15 EDUCATION OF MOTHER IN US-HD *ER46522 L19 FOREIGN DEGREES OF MOTHER-HD gen edu_f_w = ER46414 recode edu_f_w (0=-8)(1 2 =1) (3 = 2) (4 5 = 3) (6 =4 )(7 8 =5) (99=-1) clonevar aedu_f_w = ER46418 recode aedu_f_w (5 6 7 = 5) (9=-1) (0= -8) replace edu_f_w = max(edu_f_w, aedu_f_w) if aedu_f_w >0 gen edu_f_h = ER46508 recode edu_f_h (0=-8)(1 2 =1) (3 = 2) (4 5 = 3) (6 =4 )(7 8 =5) (99=-1) clonevar aedu_f_h = ER46512 recode aedu_f_h (5 6 7 = 5) (9=-1) (0= -8) replace edu_f_h = max(edu_f_h, aedu_f_h) if aedu_f_h >0 gen edu_m_w = ER46424 recode edu_m_w (0=-8)(1 2 =1) (3 = 2) (4 5 = 3) (6 =4 )(7 8 =5) (99=-1) clonevar aedu_m_w = ER46428 recode aedu_m_w (5 6 7 = 5) (9=-1) (0= -8) replace edu_m_w = max(edu_m_w, aedu_m_w) if aedu_m_w >0 gen edu_m_h = ER46518 recode edu_m_h (0=-8)(1 2 =1) (3 = 2) (4 5 = 3) (6 =4 )(7 8 =5) (99=-1) clonevar aedu_m_h = ER46522 recode aedu_m_h (5 6 7 = 5) (9=-1) (0= -8) replace edu_m_h = max(aedu_m_h, edu_m_h) if aedu_m_h >0 drop aedu_f_w aedu_f_h aedu_m_w aedu_m_h keep edu_f_w edu_f_h edu_m_w edu_m_h ER42002 edu_h edu_w save uscompute\eduparent, replace use File_US merge m:1 ER42002 using uscompute\eduparent drop _merge gen a_edu_s = . gen a_edu_f = . gen a_edu_m = . replace a_edu_f = edu_f_w if ER34003 == 20|ER34003 == 22 replace a_edu_f = edu_f_h if ER34003 == 10 replace a_edu_m = edu_m_w if ER34003 == 20|ER34003 == 22 replace a_edu_m = edu_m_h if ER34003 == 10 replace a_edu_s = edu_h if ER34003 == 20|ER34003 == 22 replace a_edu_s = edu_w if ER34003 == 10 label value a_edu_s a_edu_f a_edu_m a_edu_l label var a_edu_f "Highest educational level attained by R's father" label var a_edu_m "Highest educational level attained by R's mother" label var a_edu_s "Highest educational level attained by R's spouse" tab a_edu_f, mi tab a_edu_f if a_edu_f >=0 tab a_edu_m, mi tab a_edu_m if a_edu_m >= 0 tab a_edu_s, mi tab a_edu_s if a_edu_s >= 0 save File_US, replace ***************************** *Part 3. Individual's Labor Market Outcomes ***************************** * Employment Status *ER34016 gen a_employ = . replace a_employ = 1 if ER34016 == 1 //1. Employed replace a_employ = 2 if ER34016 == 2 | ER34016 ==3 //2. Unemployed replace a_employ = 3 if ER34016 >=4 & ER34016 <= 7 //3. Not in Labour Market replace a_employ = -1 if ER34016 == 8 replace a_employ = -8 if ER34016 == 9 replace a_employ = -8 if a_age <=16 label define a_employ_l 1 "Employed" /// 2 "Unemployed" /// 3 "Not in Labour Market" /// -8 "Not Applicable" -2 "Refused" -1 "Don't Know" label values a_employ a_employ_l label variable a_employ "Employment Status" tab a_employ , mi tab a_employ if a_employ >=0 * Working hours per week clonevar a_workhour_week = ER33927C //OFUM HRS PER WK WORKED 2005 "07 replace a_workhour_week = . if ER33927C == 0 replace a_workhour_week = -1 if ER33927C == 998 //DK replace a_workhour_week = -2 if ER33927C == 999 //refused replace a_workhour_week = -8 if mi(a_workhour_week) & a_employ != 1 label define a_workhour_l -8 "Not Applicable" /// -2 "Refused" /// -1 "Don't Know" label values a_workhour_week a_workhour_l label variable a_workhour_week "Working Hours per Week" sum a_workhour_week if a_workhour_week > 0 tab a_workhour_week, mi save File_US, replace * Occupation related use "$datadir\FAM2009ER" clonevar a_isco_h=ER42167 clonevar a_isco_w=ER42419 clonevar a_isco_first_w=ER46502 clonevar a_isco_first_h=ER46596 clonevar a_isco_f_w=ER46419 clonevar a_isco_f_h=ER46513 clonevar a_isco_m_w=ER46429 clonevar a_isco_m_h=ER46523 rename ER42002 ER34001 keep ER34001 a_isco_h - a_isco_m_h save uscompute\occup,replace use File_US merge m:1 ER34001 using uscompute\occup drop _merge recode a_isco_h - a_isco_m_h (0=.) (999=-8) * Occupation (ISCO88/08 standardization) a_isco *ER42167 BC20 MAIN OCC FOR JOB 1: 2000 CODE (HD) *ER42419 DE20 MAIN OCC FOR JOB 1: 2000 CODE (WF) gen a_isco = . replace a_isco = a_isco_w if ER34003 == 20|ER34003 == 22 replace a_isco = a_isco_h if ER34003 == 10 label var a_isco "Occupation" label value a_isco numerical_l * Occupation first job *ER46502 K72 OCCUPATION 1ST FULL TIME JOB-WF *ER46596 L72-72A OCCUPATION 1ST FULL TIME JOB-HD gen a_isco_first = . replace a_isco_first = a_isco_first_w if ER34003 == 20|ER34003 == 22 replace a_isco_first = a_isco_first_h if ER34003 == 10 label var a_isco_first "Occupation First Job" label value a_isco_first numerical_l * Occupation of R's spouse's main job a_isco_s gen a_isco_s = . replace a_isco_s = a_isco_w if ER34003 == 10 replace a_isco_s = a_isco_h if ER34003 == 20|ER34003 == 22 label var a_isco_s "Occupation of R's spouse's main job" label value a_isco_s numerical_l * Occupation of father mother when growing up *ER46419 K10-10A OCCUPATION OF FATHER-WF *ER46513 L10-10A OCCUPATION OF FATHER-HD *ER46429 K20-20A OCCUPATION OF MOTHER-WF *ER46523 L20-20A OCCUPATION OF MOTHER-HD gen a_isco_f = . replace a_isco_f = a_isco_f_w if ER34003 == 20|ER34003 == 22 replace a_isco_f = a_isco_f_h if ER34003 == 10 label var a_isco_f "Occupation of Father R's father when R was a child" label value a_isco_f numerical_l gen a_isco_m = . replace a_isco_m = a_isco_m_w if ER34003 == 20|ER34003 == 22 replace a_isco_m = a_isco_m_h if ER34003 == 10 label var a_isco_m "Occupation of Father R's mother when R was a child" label value a_isco_m numerical_l save File_US, replace * Industry of R's main job a_industry *ER42420 DE21 MAIN IND FOR JOB 1: 2000 CODE (WF) *ER42168 BC21 MAIN IND FOR JOB 1: 2000 CODE (HD) use "$datadir\FAM2009ER" clonevar a_industry_w=ER42420 clonevar a_industry_h=ER42168 clonevar a_orgtype_h=ER42171 clonevar a_orgtype_w=ER42423 rename ER42002 ER34001 keep ER34001 a_industry_w - a_orgtype_w save uscompute\job, replace use File_US merge m:1 ER34001 using uscompute\job drop _merge gen a_industry = . replace a_industry = a_industry_w if ER34003 == 20|ER34003 == 22 replace a_industry = a_industry_h if ER34003 == 10 recode a_industry (17/29 =1) (37/49=2) (57/69 =3 )( 77=4) (107 / 399 = 5)(407/459=6) /// (467 /579=7) (607/639 = 8) (647/679 =9) (687/699 =10)(707/719 =11) /// (727/749=12) (757 /779=13) (786/789 =14)(797/847=15)(856/859=16) (866/869=17) /// (877/929 = 18) (937 /987 =19) (999=-8) (0=.) label define industry_l -8 "Not Applicable" -2"Refused to Answer" -1"Don't Know" /// 1"Agriculture, Forestry, Fishing, and Hunting" 2"Mining" 3"Utilities" 4"Construction" /// 5"Manufacturing" 6"Wholesale Trade" 7"Retail Trade"8 "Transportation and Warehousing" /// 9"Information" 10"Finance and Insurance"11 "Real Estate and Rental and Leasing" /// 12"Professional, Scientific, and Technical Services" /// 13"Management, Administrative and Support, and Waste Management Services" /// 14"Educational Services"15 "Health Care and Social Assistance" 16"Arts, Entertainment, and Recreation" /// 17"Accommodations and Food Services" 18"Other Services (Except Public Administration)" /// 19"Public Administration and Active Duty Military" label value a_industry industry_l label var a_industry "Industry of R's main job" tab a_industry,mi tab a_industry if a_industry > 0 * Orgnization type (main job) a_orgtype *ER42171 BC24 WORK FOR GOVT?--JOB 1 *ER42423 DE24 WORK FOR GOVT?--JOB 1 gen a_orgtype = . replace a_orgtype = a_orgtype_w if ER34003 == 20|ER34003 == 22 replace a_orgtype = a_orgtype_h if ER34003 == 10 save File_US, replace * Average monthly income from main job use "$datadir\FAM2009ER" gen a_monthinc_h=. if ER42209==0 replace a_monthinc_h=ER42209*ER42203*4 if ER42210==1 & ER42203>=1&ER42203<=112 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 //if hourly rate is reported, adjusted by hours/week worked replace a_monthinc_h=ER42209*30 if ER42210==2 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_monthinc_h=ER42209*4 if ER42210==3 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_monthinc_h=ER42209*2 if ER42210==4 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_monthinc_h=ER42209 if ER42210==5 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_monthinc_h=ER42209/12 if ER42210==6 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_monthinc_h = -1 if ER42210 == 7 replace a_monthinc_h = -2 if ER42210 == 9 replace a_monthinc_h = -8 if mi(a_monthinc_h) gen a_monthinc_w=. if ER42461==0 replace a_monthinc_w=ER42461*ER42455*4 if ER42462==1 & ER42455>=1&ER42455<=112 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 //if hourly rate is reported, adjusted by hours/week worked replace a_monthinc_w=ER42461*30 if ER42462==2 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_monthinc_w=ER42461*4 if ER42462==3 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_monthinc_w=ER42461*2 if ER42462==4 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_monthinc_w=ER42461 if ER42462==5 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_monthinc_w=ER42461/12 if ER42462==6 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_monthinc_w = -1 if ER42462 == 7 replace a_monthinc_w = -2 if ER42462 == 9 replace a_monthinc_w = -8 if mi(a_monthinc_w) * Hourly wage (wage rate) for main job generate a_hourwagemain_h=. replace a_hourwagemain_h = -8 if ER42188 == 0 replace a_hourwagemain_h = -1 if ER42188 == 998 replace a_hourwagemain_h = -2 if ER42188 == 999 replace a_hourwagemain_h = ER42188 if ER42188<=997 & ER42188>0 generate a_hourwagemain_w=. if ER42440==0 replace a_hourwagemain_w = ER42440 if ER42440<=997 & ER42440>0 replace a_hourwagemain_w = -8 if ER42440 == 0 replace a_hourwagemain_w = -1 if ER42440 == 998 replace a_hourwagemain_w = -2 if ER42440 == 999 * Income from current main job (Amount earned last year adjusted by time unit) *hours/week worked at Job 1: Head: ER42203; wife: ER42455 gen a_yearinc1_h=. replace a_yearinc1_h=ER42209*ER42203*52 if ER42210==1 & ER42203>=1&ER42203<=112 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 //if hourly rate is reported, adjusted by hours/week worked replace a_yearinc1_h=ER42209/8*(ER42203*52) if ER42210==2 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_yearinc1_h=ER42209*52 if ER42210==3 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_yearinc1_h=ER42209*26 if ER42210==4 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_yearinc1_h=ER42209*12 if ER42210==5 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_yearinc1_h=ER42209 if ER42210==6 & ER42209>=-999997& ER42209<=9999997&ER42209!=0 replace a_yearinc1_h = -1 if ER42210 == 8 replace a_yearinc1_h = -2 if ER42210 == 9 replace a_yearinc1_h = -8 if mi(a_yearinc1_h) gen a_yearinc1_w=. if ER42461==0 replace a_yearinc1_w=ER42461*ER42455*52 if ER42462==1 & ER42455>=1&ER42455<=112 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_yearinc1_w=ER42461/8*(ER42455*52) if ER42462==2 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_yearinc1_w=ER42461*52 if ER42462==3 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_yearinc1_w=ER42461*26 if ER42462==4 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_yearinc1_w=ER42461*12 if ER42462==5 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_yearinc1_w=ER42461 if ER42462==6 & ER42461>=-999997& ER42461<=9999997&ER42461!=0 replace a_yearinc1_w = -1 if ER42462 == 8 replace a_yearinc1_w = -2 if ER42462 == 9 replace a_yearinc1_w = -8 if mi(a_yearinc1_w) *Job 2 gen a_yearinc2_h_=. replace a_yearinc2_h_=ER42239*ER42233*52 if ER42240==1 & ER42233>=1&ER42233<=112 & ER42239>=-999997& ER42239<=9999997&ER42239!=0 replace a_yearinc2_h_=ER42239/8*ER42233*52 if ER42240==2 & ER42239>=-999997& ER42239<=9999997&ER42239!=0 replace a_yearinc2_h_=ER42239*52 if ER42240==3 & ER42239>=-999997& ER42239<=9999997&ER42239!=0 replace a_yearinc2_h_=ER42239*26 if ER42240==4 & ER42239>=-999997& ER42239<=9999997&ER42239!=0 replace a_yearinc2_h_=ER42239*12 if ER42240==5 & ER42239>=-999997& ER42239<=9999997&ER42239!=0 replace a_yearinc2_h_=ER42239 if ER42240==6 & ER42239>=-999997& ER42239<=9999997&ER42239!=0 gen a_yearinc2_w_=. replace a_yearinc2_w_=ER42491*ER42485*52 if ER42492==1 & ER42485>=1&ER42485<=112 & ER42491>=-999997& ER42491<=9999997&ER42491!=0 replace a_yearinc2_w_=ER42491/8*ER42485*52 if ER42492==2 & ER42491>=-999997& ER42491<=9999997&ER42491!=0 replace a_yearinc2_w_=ER42491*52 if ER42492==3 & ER42491>=-999997& ER42491<=9999997&ER42491!=0 replace a_yearinc2_w_=ER42491*26 if ER42492==4 & ER42491>=-999997& ER42491<=9999997&ER42491!=0 replace a_yearinc2_w_=ER42491*12 if ER42492==5 & ER42491>=-999997& ER42491<=9999997&ER42491!=0 replace a_yearinc2_w_=ER42491 if ER42492==6 & ER42491>=-999997& ER42491<=9999997&ER42491!=0 *Job 3 gen a_yearinc3_h=. replace a_yearinc3_h=ER42269*ER42263*52 if ER42270==1 & ER42263>=1&ER42263<=112 & ER42269>=-999997& ER42269<=9999997&ER42269!=0 replace a_yearinc3_h=ER42269/8*ER42263*52 if ER42270==2 & ER42269>=-999997& ER42269<=9999997&ER42269!=0 replace a_yearinc3_h=ER42269*52 if ER42270==3 & ER42269>=-999997& ER42269<=9999997&ER42269!=0 replace a_yearinc3_h=ER42269*26 if ER42270==4 & ER42269>=-999997& ER42269<=9999997&ER42269!=0 replace a_yearinc3_h=ER42269*12 if ER42270==5 & ER42269>=-999997& ER42269<=9999997&ER42269!=0 replace a_yearinc3_h=ER42269 if ER42270==6 & ER42269>=-999997& ER42269<=9999997&ER42269!=0 gen a_yearinc3_w=. replace a_yearinc3_w=ER42521*ER42515*52 if ER42522==1 & ER42515>=1&ER42515<=112 & ER42521>=-999997& ER42521<=9999997&ER42521!=0 replace a_yearinc3_w=ER42521/8*ER42515*52 if ER42522==2 & ER42521>=-999997& ER42521<=9999997&ER42521!=0 replace a_yearinc3_w=ER42521*52 if ER42522==3 & ER42521>=-999997& ER42521<=9999997&ER42521!=0 replace a_yearinc3_w=ER42521*26 if ER42522==4 & ER42521>=-999997& ER42521<=9999997&ER42521!=0 replace a_yearinc3_w=ER42521*12 if ER42522==5 & ER42521>=-999997& ER42521<=9999997&ER42521!=0 replace a_yearinc3_w=ER42521 if ER42522==6 & ER42521>=-999997& ER42521<=9999997&ER42521!=0 *Job 4 gen a_yearinc4_h=. replace a_yearinc4_h=ER42299*ER42293*52 if ER42300==1 & ER42293>=1&ER42293<=112 & ER42299>=-999997& ER42299<=9999997&ER42299!=0 replace a_yearinc4_h=ER42299/8*ER42293*52 if ER42300==2 & ER42299>=-999997& ER42299<=9999997&ER42299!=0 replace a_yearinc4_h=ER42299*52 if ER42300==3 & ER42299>=-999997& ER42299<=9999997&ER42299!=0 replace a_yearinc4_h=ER42299*26 if ER42300==4 & ER42299>=-999997& ER42299<=9999997&ER42299!=0 replace a_yearinc4_h=ER42299*12 if ER42300==5 & ER42299>=-999997& ER42299<=9999997&ER42299!=0 replace a_yearinc4_h=ER42299 if ER42300==6 & ER42299>=-999997& ER42299<=9999997&ER42299!=0 gen a_yearinc4_w=. replace a_yearinc4_w=ER42551*ER42545*52 if ER42552==1 & ER42545>=1&ER42545<=112 & ER42551>=-999997& ER42551<=9999997&ER42551!=0 replace a_yearinc4_w=ER42551/8*ER42545*52 if ER42552==2 & ER42551>=-999997& ER42551<=9999997&ER42551!=0 replace a_yearinc4_w=ER42551*52 if ER42552==3 & ER42551>=-999997& ER42551<=9999997&ER42551!=0 replace a_yearinc4_w=ER42551*26 if ER42552==4 & ER42551>=-999997& ER42551<=9999997&ER42551!=0 replace a_yearinc4_w=ER42551*12 if ER42552==5 & ER42551>=-999997& ER42551<=9999997&ER42551!=0 replace a_yearinc4_w=ER42551 if ER42552==6 & ER42551>=-999997& ER42551<=9999997&ER42551!=0 * Annual income from other job (job2+job3+job4)* egen a_yearinc2_h=rowtotal (a_yearinc2_h_ a_yearinc3_h a_yearinc4_h),missing egen a_yearinc2_w=rowtotal (a_yearinc2_w_ a_yearinc3_w a_yearinc4_w),missing *replace the negative values replace a_yearinc2_h = -1 if ER42240 == 8 replace a_yearinc2_h = -2 if ER42240 == 9 replace a_yearinc2_h = -8 if mi(a_yearinc2_h) replace a_yearinc2_w = -1 if ER42492 == 8 replace a_yearinc2_w = -2 if ER42492 == 9 replace a_yearinc2_w = -8 if mi(a_yearinc2_w) * Pension: (retirement pay+annuities+others total) annualized gen a_retire_h=. replace a_retire_h=ER43126*12 if ER43127==5 replace a_retire_h=ER43126 if ER43127==6 gen a_ann_h=. if ER43142==0 replace a_ann_h=ER43142*12 if ER43143==5 replace a_ann_h=ER43142 if ER43143==6 gen a_peno_h=. if ER43158==0 replace a_peno_h=ER43158*12 if ER43159==5 replace a_peno_h=ER43158 if ER43159==6 egen a_pensioninc_h=rowtotal(a_retire_h a_ann_h a_peno_h),missing replace a_pensioninc_h = -8 if mi(a_pensioninc_h) gen a_pensioninc_w=. replace a_pensioninc_w=ER43458*12 if ER43459==5 replace a_pensioninc_w=ER43458 if ER43459==6 replace a_pensioninc_w = -1 if ER43459 == 8|ER43127 == 7 replace a_pensioninc_w = -2 if ER43459 == 9 replace a_pensioninc_w = -8 if mi(a_pensioninc_w) * Total labor income 2008 clonevar a_income_h=ER46829 clonevar a_income_w=ER46841 keep ER42002 a_monthinc_h-a_income_w save uscompute\income,replace ***************** use File_US merge m:1 ER42002 using uscompute\income drop _merge gen a_monthinc = . replace a_monthinc = a_monthinc_w if ER34003 == 20|ER34003 == 22 replace a_monthinc = a_monthinc_h if ER34003 == 10 label value a_monthinc numerical_l label var a_monthinc "Average monthly income (main job)" tab a_monthinc,mi sum a_monthinc if a_monthinc >=0 gen a_hourwage = . replace a_hourwage = a_hourwagemain_w if ER34003 == 20|ER34003 == 22 replace a_hourwage = a_hourwagemain_h if ER34003 == 10 replace a_hourwage = a_monthinc/4/a_workhour_week /// if a_monthinc >0 & !mi(a_monthinc) & a_workhour_week > 0 & !mi(a_workhour_week) label value a_hourwage numerical_l label var a_hourwage "Hourly wage rate (main job)" tab a_hourwage,mi sum a_hourwage if a_hourwage >=0 gen a_yearinc1 = . replace a_yearinc1 = a_yearinc1_w if ER34003 == 20|ER34003 == 22 replace a_yearinc1 = a_yearinc1_h if ER34003 == 10 label value a_yearinc1 numerical_l label var a_yearinc1 "Income from main job last year (main job)" tab a_yearinc1,mi insp a_yearinc1 gen a_yearinc2 = . replace a_yearinc2 = a_yearinc2_w if ER34003 == 20|ER34003 == 22 replace a_yearinc2 = a_yearinc2_h if ER34003 == 10 label value a_yearinc2 numerical_l label var a_yearinc2 "Income from other job last year" tab a_yearinc2,mi sum a_yearinc2 gen a_pensioninc = . replace a_pensioninc = a_pensioninc_w if ER34003 == 20|ER34003 == 22 replace a_pensioninc = a_pensioninc_h if ER34003 == 10 label value a_pensioninc numerical_l label var a_pensioninc "Annual pension (for retired)" rename a_pensioninc a_pension gen a_income = . replace a_income = a_income_w if ER34003 == 20|ER34003 == 22 replace a_income = a_income_h if ER34003 == 10 label value a_income numerical_l label var a_income "Total labor income last year" tab a_income,mi sum a_income if a_income >0 save File_US,replace * Working experience a_exp *ER46594 L70 #YRS WRKD SINCE 18-HD *ER46500 K70 #YRS WRKD SINCE 18-WF use "$datadir\FAM2009ER" clonevar a_exp_h = ER46594 clonevar a_exp_w = ER46500 rename ER42002 ER34001 keep ER34001 a_exp_h a_exp_w save uscompute\exp, replace use File_US merge m:1 ER34001 using uscompute\exp drop _merge gen a_exp = . replace a_exp = a_exp_w if ER34003 == 20|ER34003 == 22 replace a_exp = a_exp_h if ER34003 == 10 recode a_exp (0=-8)(99=-1) label value a_exp numerical_l label var a_exp "Working Experience" *-8: never worked, head <18, tab a_exp,mi sum a_exp if a_exp >=0 * Tenure of current job a_tenure *ER42152 BC6 BEGINNING YEAR--JOB 1 [HEAD] *ER42154 BC6 ENDING YEAR--JOB 1 [HEAD] *ER42404 DE6 BEGINNING YEAR--JOB 1[WIFE] *ER42406 DE6 ENDING YEAR--JOB 1[WIFE] save File_US, replace use "$datadir\FAM2009ER" keep ER42002 ER42152 ER42154 ER42404 ER42406 ER42179 ER42431 save uscompute\tenure, replace use File_US merge m:1 ER42002 using uscompute\tenure drop _merge recode ER42152 ER42154 ER42404 ER42406(0 = -8) (9996 = 2008) (9997 9998 = -1) (9999=-2) gen tenure_h = . replace tenure_h = -8 if ER42154 >= 0 & !mi(ER42154) & ER42152 >=0 & !mi(ER42152) replace tenure_h = a_syear - ER42152 if ER42154 < 0 & !mi(ER42154) & ER42152 >=0 & !mi(ER42152) replace tenure_h = ER42152 if ER42152 < 0 & !mi(ER42152) replace tenure_h = ER42154 if ER42154 == -1 | ER42154 == -2 & tenure_h != -8 gen tenure_w = . replace tenure_w = -8 if ER42406 >= 0 & !mi(ER42406) & ER42404 >=0 & !mi(ER42404) replace tenure_w = a_syear - ER42404 if ER42406 < 0 & !mi(ER42406) & ER42404 >=0 & !mi(ER42404) replace tenure_w = ER42404 if ER42404 < 0 & !mi(ER42404) replace tenure_w = ER42406 if ER42406 == -1 | ER42406 == -2 & tenure_h != -8 gen a_tenure = . replace a_tenure = tenure_w if ER34003 == 20|ER34003 == 22 replace a_tenure = tenure_h if ER34003 == 10 label define a_tenure_l -8 "Not Applicable" -2"Refused to Answer" -1"Don't Know" 0 "Less than 1 Year" label value a_tenure a_tenure_l label var a_tenure "Tenure of Current Job" tab a_tenure, mi sum a_tenure if a_tenure >= 0 * Labor union member or not a_union *ER42179 BC27 BELONG UNION? (HD-E) *ER42431 DE27 BELONG UNION? (WF-E) gen a_union = . replace a_union = ER42431 if ER34003 == 20|ER34003 == 22 replace a_union = ER42179 if ER34003 == 10 recode a_union (0=-8) (5=0) (8=-1)(9=-2) label value a_union yesno label var a_union "Labor union member or not" tab a_union, mi tab a_union if a_union >= 0 save File_US, replace ***************************** *Part 4 Household Economic Activities ***************************** ******************************************************************************** * a_fsize * a_hhsize * a_gen * a_fstru * a_hhstruc ******************************************************************************** use "$datadir/FAM2009ER" keep ER42002 ER42016 ER42022 ER42023 save uscompute/fsize,replace use File_US merge m:1 ER42002 using uscompute/fsize drop _merge * Family size-a_fsize *ER42016 #inFU clonevar a_fsize = ER42016 label var a_fsize "Family Size" label define numeric_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" label value a_fsize numerical_l * Household size-a_hhsize gen a_hhsize=ER42016+ER42022 label var a_hhsize "Household Size" label value a_hhsize numerical_l * a_gen number of generations recode ER34003 (10/22=0) (30/38=-1) (40/48=0) (50/58=1) (60=-2) (65=-3) /// (66/67=2) (68/69=3) (70/71=-1) (72/73=1) (74/75=0) (83=-1) (88/90=0) (95/98=10) ,gen(gen) generate gentab=1 if gen <10 replace gentab=2 if gen==10 //other kind of relative to the head egen genm=max(gen) if gentab == 1 , by(ER34001) egen genn=min(gen) if gentab == 1, by(ER34001) gen a_gen=genm-genn+1 replace a_gen = -8 if gentab == 2 replace a_gen=4 if a_gen>4&a_gen!=. label variable a_gen "Number of generations in household" label define a_gen -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" 1 "1 Generation" 2 "2 Generations" 3 "3 Generations" 4 "4 or more Generations" label val a_gen a_gen * Family structure (using ER34003 and family size) /*first, count # of marital spouse, cohabiting spouse,children, extended family members, non-family members */ *marital spouse: legal wife or legal husband of Head egen married = total(ER34003==20|ER34003==90), by(ER34001) *cohabiting spouse: living for more than a year, or first-year egen cohabitor = total(ER34003==22|ER34003==88), by(ER34001) *child: son/daughter , stepson/daughter, foster son/daughter; in-laws? no included here egen child=total(ER34003==30|ER34003==33|ER34003==35|ER34003==38|ER34003==83), by(ER34001) egen grandchild=total(ER34003==60), by(ER34001) egen parent=total(ER34003>=50 & ER34003<=58), by(ER34001) egen grandparent=total(ER34003>=66 &ER34003<=67), by(ER34001) egen great_grandchild=total(ER34003==65), by(ER34001) egen great_grandparent=total(ER34003==68|ER34003==69), by(ER34001) *extended: excluding child, grandchild, parent, grandparentk egen extended=total((ER34003>=40 & ER34003<50) | (ER34003>=70 & ER34003<=75)|(ER34003>=95 & ER34003<=97)), by(ER34001) egen childinlaw=total(ER34003==37), by(ER34001) * non-relative egen nonrelative=total(ER34003==98), by(ER34001) *generate family structure: gen a_fstruc=. replace a_fstruc=1 if a_fsize==1 *primary single family (living by him/herself) replace a_fstruc=2 if a_gen==2 & married==0 & cohabitor==0 & child>0 & extended==0 & nonrelative==0 & parent==0 & childinlaw==0 *single with children replace a_fstruc=2 if a_gen==2 & married==0 & cohabitor==0 & child==0 & extended==0 & nonrelative==0 & parent==1 & childinlaw==0 & ER42023==2 *single with children(hardcheck marriage status) replace a_fstruc=3 if a_fsize==2 & (married==1|cohabitor==1) & child==0 & extended==0 & nonrelative==0 *couple without children replace a_fstruc=4 if a_gen==2 & a_fsize>2 & (married==1|cohabitor==1) & child>0 & extended==0 & childinlaw==0 & nonrelative==0 *couple with unmarried children replace a_fstruc=4 if a_gen==2 & a_fsize>2 & (married==0|cohabitor==0) & child==0 & parent>1 & extended==0 & nonrelative==0 & ER42023==2 *couple with unmarried children (hardcheck marriage status) replace a_fstruc=5 if ((child==1 | child==0)& childinlaw==1) & extended==0 & nonrelative==0 *stem: head with 0 or 1 child and 1 child-in-law, no extended, no non-relative; may live with partners, parents/parent-in laws, grandparents, great grandparents, grandchildren or great grandchildren (>=2 generations) replace a_fstruc=5 if a_gen>=2 & ((child==0|child!=0) & childinlaw==0) & parent>0 & (married==1|cohabitor==1)& extended==0 & nonrelative==0 replace a_fstruc=5 if a_gen>=2 & ((child==0|child!=0) & childinlaw==0) & parent>0 & (married==0|cohabitor==0)& extended==0 & nonrelative==0 & ER42023==1 *stem:(head with or without partners) with parents/parent-in laws, with or without child and no child-in-law, no extended, no non-relative (2 or 3 generations) replace a_fstruc=5 if a_gen>=3 & childinlaw==0 & (grandchild>0|great_grandchild>0) & nonrelative==0 & extended==0 *stem: head with grandchild/grandchildren, with or without child and no child-in-law, no nonrelative, no extended; may live with partners, parents/parent-in laws, grandparents or great grandparents (>=3 generation) replace a_fstruc=5 if a_gen>=3 & childinlaw==0 & (grandparent>0|great_grandparent>0) & nonrelative==0 & extended==0 *stem: head with grandparent/great grandparents, with or without child and no child-in-law , no extended, no nonrelative; may live with partners, parents/parent-in laws, grandchildren or great grandchildren (>=3 generation) replace a_fstruc=6 if a_fstruc == . label define fstruc_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" /// 1 "Primary Individual Family" 2 "Single-Parent Family" 3 "Married Couple with No Children" /// 4 "Married Couple with Children" 5 "Stem" 6"Other Family" label value a_fstruc fstruc_l label var a_fstruc "Family Structure" * Household Structure gen a_hhstruc = a_fstruc replace a_hhstruc=7 if nonrelative > 0 label define hhstruc -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" /// 1 "Primary Individual Household" 2 "Single-Parent Household" 3 "Married Couple with No Children" /// 4 "Married Couple with Children" 5 "Stem Family Household" 6"Other Household with No Non-relatives" 7 "Other Household with Non-relatives" label value a_hhstruc hhstruc label var a_hhstruc "Household Structure" save File_US, replace * Household Income *First, Obtain variables about family income from PSID-CNEF data set use "$datadir\pequiv_long" clonevar pid=x11101LL clonevar fid=x11102 clonevar a_flaborinc=i11103 clonevar a_assetinc=i11104 clonevar a_faminc_post=i11113 clonevar a_faminc_pre=i11101 keep if year==2009 drop if fid==. drop pid keep fid a_faminc_pre a_faminc_post a_flaborinc a_assetinc by fid,sort:gen n=_n by fid,sort:gen size=_N reshape wide a_faminc_pre a_faminc_post a_flaborinc a_assetinc, i(fid) j(n) keep fid a_faminc_pre1 a_faminc_post1 a_flaborinc1 a_assetinc1 rename a_faminc_pre1 a_faminc_pre label var a_faminc_pre "Pre-government Yearly Household Income" rename a_faminc_post1 a_faminc_post label var a_faminc_post "Post-government Yearly Household Income" rename a_flaborinc1 a_flaborinc label var a_flaborinc "Family Labor Income" rename a_assetinc1 a_assetinc label var a_assetinc "Family Income From Assets" rename fid ER42002 keep ER42002 a_faminc_post a_faminc_pre save uscompute\faminc,replace *Merge family income variables into PSID individual level data use File_US merge m:1 ER42002 using uscompute\faminc drop _merge ***************************** *Part. 5 Marriage ***************************** * Current marital status a_marriage *ER32049 LAST KNOWN MARITAL STATUS clonevar a_marriage = ER32049 replace a_marriage = 1 if ER32049 == 5 replace a_marriage = -8 if ER32049 == 8 replace a_marriage = . if ER32049 == 9 replace a_marriage = -8 if a_age <16 label define mar_l -8 "Not Applicable" 1 "Married" 2"Single" 3"Widowed" /// 4 "Divorced, annulment" label value a_marriage mar_l label var a_marriage "Current Marital Status" tab a_marriage, mi * Year of current marriage (for those married)? *ER32034 # Marriage of This Individual *ER32036 Year First /Only Marriage Began *ER32043 Year most recent marriage began gen a_cmarri_y = . replace a_cmarri_y = ER32043 if ER32034 >= 2 replace a_cmarri_y = ER32036 if ER32034 == 1 recode a_cmarri_y (9998=-1) (9999=. ) replace a_cmarri_y = -8 if ER32034 == 0 replace a_cmarri_y = -8 if a_cmarri_y >2009 & a_cmarri_y <=2013 replace a_cmarri_y = -8 if a_age <16 label var a_cmarri_y "Year of Current Marriage" label value a_cmarri_y numerical_l insp a_cmarri_y * Month of current marriage a_cmarri_m *ER32042 month most recent marriage began *ER32034 # Marriage of This Individual *ER32035 Month First /Only Marriage Began gen a_cmarri_m = . replace a_cmarri_m = ER32035 if ER32034 == 1 replace a_cmarri_m = ER32042 if ER32034 >= 2 recode a_cmarri_m (98 = -1) (99=.) /// (21 = 4) (22 = 7) (23=10) (24=1) //spring --->april replace a_cmarri_m = -8 if ER32034 == 0 replace a_cmarri_m = -8 if a_cmarri_y >2009 & a_cmarri_y <=2013 replace a_cmarri_m = -8 if a_age < 16 label var a_cmarri_m "Month of Current Marriage" label value a_cmarri_m numerical_l tab a_cmarri_m, mi * Year of first marriage a_fmarri_y *ER32036 Year First /Only Marriage Began clonevar a_fmarri_y = ER32036 recode a_fmarri_y (9998=-1)(9999=.) replace a_fmarri_y =. if ER32036 >2009& ER32036 <=2013 replace a_fmarri_y = -8 if a_age < 16 replace a_fmarri_y = -8 if ER32034 == 0 label var a_fmarri_y "Year of First Marriage" label value a_fmarri_y numerical_l tab a_fmarri_y, mi * Month of first marriage a_fmarri_m *ER32035 Month first/only Marriage began clonevar a_fmarri_m = ER32035 recode a_fmarri_m (98 = -1) (99=.) /// (21 = 4) (22 = 7) (23=10) (24=1) //spring --->april replace a_fmarri_m =. if ER32036>2009 & ER32036 <=2013 replace a_fmarri_m = -8 if a_age < 16 replace a_fmarri_m = -8 if ER32034 == 0 label var a_fmarri_m "Month of First Marriage" label value a_fmarri_m numerical_l tab a_fmarri_m, mi * End year of first marriage a_fmarri_endy *ER32039 Year first/only marriage ended *ER32037 Status of First/Only Marriage clonevar a_fmarri_endy=ER32039 tab ER32039 if ER32039< ER32035 //check recode a_fmarri_endy (9999=.) (9998=-1) replace a_fmarri_endy = -8 if ER32039 >2009 & ER32039 <=2013 replace a_fmarri_endy = -8 if ER32034 == 0 //never married replace a_fmarri_endy = -8 if ER32037 == 1 //still in the first marriage replace a_fmarri_endy = -8 if a_age < 16 label var a_fmarri_endy "End Year of First Marriage" label value a_fmarri_endy numerical_l sum a_fmarri_endy if a_fmarri_endy > 0 tab a_fmarri_endy if a_fmarri_endy < 0, mi * End month of first marriage a_fmarri_endm *ER32038 Month First/Only Marriage Ended clonevar a_fmarri_endm=ER32038 recode a_fmarri_endm (98 = -1) (99=.) /// (21 = 4) (22 = 7) (23=10) (24=1) //spring --->april replace a_fmarri_endm =-8 if ER32039 >2009 & ER32039 <=2013 replace a_fmarri_endm = -8 if ER32034 == 0 //never married replace a_fmarri_endm = -8 if ER32037 == 1 //still in the first marriage replace a_fmarri_endm = -8 if a_age < 16 label var a_fmarri_endm "End Month of First Marriage" label value a_fmarri_endm numerical_l tab a_fmarri_endm, mi * Reason for the end of first marriage a_fmarri_endreason *ER32037 status of first/only marriage gen a_fmarri_endreason = . replace a_fmarri_endreason = 1 if ER32037 == 4 //divorced replace a_fmarri_endreason = 2 if ER32037 == 3 //widowed replace a_fmarri_endreason = -8 if ER32037 == 1 | ER32037 == 5 | ER32037 == 7 replace a_fmarri_endreason = . if ER32037 == 9 replace a_fmarri_endreason = -8 if ER32039 >2009 & ER32039 <=2013 replace a_fmarri_endreason = -8 if ER32034 == 0 //never married replace a_fmarri_endreason = -8 if a_age < 16 label var a_fmarri_endreason "Reason for the End of First Marriage" label define endreason_l -8"Not Applicable" 1"Divorced" 2"Widowed" label value a_fmarri_endreason endreason_l tab a_fmarri_endreason, mi * End year of last marriage a_lmarri_endy *ER32046 year most recent marriage ended *ER32039 Year first/only marriage ended clonevar a_lmarri_endy=ER32046 recode a_lmarri_endy (9999=.) (9998=-1) replace a_lmarri_endy = a_fmarri_endy if ER32034 == 1 & a_fmarri_endy > 0 & !mi(a_fmarri_endy) replace a_lmarri_endy = -8 if ER32046 >2009 & ER32046 <=2013 replace a_lmarri_endy = -8 if ER32034 == 0 | (ER32034 == 1 & (ER32037 == 1 | ER32037 == 5)) replace a_lmarri_endy = -8 if a_age < 16 label var a_lmarri_endy "End Year of Last Marriage" label value a_lmarri_endy numerical_l sum a_lmarri_endy if a_lmarri_endy > 0 tab a_lmarri_endy if a_lmarri_endy < 0 insp a_lmarri_endy * End month of last marriage a_lmarri_endm *ER32045 month most recent marriage ended *ER32038 Month First/Only Marriage Ended clonevar a_lmarri_endm=ER32045 recode a_lmarri_endm (98 = -1) (99=.) /// (21 = 4) (22 = 7) (23=10) (24=1) //spring --->april replace a_lmarri_endm = a_fmarri_endm if ER32034 == 1 & a_fmarri_endm > 0 & !mi(a_fmarri_endm) replace a_lmarri_endm = -8 if ER32046 >2009 & ER32046 <=2013 replace a_lmarri_endm = -8 if ER32034 == 0 | (ER32034 == 1 & (ER32037 == 1 | ER32037 == 5)) replace a_lmarri_endm = -8 if a_age < 16 label var a_lmarri_endm "End Month of Last Marriage" label value a_lmarri_endm numerical_l tab a_lmarri_endm, mi * Total number of R's marriages a_marri_times clonevar a_marri_times=ER32034 recode a_marri_times (99=.) (98=-1) replace a_marri_times = -8 if a_age < 16 label var a_marri_times "Total number of R's Marriages" label value a_marri_times numerical_l tab a_marri_times, mi * In first marriage-a_firstmarry a_firstmatty *ER32037 Status of First/Only Marriage gen a_firstmarry = ER32037 recode a_firstmarry (5=1) (3=0) (4=0)(7=0)(9=.) replace a_firstmarry = -8 if a_age < 16 replace a_firstmarry = -8 if ER32034 == 0 label var a_firstmarry "In First Marriage" label define yesno -8"Not Applicable" -2"Refused to Answer" -1"Don't Know" 0"No" 1"Yes" label value a_firstmarry yesno tab a_firstmarry,mi save File_US, replace ***************************** *Part.6 Migration ***************************** use "$datadir\FAM2009ER" keep ER42002 ER46538 ER46444 save uscompute\migration.dta,replace use File_US merge m:1 ER42002 using uscompute\migration.dta drop _merge save File_US, replace label define state_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" /// 0 " U.S. Territory or Foreign Country" /// 1 "Alabama" 2 "Alaska" 4 "Arizona" 5 "Arkansas" 6 "California" 8 "Colorado" /// 9 "Connecticut" 10 "Delaware" 11 "District of Columbia" 12 "Florida" /// 13 "Georgia" 15 "Hawaii" 16 "Idaho" 17 "Illinois" 18 "Indiana" 19 "Iowa" /// 20 "Kansas" 21 "Kentucky" 22 "Louisiana" 23 "Maine" 24 "Maryland" 25 "Massachusetts" /// 26 "Michigan" 27 "Minnesota" 28 "Mississippi" 29 "Missouri" 30 "Montana" /// 31 "Nebraska" 32 "Nevada" 33 "New Hampshire" 34 "New Jersey" 35 "New Mexico" /// 36 "New York" 37 "North Carolina" 38 "North Dakota" 39 "Ohio" 40 "Oklahoma" /// 41 "Oregon" 42 "Pennsylvania" 44 "Rhode Island" 45 "South Carolina" 46 "South Dakota" /// 47 "Tennessee" 48 "Texas" 49 "Utah" 50 "Vermont" 51 "Virginia" 53 "Washington" /// 54 "West Virginia" 55 "Wisconsin" 56 "Wyoming" * Place of birth of R (province/state) a_birthplace * Place of birth of R's spouse a_birthplace_s //ER46538 STATE Where head grew up //ER46444 State where wife grew up gen a_birthplace = . replace a_birthplace = ER46538 if ER34003 == 10 replace a_birthplace = ER46444 if ER34003 == 20 | ER34003 == 22 recode a_birthplace (99=-1) label value a_birthplace state_l label var a_birthplace "State where head grew up(FIPS code)" tab a_birthplace,mi tab a_birthplace if a_birthplace > 0 gen a_birthplace_s = . replace ER46444 =. if ER42019 == 0 replace a_birthplace_s = ER46444 if ER34003 == 10 replace a_birthplace_s = ER46538 if ER34003 == 20 | ER34003 == 22 recode a_birthplace_s (99=-1) label value a_birthplace_s state_l label var a_birthplace_s "State where wife grew up(FIPS code)" tab a_birthplace_s, mi tab a_birthplace_s if a_birthplace_s >= 0 * Place of current residence of R (province/state) a_province gen a_province= ER42004 label var a_province "Place of current residence of R (FIPS code)" label value a_province state_l * Place of current residence of R's spouse a_province_s gen a_province_s = . replace a_province_s = ER42004 if ER34003 == 20 | ER34003 == 22 | ER34003 == 10 label var a_province_s "Place of current residence of R's spouse (FIPS code)" label value a_province_s state_l tab a_province_s,mi tab a_province_s if a_province_s >=0 ***************************** *Part.7 Housing ***************************** * Housing ownership: own or rent or what clonevar a_house_owner=ER42029 /* Owns or is buying home, either fully or jointly; mobile home owners who rent lots are included here Pays rent Neither owns nor rents */ recode a_house_owner (5=2)(8=3) label define housetn_l -8 "Not Applicable" -2 "Refuse to Answer" -1 "Don't Know" /// 1 "Owned by R or R's Family" 2 "Rented" 3 "Others" label variable a_house_owner "House Ownership" label value a_house_owner housetn_l tab a_house_owner, mi *value 1 includs mobile home owners who rent lots" * Housing type (house, apartment, courtyard) a_housing clonevar a_housing=ER42025 /* 1One-family house 2Two-family house; duplex 3Apartment; housing project 4Mobile home; trailer 6Rowhouse; townhouse 7Other 8DK 9NA; refused */ * Housing price a_houseprice clonevar a_houseprice=ER42030 recode a_houseprice ( 9999998 = -1 ) (9999999 = -2) (0 = -8) label value a_houseprice numerical_l label var a_houseprice "Housing Price" tab a_houseprice if a_houseprice < 0 sum a_houseprice if a_houseprice > 0 * Mortgage (yes or no) a_mortgage clonevar a_mortgage=ER42040 recode a_mortgage (8 = -1)(9=-2)(0=-8)(5=0) label value a_mortgage yesno label var a_mortgage "Whether have housing mortgage" tab a_mortgage, mi * Year of moving in this house a_moveyear *ER36105 from 07: Year Moved *ER36103 from 07: WTR Moved Since Jan 1 of Prior Year *ER42134 year moved in clonevar ER36002 = ER33901 save File_US, replace use "$datadir\FAM2007ER" keep ER36002 ER36105 ER36103 save uscompute\07movein, replace use File_US merge m:1 ER36002 using uscompute\07movein drop if _merge == 2 clonevar a_moveyear = ER42134 *fill with 2007 information replace a_moveyear = ER36105 if ER42134 == 0 & !mi(ER36105) recode a_moveyear (9996 = 2008) //moved in between 2007&2009 recode a_moveyear (9999 = -8) replace a_moveyear = -1 if a_moveyear == 0 & ER36103 != 5 & !mi(ER36103) label define moveyear_l 0 "Before 2005" -8"Not Applicable" -2"Refused to Anwser" -1"Don't Know" label value a_moveyear moveyear_l label var a_moveyear "Year of moving in this house" tab a_moveyear,mi save File_US,replace ***************************** *Part.8 Health and Well-being ***************************** use "$datadir\FAM2009ER" keep ER42002 ER44293 ER45390 ER44294 ER44295 ER45391 ER45392 ER44175 ER45272 ER44282 ER45379 ER44290 ER44290 ER45387 ER45387 ER42024 save "uscompute\fam.dta", replace use File_US drop _merge merge m:1 ER42002 using "uscompute\fam.dta" save File_US,replace * Birth weight (kg) a_birthweight *kg = oz / 35.274 *ER32014 /* 16 - 224 Actual birth weight in ounces 991 Actual weight unknown, but less than 5.5 pounds (88ounces) 995 Actual weight unknown, but 5.5 pounds (88 ounces) or more 998 DK; NA 999 No information was gathered about the identity of either parent (ER32009=0 and ER32016=0); values for ER32009- ER32010 obtained only from 1983 and 1984 coding of mother and no information was gathered in 1985-2013 about identity of father (ER32009=>0 and ER32011=0 and ER32016=0)*/ gen a_birthweight = ER32014 recode a_birthweight (998=-8)(999=.) sum ER32014 if ER32014 >0 & ER32014 <=88 //for weight <= 88 mean = 71.10 sum ER32014 if ER32014 >88 & ER32014 <=224 //for weight >88 mean = 120.41 recode a_birthweight (991 = 70.64) (995 = 120.46) replace a_birthweight = a_birthweight / 35.274 if a_birthweight > 0 label value a_birthweight numerical_l label var a_birthweight "Birth Weight (kg)" tab a_birthweight if a_birthweight < 0 sum a_birthweight if a_birthweight > 0 insp a_birthweight * Current body weight (kg) a_weight *ER44293 weight head *ER45390 weight wife *ER34003 Relation to head 09 /* 50 Fifty pounds or less Actual number of pounds 400 Four hundred pounds or more 998 DK 999 NA; REFUSED*/ *kg = pounds/2.205 gen a_weight = . replace a_weight = ER44293 if ER34003 == 10 //head replace a_weight = ER45390 if ER34003 == 20 |ER34003 == 22 //wife recode a_weight (998=-1) (999=-8) (0=-8) replace a_weight = a_weight/2.205 if a_weight > 0 label var a_weight "Current Body Weight (kg)" label value a_weight numerical_l sum a_weight if a_weight > 0 tab a_weight if a_weight < 0 insp a_weight * Current height (cm) a_height *cm = (feet*12+inch)/0.3937 *ER44294: 09Height-Feet-Head *ER44295: 09Height-Inches-Head *ER45391: 09Height-Feet-Wife *ER45392: 09Height-Inches-Wife *ER34003: 09relation recode ER44295 (98= 0) (99= 0) recode ER45392 (98= 0) (99= 0) gen a_height_h = (ER44294*12 +ER44295)/0.3937 replace a_height_h = -1 if ER44294 == 8 replace a_height_h = -2 if ER44294 == 9 gen a_height_w = (ER45391*12 +ER45392)/0.3937 replace a_height_w = -1 if ER45391 == 8 replace a_height_w = -2 if ER45391 == 9 replace a_height_w = -8 if ER45391 == 0 gen a_height = . replace a_height = a_height_h if ER34003 == 10 //head replace a_height = a_height_w if ER34003 == 20 |ER34003 == 22 //wife label var a_height "Current Height (cm)" label value a_height numerical_l sum a_height if a_height > 0 tab a_height if a_height < 0 insp a_height * Self-rated health status a_health /* 1Excellent 2Very good 3Good 4Fair 5Poor 8DK 9NA*/ *ER44175 ER45272 ER34003 gen a_health = . replace a_health = ER44175 if ER34003 == 10 replace a_health = ER45272 if ER34003 == 20 | ER34003 == 22 recode a_health (0 = -8) (8 = -1) (9= -2 ) recode a_health (1 2 3 = 1) (4 = 2) (5 = 3) label define health_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" /// 1" Good" 2 "Fair" 3"Bad" label value a_health health_l label var a_health "Self-rated Health Status" tab a_health, mi * Health insurance (yes or no) a_healthinsur *ER34022 to ER34025 : Type Health Insurance mention /*Inap.: not covered by health care plan; from Latino sample (ER30001=7001-9308); main family nonresponse by 2009 or mover-out nonresponse by 2007 (ER34001=0); moved out before 2007 (ER34002=71-89 and ER34010>0 and ER34010<2007)*/ gen a_healthinsur = ER34022 recode a_healthinsur (98=-1)(99=-8) (1/97 =1) label value a_healthinsur yesno label var a_healthinsur "Whether have health insurance" tab a_healthinsur,mi * Did you smoke in the last month a_smoking *WTR smoke cigarettes -HEAD/WIFE *1 Yes *5 No *8 DK *9 NA; refused gen a_smoking = . replace a_smoking = ER44282 if ER34003 == 10 replace a_smoking = ER45379 if ER34003 == 20 | ER34003 == 22 recode a_smoking (0=-8) (9=-2) (8=-1) recode a_smoking (5=0) label value a_smoking yesno label var a_smoking "Did you smoke in the last month" tab a_smoking, mi * Did you drink alcohol more than three times each week in the last month a_drinking *frequency of drinking: >-=several times a week /* 0Inap.: does not drink alcoholic beverages 1Less than once a month 2About one a month 3Several times a month 4About once a week 5Several times a week 6Every day 8DK 9NA; refused*/ *ER44290 ER45387 How often have drinks *ER34003 replace ER45387 =-8 if ER42019 == 0 gen a_drinking = . replace a_drinking = ER44290 if ER34003 == 10 replace a_drinking = ER45387 if ER34003 == 20| ER34003 ==22 recode a_drinking (0/4 = 0 ) (5/6 =1) (8=-1) (9=-2) label value a_drinking yesno label var a_drinking "Do you drink regularly (Several times/week)" tab a_drinking,mi * CES-D depression scale a_cesd *ER46369 Sadness in past 30 days /*Inap.: respondent was not head or wife/"wife" All of the time Most of the time Some of the time A little of the time None of the time DK NA; refused*/ gen a_depressed = ER46369 if ER34003 == 20| ER34003 ==22 |ER34003 == 10 recode a_depressed (0=-8) (8=-1) (9= -8) label define depress_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" /// 1" Always" 2 "Often" 3"Sometimes" 4"Seldom" 5"Never" label value a_depressed depress_l label var a_depressed "Freq. of feeling depressed" tab a_depressed, mi * Self-rated life satisfaction a_lifesat /*Inap.: respondent was not head or wife/"wife" Completely satisfied Very satisfied Somewhat satisfied Not very satisfied Not at all satisfied DK NA; refused*/ gen a_lifesat=ER42024 if ER34003 == 20| ER34003 ==22 |ER34003 == 10 replace a_lifesat = 6-a_lifesat if a_lifesat >= 1 & a_lifesat <=5 recode a_lifesat (0=-8) (8=-1)(9=-2) label define lifesat_l -8 "Not Applicable" -2 "Refused to Answer" -1"Don't Know" /// 1 "Very Dissatisfied" 2" Dissatisfied" 3"Fair" 4"Satisfied" 5 "Very Satisfied" label value a_lifesat lifesat_l label var a_lifesat "Self-rated Life Satisfaction" tab a_lifesat, mi * BMI a_bmi gen a_bmi = . replace a_bmi = a_weight/(a_height/100)^2 if a_weight > 0 &a_height>0 replace a_bmi = a_weight if a_weight < 0 replace a_bmi = a_height if a_height < 0 label value a_bmi numerical_l label var a_bmi "BMI" sum a_bmi if a_bmi >0 tab a_bmi if a_bmi < 0 insp a_bmi keep a_syear a_smonth a_fid a_pidp a_pid a_pweight a_fweight a_birthy a_birthm /// a_age a_gender a_ethnica a_ethnicb a_urban a_sib a_birthorder a_birthy_f a_birthy_m /// a_birthy_s a_age_s a_child a_birthy_c1 a_birthy_c2 a_birthy_c3 a_birthy_c4 a_birthy_c5 /// a_birthm_c1 a_birthm_c2 a_birthm_c3 a_birthm_c4 a_birthm_c5 /// a_eduy a_edu a_edu_f a_edu_m a_employ a_workhour_week /// a_isco a_isco_first a_isco_s a_isco_f a_isco_m a_industry a_orgtype /// a_monthinc a_hourwage a_yearinc1 a_yearinc2 a_pension a_income a_exp a_tenure a_union /// a_fsize a_hhsize a_gen a_fstruc a_hhstruc a_faminc_post a_faminc_pre /// a_marriage a_cmarri_y a_cmarri_m a_fmarri_y a_fmarri_m a_fmarri_endy a_fmarri_endm /// a_fmarri_endreason a_lmarri_endy a_lmarri_endm a_marri_times a_firstmarry /// a_birthplace a_birthplace_s a_province a_province_s /// a_house_owner a_housing a_houseprice a_mortgage a_moveyear /// a_birthweight a_weight a_height a_health a_healthinsur /// a_smoking a_drinking a_depressed a_lifesat a_bmi save File_US, replace