*********************************************************************************** ** Code for the ANES 2020 Time Series Study *********************************************************************************** *********************************************************************************** ** Weights *********************************************************************************** svyset [pweight=V200010b], strata(V200010d) psu(V200010c) singleunit(centered) svyset [pweight=V200010b], strata(V200010d) psu(V200010c) *********************************************************************************** ** 2020 U.S. presidential vote choice *********************************************************************************** // Trump / Biden vote tab V202110x recode V202110x (1=0) (2=1) (-9/-1 3/5=.), gen(voteTB) tab V202110x voteTB, mi // Trump / Biden / other vote tab1 V202110x V202109x tab V202110x V202109x recode V202110x (1=0) (2=1) (-9/-1 3/5=99), gen(voteTB3) tab V202110x voteTB3, mi // Biden / Trump vote tab V202110x recode V202110x (-9/-1 3/5=.) (2=0), gen(voteBT) tab V202110x voteBT, mi *********************************************************************************** ** Religion FTs *********************************************************************************** desc V202170 V202169 V202168 V202159 tab1 V202170 V202169 V202168 V202159 // Sample sizes // V202159 [jews] 8280-77-750-14 = 7439 // V202159 [xtan] 8280-77-750-14 = 7439 // V202159 [musl] 8280-77-750-14 = 7439 // V202159 [fund] 8280-77-750-10-3 = 7440 recode V202170 (0=1) (2/49=2) (50=3) (51/99=4) (100=5) (-9 998 999=99) (-8/-1=.), gen(FTjews5) recode V202169 (0=1) (2/49=2) (50=3) (51/99=4) (100=5) (-9 998 999=99) (-8/-1=.), gen(FTxtan5) recode V202168 (0=1) (2/49=2) (50=3) (51/99=4) (100=5) (-9 998 999=99) (-8/-1=.), gen(FTmusl5) recode V202159 (0=1) (2/49=2) (50=3) (51/99=4) (100=5) (-9 998 999=99) (-8/-1=.), gen(FTfund5) desc FTjews5 FTxtan5 FTmusl5 FTfund5 tab1 FTjews5 FTxtan5 FTmusl5 FTfund5, mi tab1 FTjews5 FTxtan5 FTmusl5 FTfund5 recode V202170 (-9/-1 998 999=.), gen(FTjews) recode V202169 (-9/-1 998 999=.), gen(FTxtan) recode V202168 (-9/-1 998 999=.), gen(FTmusl) recode V202159 (-9/-1 998 999=.), gen(FTfund) gen FTjews01 = FTjews/100 gen FTxtan01 = FTxtan/100 gen FTmusl01 = FTmusl/100 gen FTfund01 = FTfund/100 desc FTjews FTxtan FTmusl FTfund sum FTjews FTxtan FTmusl FTfund FTjews01 FTxtan01 FTmusl01 FTfund01 tab1 FTjews FTxtan FTmusl FTfund FTjews01 FTxtan01 FTmusl01 FTfund01 *********************************************************************************** ** Controls *********************************************************************************** tab V201600 clonevar gender3 = V201600 recode gender3 (-9=99) tab V201600 gender3, mi tab V201549x clonevar race = V201549x recode race (-9 -8=99) tab V201549x race, mi tab V201507x recode V201507x (-9=99) (18/21=1) (22/29=2) (30/39=3) (40/49=4) (50/59=5) (60/69=6) (70/79=7) (80=8), gen(ageGRP) tab ageGRP label define ageGRP 1 "[1] 18-21" 2 "[2] 22-29" 3 "[3] 30-39" 4 "[4] 40-49" 5 "[5] 50-59" 6 "[6] 60-69" 7 "[7] 70-79" 8 "[8] 80+" 99 "[99] Refused" label values ageGRP ageGRP tab ageGRP, mi tab V201507x recode V201507x (-9=99) (18/29=1) (30/44=2) (45/59=3) (60/120=4), gen(ageGRP4) tab ageGRP4 label define ageGRP4 1 "[1] 18-29" 2 "[2] 30-44" 3 "[3] 45-59" 4 "[4] 60+" 99 "[99] Refused" label values ageGRP4 ageGRP4 tab ageGRP4, mi tab V201511x clonevar educ = V201511x recode educ (-9/-1=99) tab V201511x educ, mi tab V201508 clonevar marital = V201508 recode marital (2=1) (-9 -8=99) tab V201508 marital, mi tab V201617x clonevar hhincome = V201617x recode hhincome (-9 -5=99) tab V201617x hhincome, mi tab V201231x clonevar party = V201231x recode party (-9 -8=.) tab V201231x party, mi tab V201200 clonevar ideo = V201200 recode ideo (-9/-8=99) tab V201200 ideo, mi *********************************************************************************** ** Racial resentment *********************************************************************************** tab1 V202300 V202301 V202302 V202303 clonevar RR1 = V202300 clonevar RR2 = V202301 clonevar RR3 = V202302 clonevar RR4 = V202303 recode RR1 RR2 RR3 RR4 (-9/-1=.) sum RR1 RR2 RR3 RR4 pwcorr RR1 RR2 RR3 RR4 desc RR1 RR2 RR3 RR4 gen RRsum = RR2 + RR3 - RR1 - RR4 factor RR1 RR2 RR3 RR4, pcf predict RRfactor pwcorr RRfactor RRsum, sig obs sum RRfactor RRsum gen RRsum01 = (RRsum+8)/16 sum RRsum01 gen RRsum16 = RRsum + 8 sum RRsum16 gen RR01 = RRsum16/16 sum RR01 tab V202300 RRsum16 // Check order tab V202301 RRsum16 // Check order tab V202302 RRsum16 // Check order tab V202303 RRsum16 // Check order *********************************************************************************** ** Not available yet *********************************************************************************** lookfor change *********************************************************************************** ** Summary statistics *********************************************************************************** svy: prop FTjews5 svy: prop FTxtan5 svy: prop FTmusl5 svy: prop FTfund5 *********************************************************************************** ** Analyses *********************************************************************************** svy: reg voteTB i.gender i.race i.ageGRP i.educ i.marital i.hhincome ib3.FTjews5 margins, atmeans at(FTjews5=(1(1)5)) level(84.3) noatlegend svy: reg voteTB i.gender i.race i.ageGRP i.educ i.marital i.hhincome ib3.FTxtan5 margins, atmeans at(FTxtan5=(1(1)5)) level(84.3) noatlegend svy: reg voteTB i.gender i.race i.ageGRP i.educ i.marital i.hhincome ib3.FTmusl5 margins, atmeans at(FTmusl5=(1(1)5)) level(84.3) noatlegend svy: reg voteTB i.gender i.race i.ageGRP i.educ i.marital i.hhincome ib3.FTfund5 margins, atmeans at(FTfund5=(1(1)5)) level(84.3) noatlegend ** svy: reg voteTB i.gender i.race i.ageGRP4 i.educ i.marital i.hhincome i.ideo i.party RR01 ib3.FTjews5 ib3.FTxtan5 ib3.FTmusl5 ib3.FTfund5 margins, atmeans at(FTjews5=(1(1)5)) level(84.3) noatlegend margins, atmeans at(FTxtan5=(1(1)5)) level(84.3) noatlegend margins, atmeans at(FTmusl5=(1(1)5)) level(84.3) noatlegend margins, atmeans at(FTfund5=(1(1)5)) level(84.3) noatlegend