Download 22/replication_package/JOP_ChuRecchia_ReplicationStataCode.do from chuxuan/REPRO-Bench: direct link, hf CLI and curl.
- Browser
- Download file 4.5 kB
-
https://huggingface.co/datasets/chuxuan/REPRO-Bench/resolve/main/22/replication_package/JOP_ChuRecchia_ReplicationStataCode.do
- Command line
-
hf download hf://datasets/chuxuan/REPRO-Bench/22/replication_package/JOP_ChuRecchia_ReplicationStataCode.do
-
curl -L -o JOP_ChuRecchia_ReplicationStataCode.do https://huggingface.co/datasets/chuxuan/REPRO-Bench/resolve/main/22/replication_package/JOP_ChuRecchia_ReplicationStataCode.do
4.5 kB
| ***********Does Public Opinion affect the Preferences of Foreign Policy Leaders? Experimental Evidence from the UK Parliament | |
| ***********Journal of Politics | |
| ***********Jonathan A. Chu and Stefano Recchia | |
| ***********Author contact information at: jonathanchu.org | |
| cd "[insert file location of JOP_ChuRecchia_ReplicationData.dta]" | |
| use JOP_ChuRecchia_ReplicationData.dta | |
| svyset [pw=weight_pr] | |
| **************Main Manuscript: Figure 1 | |
| **************Main Manuscript: Figure 1 | |
| histogram dv_full [fw=weight_freq] if t_poll==0 , discrete percent fcolor(ebblue*0.6) lcolor(white) /// | |
| subtitle( , lcolor(white) fcolor(white) size(large) ) /// | |
| title("Not given polling information (control group)", margin(medium) color(black) pos(6)) /// | |
| ylab(0(10)70, angle(horizontal) nogmin gmax grid nogextend glcolor(gray*0.3) glwidth(vthin) notick) /// | |
| ytitle("", size (medlarge) margin(medsmall)) /// | |
| yscale(lcolor(white) ) xscale(line lcolor(black) ) /// | |
| xlab(1(1)3 1 "Cease" 2 "Continue" 3 "DK/Other", labsize(medium) notick) /// | |
| xtitle("", size (medlarge) margin(medsmall)) /// | |
| graphregion(fcolor(white) lcolor(white)) bgcolor(white) xsize(10) ysize(8) /// | |
| legend(off) name (control_weights, replace) | |
| histogram dv_full [fw=weight_freq] if t_poll==1 , discrete percent fcolor(ebblue*0.6) lcolor(white) /// | |
| subtitle( , lcolor(white) fcolor(white) size(large) ) /// | |
| title("Given polling information (treatment group)", margin(medium) color(black) pos(6)) /// | |
| ylab(0(10)70, angle(horizontal) nogmin gmax grid nogextend glcolor(gray*0.3) glwidth(vthin) notick) /// | |
| ytitle("", size (medlarge) margin(medsmall)) /// | |
| yscale(lcolor(white) ) xscale(line lcolor(black) ) /// | |
| xlab(1(1)3 1 "Cease" 2 "Continue" 3 "DK/Other", labsize(medium) notick) /// | |
| xtitle("", size (medlarge) margin(medsmall)) /// | |
| graphregion(fcolor(white) lcolor(white)) bgcolor(white) xsize(10) ysize(8) /// | |
| legend(off) name (treatment_weights, replace) | |
| graph combine control_weights treatment_weights, /// | |
| title("Views on Military Presence in the South China Sea", size(vlarge) margin(small) color(black) pos(11) ) /// | |
| subtitle("% of MPs who believe that the UK should ____ activity in the South China Sea", size(medium) margin(small) color(black) pos(11) ) /// | |
| xcommon ycommon /// | |
| graphregion(fcolor(white) ilcolor(white) lcolor(white)) plotregion(color(white) margin(b = 0)) /// | |
| xsize(16) ysize(9) name(histograms_compare, replace) | |
| **************Appendix: Table A1 | |
| **************Appendix: Table A1 | |
| tab female t_poll, col | |
| tab conservative t_poll, col | |
| tab labour t_poll, col | |
| tab other_party t_poll, col | |
| *************Appendix: Note at bottom of Table A1: no difference is significant at 0.10 level | |
| svy: reg female t_poll | |
| svy: reg conservative t_poll | |
| svy: reg labour t_poll | |
| svy: reg other_party t_poll | |
| **************Appendix: Table A2 | |
| **************Appendix: Table A2 | |
| ***Column 1 | |
| svy: mean (dv_cease100) if t_poll==1 // dependent variable scaled to be out of 100 | |
| svy: mean (dv_continue100) if t_poll==1 | |
| svy: mean (dv_otherDK100) if t_poll==1 | |
| ***Column 2 | |
| svy: mean (dv_cease100) if t_poll==0 | |
| svy: mean (dv_continue100) if t_poll==0 | |
| svy: mean (dv_otherDK100) if t_poll==0 | |
| ***Column 3 | |
| svy: reg dv_cease100 t_poll | |
| svy: reg dv_continue100 t_poll | |
| svy: reg dv_otherDK100 t_poll | |
| **************Appendix: Figure A1 | |
| **************Appendix: Figure A1 | |
| svy: reg dv_continue100 t_poll if female==0 | |
| estimates store poll_male | |
| svy: reg dv_continue100 t_poll if female ==1 | |
| estimates store poll_female | |
| svy: reg dv_continue100 t_poll female | |
| estimates store poll_control | |
| coefplot /// | |
| (poll_male, offset(0.3) label ("Effect among Men") msymbol(square) msize(huge) mfcolor(white) color(black) ciopts(recast(rcap) color(black)) level(90)) /// | |
| (poll_female, offset(0) label ("Effect among Women") msymbol(square) msize(huge) mfcolor(black*0.5) color(black) ciopts(recast(rcap) color(black)) level(90)) /// | |
| (poll_control, offset(-0.3) label ("Effect controlling for Gender") msymbol(square) msize(huge) color(black) ciopts(recast(rcap) color(black)) level(90)) /// | |
| , drop(_cons female) xline(0, lcolor(black*0.7) lp(dash) ) /// | |
| xtitle( "Percentage Point Effect of Public Opinion", size (large) margin(medlarge)) /// | |
| graphregion(fcolor(white) lcolor(white)) bgcolor(white) /// | |
| yscale(off) xscale (line noextend) xlab(-20(10)60) /// | |
| legend (region(lcolor(white)) pos (11) col(1) ) xsize(10) ysize(12) name(Poll_Gender, replace) | |