************************************************************************************************************************************************** *************** REPLICATION STATA DO FILE *************** FOR BOOK CHAPTER "RELIGION AND THE LATIN AMERICAN VOTER" *************** BY TAYLOR C. BOAS AND AMY ERICA SMITH *************** IN THE VOLUME _THE LATIN AMERICAN VOTER_, EDS. RYAN CARLIN, MATTHEW SINGER, AND ELIZABETH J. ZECHMEISTER *************** THIS VERSION 3 JANUARY 2015 *************** To run this do file, you will need to download the command "nicelylabelleddummies", by typing "ssc install nicelylabelleddummies". *************** Both the Stata and R code are designed to run in a single directory, with all component data contained in that same directory. *************** To set the working directory for your machine, adjust the following command as necessary: cd "C:\Users\aesmith2\Documents\research\Religion & Politics Papers\Religion and Voting Behavior in Latin America\paper text\Revision\Replication files" *************** In that directory, you will need the following files provided by this volume's editors: *************** "AmericasBarometer Merged 2004-2012 v15.0.dta" *************** "data on party system over time.dta" *************** "wb coalition since 06.do" *************** "dalp.dta" *************** You will also need the following supplemental spreadsheets put together by the authors of this chapter: *************** "election_years.csv" *************** "candidate_religion_2008.csv" *************** "candidate_religion_2010.csv" *************** "candidate_religion_2012.csv" ************************************ SET UP THE DATA AND CREATE VARIABLES ************************************************************************* use "AmericasBarometer Merged 2004-2012 v15.0.dta", clear **** ELIMINATE ALL OBSERVATIONS OUTSIDE OF LATIN AMERICA AND PRIOR TO 2008 drop if pais > 21 drop if year < 2008 **** CODE VARIABLES FOR YEAR AND COUNTRY-YEAR g paisyear = pais*10000+year nicelylabelleddummies year, g(year_) rename year_1 year2008 rename year_2 year2010 rename year_3 year2012 **** CHANGES TO CODING FOR COUNTRIES lab def pais 1 "Mexico" 7 "Panama" 11 "Peru" 15 "Brazil" 21 "Dominican Republic", modify lab var pais "Country" nicelylabelleddummies pais, g(country) ***** CODE RELIGIOUS DENOMINATION recode q3c (1 = 1) (2 = 2) (5 = 3) (6 12 = 4) (4 11 = 5) (3 7 10 = 6) (15 = .), g(religion) lab var religion "Religion" lab def religion 1 "Catholic" 2 "Historical Protestant" 3 "Evangelical Protestant" 4 "Mormon (LDS)/Jehovah's Witness" 5 "No Religion" 6 "Non-Christian" lab val religion religion recode religion .a .b .c = . replace religion = 1 if q3_08 == 1 replace religion = 2 if q3_08 == 2 replace religion = 3 if q3_08 == 5 replace religion = 4 if q3_08 == 6 replace religion = 5 if q3_08 == 4 replace religion = 6 if q3_08 == 3 | q3_08 == 7 nicelylabelleddummies religion, g(religion_) rename religion_1 catholic rename religion_2 mainline rename religion_3 evangelical rename religion_4 lds_jw rename religion_5 noreligion rename religion_6 nonchristian ***** CODE FREQUENCY OF CHURCH ATTENDANCE capture drop q5ar g q5ar = (5-q5a)/4 lab var q5ar "Frequency of Church Attendance" ***** CODE INTERACTION TERMS BETWEEN CHURCH ATTENDANCE AND DENOMINATION g mainlineXchurch = q5ar*mainline g evangelicalXchurch = q5ar*evangelical g ldsXchurch = q5ar*lds_jw g nonchristianXchurch = q5ar*nonchristian g noreligionXchurch = q5ar*noreligion lab var mainlineXchurch "Mainline X Church Attendance" lab var evangelicalXchurch "Evangelical X Church Attendance" lab var ldsXchurch "LDS/JW x Church Attendance" lab var nonchristianXchurch "NonChristian x Church Attendance" lab var noreligionXchurch "No Religion x Church Attendance" ***** CODE SEX capture drop mujer g mujer = q1-1 lab var mujer "Female" ***** CODE ETHNICITY g indigenous = etid == 3 g black = etid == 4 lab var indigenous "Indigenous" lab var black "Black" ***** CODE SIZE OF PLACE OF RESIDENCE g tamanor = 5-tamano/4 lab var tamanor "Size of Place of Residence" ***** CODE EDUCATIONAL LEVEL gen edr =ed recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais==1 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 2 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 3 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 4 recode edr (0=0) (1 / 6=1) (7 / 11=2) (12 / 30=3) if pais== 5 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 6 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 7 recode edr (0=0) (1 / 5=1) (6 / 11=2) (12 / 30=3) if pais== 8 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 9 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 10 recode edr (0=0) (1 / 6=1) (7 / 11=2) (12 / 30=3) if pais== 11 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 12 recode edr (1=0) (2 / 6=1) (7 / 11=2) (12 / 30=3) if pais== 13 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 14 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 15 recode edr (0=0) (1 / 6=1) (7 / 11=2) (12 / 30=3) if pais== 16 recode edr (0=0) (1 / 7=1) (8 / 12=2) (13 / 30=3) if pais== 17 recode edr (0=0) (1 / 8=1) (9 / 12=2) (13 / 30=3) if pais== 21 recode edr (0=0) (1 / 7=1) (8 / 14=2) (15 / 30=3) if pais== 22 recode edr (0=0) (1 / 6=1) (7 / 11=2) (12 / 30=3) if pais== 23 recode edr (0=0) (1 / 6=1) (7 / 11=2) (12 / 30=3) if pais== 24 recode edr (0=0) (1 / 5=1) (6 / 12=2) (13 / 30=3) if pais== 25 recode edr (0=0) (1 / 6=1) (7 / 12=2) (13 / 30=3) if pais== 26 recode edr (1 / 3=1) (4 / 9=2) (10 / 30=3) if pais== 40 recode edr (1 / 2=1) (3 / 4=2) (5 / 30=3) if pais== 41 replace edr = edr/3 label variable edr "Educational Level" ***** CODE AGE recode q2 (16 / 25 = 1)(26 / 35 = 2)(36 / 45 = 3) (46 / 55 = 4)(56 / 65 = 5)(66 / 120 =6), g(edad) label variable edad "Age" replace edad = (edad-1)/5 ***** CODE WEALTH QUINTILE lab var quintall "Wealth Quintile" replace quintall = (quintall-1)/4 **************************************************** ADD IN DATA FROM OTHER FILES ************************************************************************* **** CREATE PARTY IDEOLOGY MEASURES, AS CALCULATED BY THIS VOLUME'S EDITORS **** MODIFY THE FOLLOWING PATH AS NECESSARY FOR YOUR MACHINE do "wb coalition since 06.do" *************************************** MERGE IN MEASURES FOR EACH COUNTRY'S PARTY SYSTEM, COMPILED BY VOLUME EDITORS **** MODIFY THE PATHS AS NECESSARY FOR YOUR MACHINE label save pais using paislabel.do, replace preserve use "data on party system over time.dta", clear // THIS IS THE TIME-VARYING DATA COMPILED BY THE VOLUME EDITORS keep country year polarization_party sort country encode country, g(country2) recode country2 (12=1) (10=2) (9=3) (11=4) (13=5) (6=6) (14=7) (5=8) (8=9) (2=10) (16=11) (15=12) (4=13) (17=14) (3=15) (18=16) (1=17) (7=21), g(pais) drop country country2 do paislabel.do lab val pais pais clonevar country = pais g paisyear = pais*10000+year rename year polarizationdatayear save "polarization.dta", replace restore preserve use "dalp.dta", clear // THIS IS THE TIME-INVARIANT DATA CALCULATED BY THIS VOLUME'S EDITORS keep country programmaticindex encode country, g(country2) recode country2 (12=1) (10=2) (9=3) (11=4) (13=5) (6=6) (14=7) (5=8) (8=9) (2=10) (16=11) (15=12) (4=13) (17=14) (3=15) (18=16) (1=17) (7=21), g(pais) drop country country2 do paislabel.do lab val pais pais clonevar country = pais save "programmatic.dta", replace restore preserve insheet using "election_years.csv", comma clear capture drop v6 g paisyear = pais*10000+startyear_priorlegislature merge m:1 paisyear using "polarization.dta", nogenerate drop startyear_priorlegislature polarizationdatayear replace paisyear = pais*10000+surveyyear rename surveyyear year drop if year == . merge m:1 pais using "programmatic.dta", nogenerate save "countryleveldata.dta", replace restore merge m:1 paisyear using "countryleveldata.dta", nogenerate ******************** ADD IN DATA ON THE RELIGION OF EACH RESPONDENT'S CANDIDATE CHOICE, AS CODED BY THE AUTHORS OF THIS CHAPTER **** MODIFY THE PATHS AS NECESSARY FOR YOUR MACHINE preserve insheet using "candidate_religion_2008.csv", comma clear capture drop v6-v9 save "candidate_religion_2008.dta", replace insheet using "candidate_religion_2010.csv", comma clear save "candidate_religion_2010.dta", replace insheet using "candidate_religion_2012.csv", comma clear save "candidate_religion_2012.dta", replace restore merge m:1 vb3_08 using "candidate_religion_2008.dta", nogenerate merge m:1 vb3_10 using "candidate_religion_2010.dta", update nogenerate merge m:1 vb3_12 using "candidate_religion_2012.dta", update nogenerate g paiselectionyear = pais*10000 + electionyear lab def paiselectionyear 12006 "Mexico 2006" 22007 "Guatemala 2007" 22011 "Guatemala 2011" 32004 "El Salvador 2004" 32009 "El Salvador 2009" /// 42005 "Honduras 2005" 42009 "Honduras 2009" 52006 "Nicaragua 2006" 52011 "Nicaragua 2011" 62006 "Costa Rica 2006" 62010 "Costa Rica 2010" /// 72004 "Panama 2004" 72009 "Panama 2009" 82006 "Colombia 2006" 82010 "Colombia 2010" 92006 "Ecuador 2006" 92009 "Ecuador 2009" 102005 "Bolivia 2005" /// 102009 "Bolivia 2009" 112006 "Peru 2006" 112011 "Peru 2011" 122003 "Paraguay 2003" 122008 "Paraguay 2008" 132005 "Chile 2005" 132009 "Chile 2009" /// 142004 "Uruguay 2004" 142009 "Uruguay 2009" 152006 "Brazil 2006" 152010 "Brazil 2010" 162006 "Venezuela 2006" 172007 "Argentina 2007" /// 172011 "Argentina 2011" 212004 "Dominican Republic 2004" 212008 "Dominican Republic 2008" lab val paiselectionyear paiselectionyear lab var paiselectionyear "Country Election Year" encode candidate_religion, g(candidate_religion2) drop candidate_religion rename candidate_religion2 candidate_religion nicelylabelleddummies candidate_religion, g(cand_relig) rename cand_relig1 cand_catholic rename cand_relig2 cand_jewish rename cand_relig3 cand_prot rename cand_relig4 cand_secular rename cand_relig5 cand_traditional g cand_other = cand_jewish + cand_traditional lab var cand_other "Other Religion" egen election_prot = mean(cand_prot), by(paiselectionyear) recode election_prot (.0001/1 = 1) egen election_secular = mean(cand_secular), by(paiselectionyear) recode election_secular (.0001/1 = 1) egen election_other = mean(cand_other), by(paiselectionyear) recode election_other (.0001/1 = 1) lab var election_prot "Election with Protestant Candidate(s)" lab var election_secular "Election with Secular Candidate(s)" lab var election_other "Election with Candidate(s) of Other Religion" egen cand_religion = group(cand_jewish cand_traditional cand_prot cand_secular cand_catholic) lab def cand_religion 1 "Catholic" 2 "Secular" 3 "Protestant" 4 "Traditional" 5 "Jewish" lab val cand_religion cand_religion ********** CREATE INTERACTION TERMS FOR RELIGION * PARTY SYSTEM g mainlineXpolar = polarization_party * mainline g evangelicalXpolar = polarization_party * evangelical g noreligionXpolar = polarization_party * noreligion g churchXpolar = polarization_party * q5ar lab var mainlineXpolar "Mainline X Polarization" lab var evangelicalXpolar "Evangelical X Polarization" lab var noreligionXpolar "No Religion x Polarization" lab var churchXpolar "Church Attendance x Polarization" g mainlineXprogrammaticindex = programmaticindex * mainline g evangelicalXprogrammaticindex = programmaticindex * evangelical g noreligionXprogrammaticindex = programmaticindex * noreligion g churchXprogrammaticindex = programmaticindex * q5ar lab var mainlineXprogrammaticindex "Mainline X Programmaticness" lab var evangelicalXprogrammaticindex "Evangelical X Programmaticness" lab var noreligionXprogrammaticindex "No Religion X Programmaticness" lab var churchXprogrammaticindex "Church Attendance X Programmaticness" ************************************** ADJUST WEIGHTS TO GIVE EACH ELECTION YEAR EQUAL WEIGHT ********************************************************** g electionyear_weight = 1/count_electionyears g weight1500Xelectionyear = weight1500*electionyear_weight ************ SET THE ELECTION YEAR WEIGHTS SO THEY OVERRIDE THE LAPOP WEIGHTS svyset upm [pw=weight1500Xelectionyear], strata(estratopri) ******************************************************************** FIGURES **************************************************************************** *********** Figure 1. RELIGION AND RELIGIOUS ATTENDANCE BY COUNTTRY graph bar catholic mainline evangelical noreligion lds_jw nonchristian [pweight=weight1500], over(pais, label(angle(45) labsize(small))) /// stack percent ytitle("") title("Religious Affiliation (%)", color(black) size(med)) graphregion(fcolor(white)) /// legend(label(1 "Catholic") label(2 "Historical Prot.") label(3 "Evangelical Prot.") label(4 "No Religion") /// label(5 "Mormon/Jeh. Wit.") label(6 "Non-Christian")) /// bar(1, lcolor(black) fcolor(gs0)) bar(2, lcolor(black) fcolor(gs3)) bar(3, lcolor(black) fcolor(gs6)) /// bar(4, lcolor(black) fcolor(gs9)) bar(5, lcolor(black) fcolor(gs12)) bar(6, lcolor(black) fcolor(gs15)) preserve tab q5a, g(church) graph bar church1 church2 church3 church4 church5 [pweight=weight1500], over(pais, label(angle(45) labsize(small))) /// stack percent ytitle("") title("Church Attendance (%)", color(black) size(med)) graphregion(fcolor(white)) /// legend(label(1 "> Once/Week") label(2 "Once/Week") label(3 "Few Times/Month") label(4 "Few Times/Year") label(5 "Never")) /// bar(1, lcolor(black) fcolor(gs0)) bar(2, lcolor(black) fcolor(gs4)) bar(3, lcolor(black) fcolor(gs8)) /// bar(4, lcolor(black) fcolor(gs12)) bar(5, lcolor(black) fcolor(gs16)) restore ************ FIGURE 2: Religion and Ideology of Vote Choice label save pais using paislabel.do, replace global results "" svy: reg vote_wb_lr_coal mainline evangelical noreligion q5ar lds_jw nonchristian mujer edr quintall edad tamanor indigenous black /// year2010 year2012 country2-country18 parmest, label format(estimate min95 max95 p %8.3f p %8.1e) saving(LatAm, replace) idstr(19) flist(results) forvalues i = 1/18 { tab estratopri if country`i' == 1, g(region_) svy: reg vote_wb_lr_coal mainline evangelical noreligion q5ar lds_jw nonchristian mujer edr quintall edad tamanor indigenous black /// region_* year2010 year2012 if country`i' == 1 parmest, label format(estimate min95 max95 p %8.3f p %8.1e) saving(country`i', replace) idstr(`i') flist(results) drop region_* } preserve drop _all append using $results keep if parm == "noreligion" | parm == "mainline" | parm == "evangelical" | parm == "q5ar" destring idstr, g(country) drop idstr do paislabel.do lab def pais 18 "Dominican Republic" 19 "Latin America", modify lab val country pais save "ideology coeffs.dta", replace // MODIFY PATH AS NECESSARY BASED ON YOUR MACHINE restore ********* NOTE THAT THE FIGURE PLOTTING COEFFICIENTS WAS PRODUCED IN R *********FIGURE 3: HIERARCHICAL MODEL FOR POLARIZATION INTERACTIONS: NESTING YEAR IN COUNTRIES xtmixed vote_wb_lr_coal mainline evangelical noreligion q5ar /// mainlineXpolar evangelicalXpolar noreligionXpolar churchXpolar /// nonchristian lds_jw mujer edr quintall edad tamanor indigenous black /// year2010 year2012 polarization_party [pweight=weight1500Xelectionyear] || pais: || year: parmest, label format(estimate min95 max95 p %8.3f p %8.1e) saving(ideologymodel_hierarchical_polarization_yearnested, replace) xml_tab e(V), /// save("polarization_varcovar_yearnested") /// replace format(nclr8) ********* THIS EXPORTS THE VARIANCE-COVARIANCE MATRIX. THE MARGINAL EFFECTS PLOT WAS PRODUCED IN R *********FIGURE 4: HIERARCHICAL MODEL FOR PROGRAMMATICNESS INTERACTIONS: NESTING YEAR IN COUNTRIES xtmixed vote_wb_lr_coal mainline evangelical noreligion q5ar /// mainlineXprogrammaticindex evangelicalXprogrammaticindex noreligionXprogrammaticindex churchXprogrammaticindex /// nonchristian lds_jw mujer edr quintall edad tamanor indigenous black /// year2010 year2012 programmaticindex [pweight=weight1500Xelectionyear] || pais: || year: parmest, label format(estimate min95 max95 p %8.3f p %8.1e) saving(ideologymodel_hierarchical_programmaticness_yearnested, replace) xml_tab e(V), /// save("programmaticness_varcovar_yearnested") /// replace format(nclr8) ********* THIS EXPORTS THE VARIANCE-COVARIANCE MATRIX. THE MARGINAL EFFECTS PLOT WAS PRODUCED IN R ******** FIGURE 5: CANDIDATE CHOICE MODELS (PREDICTED PROBABILITIES) global results "" nicelylabelleddummies paiselectionyear if election_secular == 1, g(paiselectionyear_) svy: logit cand_secular i.religion q5ar mujer quintall edr edad tamanor indigenous black /// paiselectionyear_* if election_secular == 1 margins, at(q5ar=(0 .25 .5 .75 1)) at(religion=(1 2 3 5)) post parmest, label format(estimate min95 max95 p %8.3f p %8.1e) saving(secular_prot_margins, replace) idstr("Probability of Voting Secular (v. Catholic)") flist(results) drop paiselectionyear_* nicelylabelleddummies paiselectionyear if election_prot == 1, g(paiselectionyear_) svy: logit cand_prot i.religion q5ar mujer quintall edr edad tamanor indigenous black /// paiselectionyear_* if election_prot == 1 margins, at(q5ar=(0 .25 .5 .75 1)) at(religion=(1 2 3 5)) post parmest, label format(estimate min95 max95 p %8.3f p %8.1e) saving(catholic_prot_margins, replace) idstr("Probability of Voting Protestant (v. Catholic)") flist(results) drop paiselectionyear_* preserve drop _all append using $results rename idstr model replace label = "No Church Attendance" if parm == "1._at" replace label = "Church Once/Twice Per Year" if parm == "2._at" replace label = "Church Once a Month" if parm == "3._at" replace label = "Church Once a Week" if parm == "4._at" replace label = "Church > Once a Week" if parm == "5._at" replace label = "Catholic" if parm == "6._at" replace label = "Historical Protestant" if parm == "7._at" replace label = "Evangelical" if parm == "8._at" replace label = "No Religion" if parm == "9._at" save "candidate religion probabilities.dta", replace restore ********* NOTE THAT THE FIGURE WAS PRODUCED IN R ************************************************* ANALYSIS DISCUSSED IN TEXT ******************************************************************************* *************** Descriptives for Religious Affiliation in the Region, 2012 preserve drop if year != 2012 lab var religion "Religious Affiliation in Latin America, Population-Weighted, 2012" g pop = . replace pop = 40412 if pais == 17 replace pop = 9930 if pais == 10 replace pop = 194946 if pais == 15 replace pop = 17114 if pais == 13 replace pop = 46295 if pais == 8 replace pop = 4659 if pais == 6 replace pop = 9927 if pais == 21 replace pop = 14465 if pais == 9 replace pop = 6193 if pais == 3 replace pop = 14389 if pais == 2 replace pop = 7601 if pais == 4 replace pop = 113423 if pais == 1 replace pop = 5788 if pais == 5 replace pop = 3517 if pais == 7 replace pop = 6455 if pais == 12 replace pop = 29077 if pais == 11 replace pop = 3369 if pais == 14 replace pop = 28980 if pais == 16 g wt_pop = pop/556538 g wt_pop_1500 = weight1500*wt_pop svyset upm [pweight=wt_pop_1500], strata(estratopri) svy: tab religion2 restore ************* Footnote 3: Regression of Religious Affiliation on Time, by Country preserve use "AmericasBarometer Merged 2004-2012 v15.0.dta", clear drop if pais > 21 egen country = group(pais) recode q3c (1 = 1) (2 5 6 12 = 2) (4 11 = 3) (3 7 10 = 4) (15 = .), g(religion) replace religion = 1 if q3_08 == 1 replace religion = 2 if q3_08 == 2 | q3_08 == 5 | q3_08 == 6 replace religion = 3 if q3_08 == 4 replace religion = 4 if q3_08 == 3 | q3_08 == 7 replace religion = 1 if q3_0406 == 1 replace religion = 2 if (q3_0406 == 2 | q3_0406 == 5) & (year == 2006 | (year == 2004 & pais != 9)) replace religion = 3 if q3_0406 == 4 & (year == 2006 | (year == 2004 & pais != 9)) replace religion = 4 if q3_0406 == 3 & (year == 2006 | (year == 2004 & pais != 9)) replace religion = 1 if q3_0406 == 2 & year == 2004 & pais == 9 replace religion = 2 if q3_0406 == 3 & year == 2004 & pais == 9 replace religion = 3 if q3_0406 == 4 & year == 2004 & pais == 9 replace religion = 4 if q3_0406 == 5 & year == 2004 & pais == 9 lab var religion "Religion" lab def religion 1 "Catholic" 2 "Other Christian" 3 "No Religion" 4 "Non-Christian" lab val religion religion recode religion .a .b .c = . nicelylabelleddummies religion, g(religion_) rename religion_1 catholic rename religion_2 otherchristian rename religion_3 noreligion rename religion_4 nonchristian svy: logit catholic year ** ACROSS THE REGION AS A WHOLE CATHOLICISM IS LOSING GROUND quietly parmby "svy: logit catholic year", by(pais) label command norestore drop if parm != "year" tabstat estimate p min95 max95, by(pais) ** CATHOLICS LOST GROUND IN MEX, EL SAL, HON, NIC, CR, PAN, COL, URU, BRA, DR ** CATHOLICS DIDN'T LOSE SIGNIFICANT GROUND IN GUAT, BOL, PER, PAR, CHI, ARG, ECU, VEN ** CATHOLICS GAINED GROUND IN ECU restore preserve use "AmericasBarometer Merged 2004-2012 v15.0.dta", clear drop if pais > 21 egen country = group(pais) recode q3c (1 = 1) (2 5 6 12 = 2) (4 11 = 3) (3 7 10 = 4) (15 = .), g(religion) replace religion = 1 if q3_08 == 1 replace religion = 2 if q3_08 == 2 | q3_08 == 5 | q3_08 == 6 replace religion = 3 if q3_08 == 4 replace religion = 4 if q3_08 == 3 | q3_08 == 7 replace religion = 1 if q3_0406 == 1 replace religion = 2 if q3_0406 == 2 | q3_0406 == 5 replace religion = 3 if q3_0406 == 4 replace religion = 4 if q3_0406 == 3 lab var religion "Religion" lab def religion 1 "Catholic" 2 "Other Christian" 3 "No Religion" 4 "Non-Christian" lab val religion religion recode religion .a .b .c = . nicelylabelleddummies religion, g(religion_) rename religion_1 catholic rename religion_2 otherchristian rename religion_3 noreligion rename religion_4 nonchristian quietly parmby "svy: logit noreligion year", by(pais) label command norestore drop if parm != "year" tabstat estimate p min95 max95, by(pais) **NONRELIGIOUS GAINED GROUND IN BRA, BOL, COL, DR, MEX, URU **NONRELIGIOUS LOST GROUND IN GUATEMALA, EL SAL, AND PAR svy: logit noreligion year **ACROSS THE REGION AS A WHOLE, THE NON-RELIGIOUS ARE GAINING GROUND restore preserve use "AmericasBarometer Merged 2004-2012 v15.0.dta", clear drop if pais > 21 egen country = group(pais) recode q3c (1 = 1) (2 5 6 12 = 2) (4 11 = 3) (3 7 10 = 4) (15 = .), g(religion) replace religion = 1 if q3_08 == 1 replace religion = 2 if q3_08 == 2 | q3_08 == 5 | q3_08 == 6 replace religion = 3 if q3_08 == 4 replace religion = 4 if q3_08 == 3 | q3_08 == 7 replace religion = 1 if q3_0406 == 1 replace religion = 2 if q3_0406 == 2 | q3_0406 == 5 replace religion = 3 if q3_0406 == 4 replace religion = 4 if q3_0406 == 3 lab var religion "Religion" lab def religion 1 "Catholic" 2 "Other Christian" 3 "No Religion" 4 "Non-Christian" lab val religion religion recode religion .a .b .c = . nicelylabelleddummies religion, g(religion_) rename religion_1 catholic rename religion_2 otherchristian rename religion_3 noreligion rename religion_4 nonchristian svy: logit otherchristian year **ACROSS THE REGION AS A WHOLE, NON-CATHOLIC CHRISTIANS ARE GAINING GROUND quietly parmby "svy: logit otherchristian year", by(pais) label command norestore drop if parm != "year" tabstat estimate p min95 max95, by(pais) ** NON-CATHOLICS GAIN SIGNIFICANTLY IN MEX, GUAT, EL SAL, HON, NIC, CR, PAN, COL, PAR, BRA, VEN, ARG ** NON-CATHOLICS LOST SIGNIFICANTLY IN ECUADOR restore preserve use "AmericasBarometer Merged 2004-2012 v15.0.dta", clear drop if pais > 21 egen country = group(pais) recode q3c (1 = 1) (2 5 6 12 = 2) (4 11 = 3) (3 7 10 = 4) (15 = .), g(religion) replace religion = 1 if q3_08 == 1 replace religion = 2 if q3_08 == 2 | q3_08 == 5 | q3_08 == 6 replace religion = 3 if q3_08 == 4 replace religion = 4 if q3_08 == 3 | q3_08 == 7 replace religion = 1 if q3_0406 == 1 replace religion = 2 if q3_0406 == 2 | q3_0406 == 5 replace religion = 3 if q3_0406 == 4 replace religion = 4 if q3_0406 == 3 lab var religion "Religion" lab def religion 1 "Catholic" 2 "Other Christian" 3 "No Religion" 4 "Non-Christian" lab val religion religion recode religion .a .b .c = . nicelylabelleddummies religion, g(religion_) rename religion_1 catholic rename religion_2 otherchristian rename religion_3 noreligion rename religion_4 nonchristian foreach i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 21 { tab1 pais if pais == `i' tabstat catholic if pais == `i', by(year) tabstat otherchristian if pais == `i', by(year) tabstat noreligion if pais == `i', by(year) tabstat nonchristian if pais == `i', by(year) } restore ************* Descriptives for Church Attendance preserve svyset upm [pweight=weight1500], strata(estratopri) drop if year != 2012 svy: mean q5ar, over(pais) svy: mean q5ar, over(religion2) svy, subpop(catholic): tab q5ar svy, subpop(evangelical): tab q5ar svy, subpop(mainline): tab q5ar svy, subpop(noreligion): tab q5ar svy, subpop(lds_jw): tab q5ar restore ************* IDEOLOGICAL VOTING: PREDICTED VALUES FOR EACH RELIG GROUP preserve svyset upm [pweight=weight1500], strata(estratopri) svy: mean vote_wb_lr_coal, over(religion) restore ************* INTERACTION BETWEEN CHURCH ATTENDANCE AND AFFILIATION: IDEOLOGICAL VOTING svy: reg vote_wb_lr_coal mainline evangelical noreligion mainlineXchurch evangelicalXchurch noreligionXchurch q5ar lds_jw nonchristian /// mujer edr quintall edad tamanor indigenous black /// year2010 year2012 country2-country18 lincom mainline + .25*mainlineXchurch lincom mainline + .5*mainlineXchurch lincom mainline + mainlineXchurch //MAINLINE IS STAT. SIGNFICANT (POSITIVE) ONLY FOR THOSE ATTEND CHURCH < ONCE/MONTH, A DUBIOUS RESULT lincom evangelical + .25*evangelicalXchurch lincom evangelical + .5*evangelicalXchurch lincom evangelical + .75*evangelicalXchurch lincom evangelical + evangelicalXchurch //EVANGELICAL IS STAT. SIGNFICANT (NEGATIVE) ONLY FOR THOSE ATTEND CHURCH ONCE/MONTH OR LESS lincom noreligion + .25*noreligionXchurch lincom noreligion + .5*noreligionXchurch lincom noreligion + .75*noreligionXchurch lincom noreligion + noreligionXchurch //NO RELIGION BECOMES NS FOR THOSE WHO ATTEND CHURCH > ONCE/WEEK lincom q5ar + mainlineXchurch //CHURCH ATTENDANCE NS FOR HISTORICAL PROTS lincom q5ar + evangelicalXchurch //CHURCH ATTENDANCE SIG FOR EVANGELICALS lincom q5ar + noreligionXchurch //CHURCH ATTENDANCE *VERY* SIG FOR NO RELIGION **************** CAND IDEOLOGY ANALYSIS preserve collapse vote_wb_lr_coal cand_religion, by(candidate_uniqueid) tabstat vote_wb_lr_coal, by(cand_religion) restore ************* INTERACTION BETWEEN CHURCH ATTENDANCE AND AFFILIATION: IDENTITY VOTING FOR SECULAR CANDIDATES preserve svyset upm [pw=weight1500Xelectionyear], strata(estratopri) nicelylabelleddummies paiselectionyear if election_secular == 1, g(paiselectionyear_) svy: logit cand_secular mainline evangelical noreligion mainlineXchurch evangelicalXchurch noreligionXchurch q5ar lds_jw nonchristian /// mujer quintall edr edad tamanor indigenous black /// paiselectionyear_* if election_secular == 1 lincom mainline + .25*mainlineXchurch lincom mainline + .5*mainlineXchurch lincom mainline + .75*mainlineXchurch lincom mainline + mainlineXchurch // NO SIG INTERACTIONS lincom evangelical + .25*evangelicalXchurch lincom evangelical + .5*evangelicalXchurch lincom evangelical + .75*evangelicalXchurch lincom evangelical + evangelicalXchurch // NO SIG INTERACTIONS lincom noreligion + .25*noreligionXchurch lincom noreligion + .5*noreligionXchurch lincom noreligion + .75*noreligionXchurch lincom noreligion + noreligionXchurch // NS AT HIGHEST LEVELS OF CHURCH ATTENDANCE lincom q5ar + mainlineXchurch // CHURCH ATTENDANCE NS FOR MAINLINE lincom q5ar + evangelicalXchurch // CHURCH ATTENDANCE NS FOR EVANGELICALS lincom q5ar + noreligionXchurch // CHURCH ATTENDANCE HIGHLY SIG restore ************* INTERACTION BETWEEN CHURCH ATTENDANCE AND AFFILIATION: IDENTITY VOTING FOR PROTESTANT CANDIDATES preserve svyset upm [pw=weight1500Xelectionyear], strata(estratopri) nicelylabelleddummies paiselectionyear if election_prot == 1, g(paiselectionyear_) svy: logit cand_prot mainline evangelical noreligion mainlineXchurch evangelicalXchurch noreligionXchurch q5ar lds_jw nonchristian /// mujer quintall edr edad tamanor indigenous black /// paiselectionyear_* if election_prot == 1 lincom mainline + .25*mainlineXchurch lincom mainline + .5*mainlineXchurch lincom mainline + .75*mainlineXchurch lincom mainline + mainlineXchurch // STAT SIG ONLY IF CHURCH >= .75 lincom evangelical + .25*evangelicalXchurch lincom evangelical + .5*evangelicalXchurch lincom evangelical + .75*evangelicalXchurch lincom evangelical + evangelicalXchurch // STAT SIG ONLY IF CHURCH >= .75 lincom noreligion + .25*noreligionXchurch lincom noreligion + .5*noreligionXchurch lincom noreligion + .75*noreligionXchurch lincom noreligion + noreligionXchurch //NS AT ALL LEVELS OF CHURCH ATTENDANCE lincom q5ar + mainlineXchurch // NS lincom q5ar + evangelicalXchurch //NS lincom q5ar + noreligionXchurch //NS restore ************* EFFECT OF EDUCATION ON PROTESTANT VOTING preserve nicelylabelleddummies paiselectionyear if election_prot == 1, g(paiselectionyear_) svy: logit cand_prot i.religion q5ar mujer quintall edr edad tamanor indigenous black /// paiselectionyear_* if election_prot == 1 margins, at(edr=(0 .33 .67 1)) restore *********** CONTROL FOR IDEOLOGY IN SECULAR VOTING MODEL preserve nicelylabelleddummies paiselectionyear if election_secular == 1, g(paiselectionyear_) svy: logit cand_secular i.religion q5ar edr mujer quintall edad tamanor indigenous black /// paiselectionyear_* if election_secular == 1 restore