************************************************************************** ************************************************************************** * Monkey Cage submission * Negative Ethnocentrism * L.J Zigerell and Arafat Kabir * Code by L.J Zigerell * ANES 2016 Pilot Study * http://www.electionstudies.org/studypages/anes_pilot_2016/anes_pilot_2016.htm ************************************************************************** ************************************************************************** * Read file insheet using "C:\Users\L.J\Desktop\anes_pilot_2016_csv\anes_pilot_2016.csv" set more off * Limit the dataset to white respondents tab race gen white = race recode white (2/8=0) tab race white keep if white==1 tab race white * Code feeling thermometers tab1 ftblack ftwhite fthisp ftgay ftfem fttrans ftmuslim ftjeb fttrump ftcarson fthrc ftrubio ftcruz ftsanders ftfiorina ftobama recode ftblack ftwhite fthisp ftgay ftfem fttrans ftmuslim ftjeb fttrump ftcarson fthrc ftrubio ftcruz ftsanders ftfiorina ftobama (998=.) tab1 ftblack ftwhite fthisp ftgay ftfem fttrans ftmuslim ftjeb fttrump ftcarson fthrc ftrubio ftcruz ftsanders ftfiorina ftobama sum ftblack ftwhite fthisp ftgay ftfem fttrans ftmuslim ftjeb fttrump ftcarson fthrc ftrubio ftcruz ftsanders ftfiorina ftobama * Code ethnocentrism scale gen ethnoW = ftwhite-((ftblack+fthisp+ftgay+ftfem+fttrans+ftmuslim)/6) sum ethnoW if white==1 sum ethnoW if white==1 & ethnoW<0 di 189/870 // for white analysis [22%] * Political Party tab pid1r pid1d gen dem = 0 replace dem=1 if pid1r==1 | pid1d==1 gen gop=0 replace gop=1 if pid1r==2 | pid1d==2 tab dem tab gop sum ethnoW if white==1 & ethnoW<0 & ethnoW!=. sum ethnoW if white==1 & ethnoW<0 & ethnoW!=. & dem==1 sum ethnoW if white==1 & ethnoW<0 & ethnoW!=. & gop==1 * Estimate candidate support svyset [pw=weight] svy, subpop(white): mean fttrump if ethnoW<0 & ethnoW!=. svy, subpop(white): mean ftcruz if ethnoW<0 & ethnoW!=. svy, subpop(white): mean ftcarson if ethnoW<0 & ethnoW!=. svy, subpop(white): mean ftfiorina if ethnoW<0 & ethnoW!=. svy, subpop(white): mean ftjeb if ethnoW<0 & ethnoW!=. svy, subpop(white): mean ftrubio if ethnoW<0 & ethnoW!=. svy, subpop(white): mean fthrc if ethnoW<0 & ethnoW!=. svy, subpop(white): mean ftobama if ethnoW<0 & ethnoW!=. svy, subpop(white): mean ftsanders if ethnoW<0 & ethnoW!=. svy, subpop(white): mean fttrump if ethnoW>0 & ethnoW!=. svy, subpop(white): mean ftcruz if ethnoW>0 & ethnoW!=. svy, subpop(white): mean ftcarson if ethnoW>0 & ethnoW!=. svy, subpop(white): mean ftfiorina if ethnoW>0 & ethnoW!=. svy, subpop(white): mean ftjeb if ethnoW>0 & ethnoW!=. svy, subpop(white): mean ftrubio if ethnoW>0 & ethnoW!=. svy, subpop(white): mean fthrc if ethnoW>0 & ethnoW!=. svy, subpop(white): mean ftobama if ethnoW>0 & ethnoW!=. svy, subpop(white): mean ftsanders if ethnoW>0 & ethnoW!=. sum ethnoW * ethnoW of 50 is about 1 standard deviation above the mean svy, subpop(white): mean fttrump if ethnoW>50 & ethnoW!=. svy, subpop(white): mean ftcruz if ethnoW>50 & ethnoW!=. svy, subpop(white): mean ftcarson if ethnoW>50 & ethnoW!=. svy, subpop(white): mean ftfiorina if ethnoW>50 & ethnoW!=. svy, subpop(white): mean ftjeb if ethnoW>50 & ethnoW!=. svy, subpop(white): mean ftrubio if ethnoW>50 & ethnoW!=. svy, subpop(white): mean fthrc if ethnoW>50 & ethnoW!=. svy, subpop(white): mean ftobama if ethnoW>50 & ethnoW!=. svy, subpop(white): mean ftsanders if ethnoW>50 & ethnoW!=.