REPRO-Bench / 23 /replication_package /Code /replicate_fig_A12.R
anonymous-submission-acl2025's picture
add 23
a846767
##--##--##--##--##--##--##
## Appendix: Figure A12
##--##--##--##--##--##--##
## U.S.
us_survey_wave1_dv = lm(degree_violence ~ identity_protesters*interest_news +age +female + education + income + ideology + race, data=us_survey_wave1[us_survey_wave1$tactic==0,], weights=weight)
us_survey_wave1_dv_all = ggpredict(us_survey_wave1_dv, terms = c("interest_news"))
us_survey_wave1_dv_all$interest_news = c("Hardly at all", "Only now \nand then", "Some of \nthe time", "Most of \nthe time")
us_survey_wave1_dv_all$interest_news = factor(us_survey_wave1_dv_all$interest_news, levels=c("Hardly at all", "Only now \nand then", "Some of \nthe time", "Most of \nthe time"))
us_survey_wave1_dv_all = as.data.frame(us_survey_wave1_dv_all)
news_usa_study1 = ggplot(us_survey_wave1_dv_all, aes(x = interest_news, y = predicted, group="all")) +
geom_line()+ geom_errorbar(width = 0, ymin=us_survey_wave1_dv_all$conf.low, ymax=us_survey_wave1_dv_all$conf.high)+
geom_point(size=3) + ylim(-0.05,10) + theme_bw() +
scale_colour_grey(start = 0.1, end = 0.65) + geom_hline(yintercept=0, linetype="dashed")+
ylab("Perceived degree violence") + xlab("\nHow often do you follow the news?") + ggtitle("Perceptions of Black Protesters in the U.S.")
## Israel
isr_survey_wave1$interest_news2 = isr_survey_wave1$interest_news-1
isr_survey_dv_eth = lm(degree_violence ~ identity_protesters*interest_news2 + age +female + education + income + ideology + ethnicity, data=isr_survey_wave1[isr_survey_wave1$identity_protesters %in% c(0,1) & isr_survey_wave1$tactic==0,], weights=weight)
isr_survey_dv_all_eth = ggpredict(isr_survey_dv_eth, terms = c("interest_news2"))
isr_survey_dv_all_eth$interest_news = c("Hardly at all", "Only now \nand then", "Some of \nthe time", "Most of \nthe time")
isr_survey_dv_all_eth$interest_news = factor(isr_survey_dv_all_eth$interest_news, levels=c("Hardly at all", "Only now \nand then", "Some of \nthe time", "Most of \nthe time"))
isr_survey_dv_all_eth = as.data.frame(isr_survey_dv_all_eth)
isr_survey_dv_all_eth$Minority = "Ethiopians"
isr_survey_dv_arab = lm(degree_violence ~ identity_protesters*interest_news2 + age +female + education + income + ideology + ethnicity, data=isr_survey_wave1[isr_survey_wave1$identity_protesters %in% c(0,2) & isr_survey_wave1$tactic==0,], weights=weight)
isr_survey_dv_all_arab = ggpredict(isr_survey_dv_arab, terms = c("interest_news2"))
isr_survey_dv_all_arab$interest_news = c("Hardly at all", "Only now \nand then", "Some of \nthe time", "Most of \nthe time")
isr_survey_dv_all_arab$interest_news = factor(isr_survey_dv_all_arab$interest_news, levels=c("Hardly at all", "Only now \nand then", "Some of \nthe time", "Most of \nthe time"))
isr_survey_dv_all_arab = as.data.frame(isr_survey_dv_all_arab)
isr_survey_dv_all_arab$Minority = "Arabs"
news_israel_study1_eth = ggplot(isr_survey_dv_all_eth, aes(x = interest_news, y = predicted, group="all")) +
geom_line()+ geom_errorbar(width = 0, ymin=isr_survey_dv_all_eth$conf.low, ymax=isr_survey_dv_all_eth$conf.high)+
geom_point(size=3) + ylim(-0.05,10) + theme_bw() +
scale_colour_grey(start = 0.1, end = 0.65) + geom_hline(yintercept=0, linetype="dashed")+
ylab("Perceived degree violence") + xlab("\nHow often do you follow the news?") + ggtitle("Perception of Ethiopian Protesters in Israel")
news_israel_study1_arab = ggplot(isr_survey_dv_all_arab, aes(x = interest_news, y = predicted, group="all")) +
geom_line()+ geom_errorbar(width = 0, ymin=isr_survey_dv_all_arab$conf.low, ymax=isr_survey_dv_all_arab$conf.high)+
geom_point(size=3) + ylim(-0.05,10) + theme_bw() +
scale_colour_grey(start = 0.1, end = 0.65) + geom_hline(yintercept=0, linetype="dashed")+
ylab("Perceived degree violence") + xlab("\nHow often do you follow the news?") + ggtitle("Perception of Arab Protesters in Israel")
grid_study1 = grid.arrange(news_usa_study1, news_israel_study1_eth, news_israel_study1_arab, nrow = 1)
ggsave(filename= "Figures/fig_A12.pdf", plot=grid_study1, width=13, height=4, units="in")