************************************************************************** ************************************************************************** * Monkey Cage submission * Negative Ethnocentrism [unreported] * L.J Zigerell and Arafat Kabir * Code by L.J Zigerell * ANES 2012 Time Series Study * http://www.electionstudies.org/studypages/anes_timeseries_2012/anes_timeseries_2012.htm ************************************************************************** ************************************************************************** set more off tab wave_completions keep if wave_completions == 1 // keep only respondents who were in pre-election and post-election survey ******************************************************************************************************************************* *** Code white respondents ******************************************************************************************************************************* tab dem_raceeth gen white = dem_raceeth recode white (-9/-1 = 0) (2 3 4 = 0) tab dem_raceeth white keep if white==1 ******************************************************************************************************************************* *** Ethnic group affect ******************************************************************************************************************************* tab1 ftcasi_white ftcasi_black ftcasi_hisp ftcasi_asian gen ftw = ftcasi_white gen ftb = ftcasi_black gen fth = ftcasi_hisp gen fta = ftcasi_asian recode ftw ftb fth fta (-10/-1=.) tab1 ftw ftb fth fta drop if ftcasi_white<0 | ftcasi_black<0 | ftcasi_hisp<0 | ftcasi_asian<0 sum ftw ftb fth fta egen ftw_std = std(ftw) egen ftb_std = std(ftb) egen fth_std = std(fth) egen fta_std = std(fta) sum ftw_std ftb_std fth_std fta_std ******************************************************************************************************************************* *** Outcome variables ******************************************************************************************************************************* * Immigration levels tab immigpo_level gen moreIMMIG = immigpo_level recode moreIMMIG (-10/-1=.) replace moreIMMIG = 0 - moreIMMIG egen moreIMMIG_std = std(moreIMMIG) sum moreIMMIG_std tab immigpo_level moreIMMIG_std * Support affirmative action in universities tab aa_uni_x gen oppaactionuniv7 = aa_uni_x recode oppaactionuniv7 (-9/-1 = .) egen oppaactionuniv7_std = std(oppaactionuniv7) gen suppaactionuniv7_std = 0 - oppaactionuniv7_std tab aa_uni_x suppaactionuniv7_std, mi sum suppaactionuniv7_std ******************************************************************************************************************************* *** Control variables ******************************************************************************************************************************* // Sex tab gender_respondent tab gender_respondent, nol gen female = gender_respondent - 1 tab female tab gender_respondent female, mi // Married tab dem_marital gen married = dem_marital recode married (-9/-1 = .) (1 2 3 4 5 = 1) (6 = 0) tab married tab dem_marital married, mi // Age group tab dem_agegrp_iwdate gen agegroup = dem_agegrp_iwdate recode agegroup (-9/-1 = .) tab agegroup sum agegroup egen agegroup_std = std(agegroup) replace agegroup = agegroup_std sum agegroup tab dem_agegrp_iwdate agegroup, mi // Education tab dem_edugroup gen educ = dem_edugroup recode educ (-9/-1 = .) tab educ sum educ egen educ_std = std(educ) replace educ = educ_std sum educ tab dem_edugroup educ, mi // Family income tab incgroup_prep gen hhincome = incgroup_prep recode hhincome (-9/-1 = .) egen hhincome_std = std(hhincome) replace hhincome = hhincome_std sum hhincome tab incgroup_prep hhincome, mi ******************************************************************************************************************************* *** Regressions ******************************************************************************************************************************* svyset [pweight=weight_full], strata(strata_full) psu(psu_full) svy, subpop(white): reg moreIMMIG_std ftw_std ftb_std fth_std fta_std female married agegroup educ hhincome svy, subpop(white): reg suppaactionuniv7_std ftw_std ftb_std fth_std fta_std female married agegroup educ hhincome