diff --git a/37/paper.pdf b/37/paper.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7fc39140d6021a0ab0a097e912a5cc53c8ae4855 --- /dev/null +++ b/37/paper.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fba35511be770b078c420809ab1085c2e5d2185dff39da6590d5dc206a9ac444 +size 2562994 diff --git a/37/replication_package/Data/survey_analysis.dta b/37/replication_package/Data/survey_analysis.dta new file mode 100644 index 0000000000000000000000000000000000000000..ba3b041f52240a105e7ba99457f5b356f8384406 --- /dev/null +++ b/37/replication_package/Data/survey_analysis.dta @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fa1f18b9ada18522dad9e3611398165ef1b7a1f373b198aa75787f15618a525 +size 6555473 diff --git a/37/replication_package/Do/Figures/.Rhistory b/37/replication_package/Do/Figures/.Rhistory new file mode 100644 index 0000000000000000000000000000000000000000..2dbbbec019d056612dd230268bf428d4b166afde --- /dev/null +++ b/37/replication_package/Do/Figures/.Rhistory @@ -0,0 +1,512 @@ +datafig_4_a_r_adj$b <- datafig_4_a_r$bY + datafig_4_a_r$bN +datafig_4_a_r_adj$lb <- datafig_4_a_r$lb_bY + datafig_4_a_r$lb_bN +datafig_4_a_r_adj$ub <- datafig_4_a_r$ub_bY + datafig_4_a_r$ub_bN +datafig_4_a_r_adj$bN <- datafig_4_a_r$bNY + datafig_4_a_r$bNN +datafig_4_a_r_adj$lbN <- datafig_4_a_r$lb_bNY + datafig_4_a_r$lb_bNN +datafig_4_a_r_adj$ubN <- datafig_4_a_r$ub_bNY + datafig_4_a_r$ub_bNN +datafig_4_a_r_adj<- datafig_4_a_r_adj[which(datafig_4_a_r_adj$b!=0), c("t","b", "lb", "ub", "bN", "lbN", "ubN")] +groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1) +datafig_4_a_r_adj$group <- groups +mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) +datafig_4_a_r_adj$mylabs <- mylabs +mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2) +datafig_4_a_r_adj$mylabs1 <- mylabs1 +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Rich'),'t'] <- 'High Income' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Not Rich'),'t'] <- 'Low Income' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Not College'),'t'] <- 'No College' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing' +#Plot +RightPanel9 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){ +p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) + +geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5, +shape = 18, size = 2) + +geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) + +geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15, +alpha = 0.5, size = 2) + +geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) + +facet_grid(group ~ ., space = 'free_y', scales = "free_y") + +xlim(x_lb,x_upb) + +xlab(label) + +theme_light() + +theme( +axis.line=element_blank(), #Removing the axis +panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'), +panel.grid.major.y = element_blank(), +text = element_text(family = "LM Roman 10", size = 10, colour = "black"), +axis.text = element_text(size = 10, colour = 'black'), +panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs +strip.background = element_blank(), +strip.text.y = element_blank(), +axis.title.y = element_blank(), +### Add spacing for xlabel +axis.ticks=element_blank(), #Removing the ticks +panel.spacing.y = unit(0, "lines"), +## Control legend +legend.position = "bottom", +legend.box = "horizontal", +legend.justification = c(0.85,0), +legend.title = element_blank(), +axis.text.x = element_text(size=9), +axis.text.y = element_text(size=9), +axis.title.x = element_text(size = 9, margin = margin(t=11)), +axis.ticks.x = element_blank() +) + +theme(legend.text=element_text(size=9)) + +scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) + +scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18)) +p2} +# Generate Figure +plot_grid(LeftPanelAdjustedData9(datafig_4_a_l_adj, "Misperception (in % points)", -25, 30 , 5, "Non-immigrants", "Immigrants"), +RightPanel9(datafig_4_a_r_adj, "Misperception (in % points)", -15, 15, "Non-immigrants", "Immigrants"), +labels=NULL, ncol=2, align='h', axis='b') +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData9(datafig_4_a_l_adj, "Misperception (in % points)", -25, 30 , 5, "Non-immigrants", "Immigrants"), +RightPanel9(datafig_4_a_r_adj, "Misperception (in % points)", -15, 15, "Non-immigrants", "Immigrants"), +labels=NULL, ncol=2, align='h', axis='b'), +"Figure_4_A.png") +# Left Panel +#Adjust Data +datafig_4_b_l_adj = datafig_4_b_l[datafig_4_b_l$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(datafig_4_b_l) %in% "n")] +LeftPanelAdjustedData9 = function(data_adj, label, x_lb, x_upb, distance_ticks, +labelActual = "Natives", labelMean = "Immigrants"){ +p <- ggplot(data_adj, aes(x=t)) + +## Plot segment joining and points +geom_segment(aes(x=t, xend=t, y=lb_perc, yend=ub_perc), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + +geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) + +geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) + +geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + +coord_flip() +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + +scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) + +theme_light() + +theme( +## Control grid +panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), +panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), +## Control legend +legend.position = "bottom", +legend.box = "horizontal", +legend.justification = c(0.4,0), +legend.title = element_blank(), +text = element_text(family = "LM Roman 10", color='black', size=10), +axis.text = element_text(colour = 'black'), +axis.text.x = element_text(size=9), +axis.text.y = element_text(size=9), +axis.title.x = element_text(size = 9, margin = margin(t=15)), +axis.ticks.x = element_blank() +) + +theme(legend.text=element_text(size=9))+ +scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) + +scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) + +xlab("") + +ylab(label) +p1} +# Rigth Panel +#Adjust Data +## Load and Clean Data +datafig_4_b_r[is.na(datafig_4_b_r)]<-0 +datafig_4_b_r_adj = datafig_4_b_r +datafig_4_b_r_adj$b <- datafig_4_b_r$bY + datafig_4_b_r$bN +datafig_4_b_r_adj$lb <- datafig_4_b_r$lb_bY + datafig_4_b_r$lb_bN +datafig_4_b_r_adj$ub <- datafig_4_b_r$ub_bY + datafig_4_b_r$ub_bN +datafig_4_b_r_adj$bN <- datafig_4_b_r$bNY + datafig_4_b_r$bNN +datafig_4_b_r_adj$lbN <- datafig_4_b_r$lb_bNY + datafig_4_b_r$lb_bNN +datafig_4_b_r_adj$ubN <- datafig_4_b_r$ub_bNY + datafig_4_b_r$ub_bNN +datafig_4_b_r_adj<- datafig_4_b_r_adj[which(datafig_4_b_r_adj$b!=0), c("t","b", "lb", "ub", "bN", "lbN", "ubN")] +groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1) +datafig_4_b_r_adj$group <- groups +mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) +datafig_4_b_r_adj$mylabs <- mylabs +mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2) +datafig_4_b_r_adj$mylabs1 <- mylabs1 +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Rich'),'t'] <- 'High Income' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Not Rich'),'t'] <- 'Low Income' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Not College'),'t'] <- 'No College' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing' +#Plot +RightPanel9 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){ +p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) + +geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5, +shape = 18, size = 2) + +geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) + +geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15, +alpha = 0.5, size = 2) + +geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) + +facet_grid(group ~ ., space = 'free_y', scales = "free_y") + +xlim(x_lb,x_upb) + +xlab(label) + +theme_light() + +theme( +axis.line=element_blank(), #Removing the axis +panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'), +panel.grid.major.y = element_blank(), +text = element_text(family = "LM Roman 10", size = 10, colour = "black"), +axis.text = element_text(size = 10, colour = 'black'), +panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs +strip.background = element_blank(), +strip.text.y = element_blank(), +axis.title.y = element_blank(), +### Add spacing for xlabel +axis.ticks=element_blank(), #Removing the ticks +panel.spacing.y = unit(0, "lines"), +## Control legend +legend.position = "bottom", +legend.box = "horizontal", +legend.justification = c(0.85,0), +legend.title = element_blank(), +axis.text.x = element_text(size=9), +axis.text.y = element_text(size=9), +axis.title.x = element_text(size = 9, margin = margin(t=11)), +axis.ticks.x = element_blank() +) + +theme(legend.text=element_text(size=9)) + +scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) + +scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18)) +p2} +# Generate Figure +plot_grid(LeftPanelAdjustedData9(datafig_4_b_l_adj, "Misperception (in % points)", 5, 35 , 5, "Non-immigrants", "Immigrants"), +RightPanel9(datafig_4_b_r_adj, "Misperception (in % points)", 0, 35, "Non-immigrants", "Immigrants"), +labels=NULL, ncol=2, align='h', axis='b') +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData9(datafig_4_b_l_adj, "Misperception (in % points)", 5, 35 , 5, "Non-immigrants", "Immigrants"), +RightPanel9(datafig_4_b_r_adj, "Misperception (in % points)", 0, 35, "Non-immigrants", "Immigrants"), +labels=NULL, ncol=2, align='h', axis='b'), +"Figure_4_B.png") +# Data adjustment for Left Panel: no rescaling needed +datafig_5_a_l_adj = DataAdjustNoResc(datafig_5_a_l) +# Generate Figure +plot_grid(LeftPanelAdjustedData(datafig_5_a_l_adj, "Share of Respondents", 0.1, .5 , .1, +"Alesina et al. (2018)", "Q on Imm."), +RightPanelPercentage(datafig_5_a_r, "Share of Respondents", 0.2, 0.6, 0.1), +labels=NULL, ncol=2, align='h', axis='b') +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData(datafig_5_a_l_adj, "Share of Respondents", 0.1, .5 , .1, +"Alesina et al. (2018)", "Q on Imm."), +RightPanelPercentage(datafig_5_a_r, "Share of Respondents", 0.2, 0.6, 0.1), +labels=NULL, ncol=2, align='h', axis='b'), "Figure_5_A.png") +# Data Adjustment +datafig_5_b_l_adj = DataAdjustNoResc(datafig_5_b_l) +# Generate Figure +plot_grid(LeftPanelAdjustedData(datafig_5_b_l_adj, "Share of Respondents", 0.15, .8 , .1, +"Alesina et al. (2018)", "Q on Imm."), +RightPanelPercentage(datafig_5_b_r, "Share of Respondents", 0.50, 0.8, 0.05), +labels=NULL, ncol=2, align='h', axis='b') +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData(datafig_5_b_l_adj, "Share of Respondents", 0.15, .8 , .1, +"Alesina et al. (2018)", "Q on Imm."), +RightPanelPercentage(datafig_5_b_r, "Share of Respondents", 0.50, 0.8, 0.05), +labels=NULL, ncol=2, align='h', axis='b'), "Figure_5_B.png") +# Left Panel +##Data Adjustment (do not consider m_real as missing) +datafig_6_a_l_adj = datafig_6_a_l[datafig_6_a_l$t %in% c("Sweden", "Germany", "Italy", +"France", "UK", "US"), !names(datafig_6_a_l) %in% c("n","m_real")] +datafig_6_a_l_adj$m_perc <- datafig_6_a_l_adj$m_perc +datafig_6_a_l_adj <- transform(datafig_6_a_l_adj, +lbound = lb_perc, +ubound = ub_perc) +##Graph +LeftPanel_NoActual = function(data_adj, label, xlb, xupb, distance_ticks){ +p <- ggplot(data_adj, aes(x=t)) + +## Plot segment joining and points +geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + +geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + +coord_flip() +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + +scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0), +limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) + +theme_light() + +theme( +## Control grid +panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), +panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), +## Control legend +legend.position = "none", +legend.box = "horizontal", +legend.justification = c(0.5,0), +legend.title = element_blank(), +text = element_text(family = "LM Roman 10", color='black', size=10), +axis.text = element_text(colour = 'black'), +axis.text.x = element_text(size=9), +axis.text.y = element_text(size=9), +axis.title.x = element_text(size = 9, margin = margin(t=15)), +axis.ticks.x = element_blank()) + +theme(legend.text=element_text(size=9))+ +scale_colour_manual(name = "", labels = 'Perceived (mean)', values =rgb(0.7,0.2,0.1,1)) + +scale_shape_manual(name = "", labels = c('Perceived (mean)'), values = 15) + +xlab("") + +ylab(label) +p1} +# Generate Figure +plot_grid(LeftPanel_NoActual(datafig_6_a_l_adj, "Share of Respondents", 0.05, 0.3, 0.05) , +RightPanelPercentage(datafig_6_a_r, "Share of Respondents", 0.05, 0.25, 0.05), +labels=NULL, ncol=2, align='h', axis='b') +# Export +FigureExporter(plot_grid(LeftPanel_NoActual(datafig_6_a_l_adj, "Share of Respondents", 0.05, 0.3, 0.05) , +RightPanelPercentage(datafig_6_a_r, "Share of Respondents", 0.05, 0.25, 0.05), +labels=NULL, ncol=2, align='h', axis='b'), "Figure_6_A.png") +# Left Panel +##Data Adjustment (do not consider m_real as missing) +datafig_6_b_l_adj = datafig_6_b_l[datafig_6_b_l$t %in% c("Sweden", "Germany", "Italy", +"France", "UK", "US"), !names(datafig_6_b_l) %in% c("n","m_real")] +datafig_6_b_l_adj$m_perc <- datafig_6_b_l_adj$m_perc +datafig_6_b_l_adj <- transform(datafig_6_b_l_adj, +lbound = lb_perc, +ubound = ub_perc) +##Graph +LeftPanel_NoActual = function(data_adj, label, xlb, xupb, distance_ticks){ +p <- ggplot(data_adj, aes(x=t)) + +## Plot segment joining and points +geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + +geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + +coord_flip() +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + +scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0), +limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) + +theme_light() + +theme( +## Control grid +panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), +panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), +## Control legend +legend.position = "none", +legend.box = "horizontal", +legend.justification = c(0.5,0), +legend.title = element_blank(), +text = element_text(family = "LM Roman 10", color='black', size=11), +axis.text = element_text(colour = 'black'), +axis.text.x = element_text(size=9), +axis.text.y = element_text(size=9), +axis.title.x = element_text(size = 9, margin = margin(t=15)), +axis.ticks.x = element_blank(), +) + +theme(legend.text=element_text(size=9))+ +scale_colour_manual(name = "", labels = 'Perceived (mean)', values =rgb(0.7,0.2,0.1,1)) + +scale_shape_manual(name = "", labels = c('Perceived (mean)'), values = 15) + +xlab("") + +ylab(label) +p1} +# Generate Figure +plot_grid(LeftPanel_NoActual(datafig_6_b_l_adj, "Share of Respondents", 0, 0.4, 0.1) , +RightPanelPercentage(datafig_6_b_r, "Share of Respondents", 0.1, 0.4, 0.05), +labels=NULL, ncol=2, align='h', axis='b') +# Export +FigureExporter(plot_grid(LeftPanel_NoActual(datafig_6_b_l_adj, "Share of Respondents", 0, 0.4, 0.1) , +RightPanelPercentage(datafig_6_b_r, "Share of Respondents", 0.1, 0.4, 0.05), +labels=NULL, ncol=2, align='h', axis='b'), "Figure_6_B.png") +# Left Panel +#Adjust Data +datafig_7_l_adj = datafig_7_l[datafig_7_l$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(datafig_7_l) %in% "n")] +LeftPanelAdjustedData12 = function(data_adj, label, x_lb, x_upb, distance_ticks, +labelActual = "Natives", labelMean = "Immigrants"){ +p <- ggplot(data_adj, aes(x=t)) + +## Plot segment joining and points +geom_segment(aes(x=t, xend=t, y=lb_perc, yend=ub_perc), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + +geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) + +geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) + +geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + +coord_flip() +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + +scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) + +theme_light() + +theme( +## Control grid +panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), +panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), +## Control legend +legend.position = "bottom", +legend.box = "horizontal", +legend.justification = c(0.3,0), +legend.title = element_blank(), +text = element_text(family = "LM Roman 10", color='black', size=10), +axis.text = element_text(colour = 'black'), +axis.text.x = element_text(size=9), +axis.text.y = element_text(size=9), +axis.title.x = element_text(size = 9, margin = margin(t=15)), +axis.ticks.x = element_blank() +) + +theme(legend.text=element_text(size=9))+ +scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) + +scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) + +xlab("") + +ylab(label) +p1} +# Rigth Panel +#Adjust Data +## Load and clean data +datafig_7_r[is.na(datafig_7_r)]<-0 +datafig_7_r_adj = datafig_7_r +datafig_7_r_adj$b <- datafig_7_r$bY + datafig_7_r$bN +datafig_7_r_adj$lb <- datafig_7_r$lb_bY + datafig_7_r$lb_bN +datafig_7_r_adj$ub <- datafig_7_r$ub_bY + datafig_7_r$ub_bN +datafig_7_r_adj$bN <- datafig_7_r$bNY + datafig_7_r$bNN +datafig_7_r_adj$lbN <- datafig_7_r$lb_bNY + datafig_7_r$lb_bNN +datafig_7_r_adj$ubN <- datafig_7_r$ub_bNY + datafig_7_r$ub_bNN +datafig_7_r_adj<- datafig_7_r_adj[which(datafig_7_r_adj$b!=0), c("t","b", "lb", "ub", "bN", "lbN", "ubN")] +groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1) +datafig_7_r_adj$group <- groups +mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) +datafig_7_r_adj$mylabs <- mylabs +mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2) +datafig_7_r_adj$mylabs1 <- mylabs1 +datafig_7_r_adj[which(datafig_7_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.' +datafig_7_r_adj[which(datafig_7_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College' +datafig_7_r_adj[which(datafig_7_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Rich'),'t'] <- 'High Income' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Not Rich'),'t'] <- 'Low Income' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Not College'),'t'] <- 'No College' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing' +#Plot +RightPanel12 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){ +p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) + +geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5, +shape = 18, size = 2) + +geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) + +geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15, +alpha = 0.5, size = 2) + +geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) + +facet_grid(group ~ ., space = 'free_y', scales = "free_y") + +xlim(x_lb,x_upb) + +xlab(label) + +theme_light() + +theme( +axis.line=element_blank(), #Removing the axis +panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'), +panel.grid.major.y = element_blank(), +text = element_text(family = "LM Roman 10", size = 10, colour = "black"), +axis.text = element_text(size = 9, colour = 'black'), +panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs +strip.background = element_blank(), +axis.text.y = element_text(size=9), +axis.title.y = element_blank(), +### Add spacing for xlabel +axis.title.x = element_text(size = 9, margin = margin(t=13)), +axis.ticks=element_blank(), #Removing the ticks +panel.spacing.y = unit(0, "lines"), +## Control legend +legend.position = "bottom", +legend.box = "horizontal", +legend.justification = c(0.65,0), +#panel.border = element_blank(), +legend.title = element_blank() +) + +theme(legend.text=element_text(size=9)) + +scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) + +scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18)) +p2} +# Generate Figure +plot_grid(LeftPanelAdjustedData12(datafig_7_l_adj, "Misperception (in % points)", -10, 30 , 10, "Non-immigrants", "Immigrants"), +RightPanel12(datafig_7_r_adj, "Misperception (in % points)", 0, 20, "Non-immigrants", "Immigrants"), +labels=NULL, ncol=2, align='h', axis='b') +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData12(datafig_7_l_adj, "Misperception (in % points)", -10, 30 , 10, "Non-immigrants", "Immigrants"), +RightPanel12(datafig_7_r_adj, "Misperception (in % points)", 0, 20, "Non-immigrants", "Immigrants"), +labels=NULL, ncol=2, align='h', axis='b'), +"Figure_7.png") +knitr::opts_chunk$set(echo = F, warning = F, message = F) +# Importing Packages +rm(list=ls()) +gc() +library(tidyverse) +library(extrafont) +library(gtable) +library(ggplot2) +library(gridExtra) +library(grid) +library(cowplot) +library(grDevices) +loadfonts() +# SPECIFY DIRECTORY OF THE REPLICATION PACKAGE +setwd("C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing_v2") +# IMPORTING DATASET +datafig_second_gen = read_csv('Out/Figures_data/figure_9_data.csv', show_col_types = FALSE) +# Function to Export Figures: SPECIFY DIRECTORY OF THE REPLICATION PACKAGE +FigureExporter = function(Figure, Name, WhereFolderDraft = "C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing_v2"){ +figure_name <- Name +figures_dir <- file.path(WhereFolderDraft, 'Out/Figures') +fig_path <- file.path(figures_dir, figure_name) +png(fig_path, width = 4800, height=2700, res = 720, type = c("cairo-png")) +Figure1 = Figure +print(Figure1) +} +#Data Adjustment for cleaning (Left Panel) Function - Without Rescaling +DataAdjustNoResc = function(data){ +data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")] +data$m_perc <- data$m_perc +data$m_real <- data$m_real +data <- transform(data, +lbound = lb_perc, +ubound = ub_perc) +diff <- data %>% +mutate(Max = max(m_perc, m_real), +Min = min(m_perc, m_real), +Diff = Max / Min - 1) %>% +arrange(desc(Diff)) +## Create difference between perception and real +data$diff <- (data$m_perc - data$m_real)/data$m_real +data_adj = data +data_adj +} +# Data adjustment: rescaling not needed +datafig_second_gen_adj = DataAdjustNoResc(datafig_second_gen) +# Function to generate the graph +Left_10_B = function(xlb, xupb, distance_ticks){ +data = datafig_second_gen_adj +p <- ggplot(data, aes(x=t)) + +## Plot segment joining and points +geom_segment(aes(x=t, xend=t, y=m_real, yend=m_perc), size = 0.4, color="black") + +geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + +geom_point(aes(x=t, y=m_real_2, colour= 'Act. 1 & 2 Gen.', shape = 'Act. 1 & 2 Gen.'), size=4) + +geom_point(aes(x=t, y=m_real, colour='Act. 1 Gen.', shape = 'Act. 1 Gen.'), size=4) + +geom_point(aes(x=t, y=m_perc, colour='Perceived (mean)', shape = 'Perceived (mean)'), size=3) + +coord_flip() +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + +scale_y_continuous(limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) + +theme_light() + +theme( +## Control grid +panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), +panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), +## Control legend +legend.position = "bottom", +legend.box = "horizontal", +legend.justification = c(0.5,0), +legend.title = element_blank(), +text = element_text(family = "LM Roman 10", color='black', size=11), +axis.text = element_text(colour = 'black'), +axis.text.x = element_text(size=9), +axis.text.y = element_text(size=9), +axis.title.x = element_text(size = 9, margin = margin(t=15)), +axis.ticks.x = element_blank() +) + +scale_colour_manual(name = "", labels = c( "Act. 1 & 2 Gen.", 'Act. 1 Gen.','Perceived (mean)'), +values = c("Act. 1 & 2 Gen." = "#1A476F", 'Act. 1 Gen.' = "#0080FF", +'Perceived (mean)' = rgb(0.7,0.2,0.1,1))) + +scale_shape_manual(name = "", labels = c("Act. 1 & 2 Gen.",'Act. 1 Gen.', 'Perceived (mean)'), +values = c( "Act. 1 & 2 Gen." = 20, 'Act. 1 Gen.' = 18, 'Perceived (mean)' = 15)) + +xlab("") + +ylab("Share of Immigrants") + +guides(col = guide_legend(nrow=2,byrow=TRUE)) +p1} +# Generate Figure +plot_grid(Left_10_B(0, 40, 5), labels=NULL, ncol=2, align='h', axis='b') +# Export +FigureExporter(plot_grid(Left_10_B(0, 40, 5), labels=NULL, ncol=2, align='h', axis='b'), "Figure_9.png") diff --git a/37/replication_package/Do/Figures/Fig10.do b/37/replication_package/Do/Figures/Fig10.do new file mode 100644 index 0000000000000000000000000000000000000000..1f9652efa8d82f965d4a5a0d4ea3c20fc2855000 --- /dev/null +++ b/37/replication_package/Do/Figures/Fig10.do @@ -0,0 +1,339 @@ +********** +* Immigration and Redistribution +* Alesina, Miano, Stantcheva +* RESTUD + +* Figure 10 +********** + +clear all + +* Specify directory of the replication package +global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing" +cd "$dir" + +* Declare output sub-directory + +global outdir "Out/Figures" + +* Load the data + +use "Data/survey_analysis.dta", clear + +* Countries included in the analysis +global countries "US UK DE FR IT SE" + + +* Generate flags - To ensure answers quality +gen flag_1=0 +gen flag_2=0 + +bysort country treatment_recod: egen min_duration = pctile(duration), p(2) +bysort country treatment_recod: egen max_duration = pctile(duration), p(98) + +replace flag_1=1 if durationmax_duration + +* Drop respondents that have spent too little or too much time (bottom/top 2%) + +keep if flag_1==0 & flag_2==0 + +*Drop variable used to exclude inattentive respondents +drop flag_1 flag_2 min_duration max_duration + +* Add data on actual natives and immigrants statistics and generate misperceptions * + +do "Do/misperceptions.do" + +* Gen additional variables entering the indices * + +* Dummy = 1 if Mohammad receives more on net from the state (either receives more transfers and pays same or less taxes or receives same transfers but pays less taxes) +gen moh_more=(Moh_transfers<3 & Moh_tax>2) +replace moh_more=1 if Moh_transfers==3 & Moh_tax>3 +replace moh_more=. if Moh_tax==. | Moh_transfers==. +la var moh_more "Mohammad receives more transfers and/or pay less taxes than John" +label val moh_more binary + +* Transfers +gen imm_tra_more=(transfers_imm==10 |transfers_imm==11 |transfers_imm==12 |transfers_imm==13) +la var imm_tra_more "Immigrants receive more government transfers than natives" +replace imm_tra_more=. if transfers_imm==. +label val imm_tra_more binary + +* Immigration is not a problem +gen imm_not_problem=(q_imm_problem==16 | q_imm_problem==17) +replace imm_not_problem=. if q_imm_problem==. +la var imm_not_problem "Immigration is not a problem" +label val imm_not_problem binary + +* When should immigrants be entitled to get benefits? +gen imm_benefits_soon=(q_imm_benefits==1 | q_imm_benefits==2 | q_imm_benefits==4) +replace imm_benefits_soon=. if q_imm_benefits==. +la var imm_benefits_soon "Immigrants should get benefits in less than 3 years" +label val imm_benefits_soon binary + +* When should immigrants be allowed to apply for citizenship? +gen imm_citizenship_soon=(q_imm_citizenship==1 | q_imm_citizenship==2) +replace imm_citizenship_soon=. if q_imm_citizenship==. +la var imm_citizenship_soon "Immigrants should get citizenship in 2 or 5 years" +label val imm_citizenship_soon binary + +* When would you consider an immigrant "Truly American"? +gen trully_american_cit=(q_imm_american==7 | q_imm_american==1 | q_imm_american==4) +replace trully_american_cit=. if q_imm_american==. +la var trully_american_cit "Consider American at citizenship or sooner" +label val trully_american_cit binary + +*Budget allocation +winsor2 budget_safetynet budget_health budget_education, s(_w) c(5 95) by(country) +la var budget_safetynet_w "% of the budget assigned to Income Support Program (winsorized)" +la var budget_health_w "% of the budget assigned to Public Spending on Health (winsorized)" +la var budget_education_w "% of the budget assigned to Spending on Schooling (winsorized)" + +gen budget_social_w = budget_health_w + budget_safetynet_w +la var budget_social_w "% of the budget assigned to Income Support Program and Health (winsorized)" + +* Inequality is not a problem +gen ineq_no_problem=(q_inequality_problem==1) +replace ineq_no_problem=. if q_inequality_problem==. +la var ineq_no_problem "Inequality is not a problem" +label val ineq_no_problem binary + +* Total donation above 50th percentile within country +gen total_donation_d=0 +foreach x in $countries { +su total_donation if country=="`x'", d +replace total_donation_d=1 if total_donation>r(p50) & country=="`x'" +} +replace total_donation_d=. if total_donation==. + +la var total_donation_d "Donated more than the median of the country of reference" +label val total_donation_d binary + + +*** Keep only control group *** + +keep if control==1 + + +**************** +* Gen controls * +**************** + + +* Gen Left-right variables * +* Based on vote or voting intensions +gen left=(party_voted==4 | party_voted==5) +replace left=. if party_voted==. | party_voted==6 | party_voted==0 +gen right=(party_voted==1 | party_voted==2) +replace right=. if party_voted==. | party_voted==6 | party_voted==0 +gen center=(party_voted==3) +replace center=. if party_voted==. | party_voted==6 | party_voted==0 + +label var left "Left-wing" +label var right "Right-wing" +label var center "Center" + +foreach i in left right center{ +label val `i' binary +} + + +* Young +gen young=(age<45) +label var young "Young" +label val young binary + +* Gender +gen male=(sex==1) +label var male "Male" +label val male binary + +* Children dummy +gen children=(number_children>1) +replace children=. if number_children==. +label var children "Has children" +label val children binary + +* Immigrant parent +gen immigrant_parent=(q_parent_same==2) +replace immigrant_parent=. if q_parent_same==. +label var immigrant_parent "At least one of the parents is an immigrant" +label val immigrant_parent binary + +* Top income +gen top_income=0 +foreach x in $countries{ +su household_income if country=="`x'", d +replace top_income=1 if household_income>r(p75) & country=="`x'" +} +label var top_income "High Income" +label val top_income binary + + + +* Redistribution index + +foreach var in tax_top1 tax_bottom50 budget_social_w budget_education_w ineq_no_problem total_donation_d{ + +su `var' +local `var'mc: display %5.3f `r(mean)' +su `var' +local `var'sdc: display %5.3f `r(sd)' +gen `var'_ind=(`var'-``var'mc')/``var'sdc' +replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==. +} + +gen red_index = (tax_top1_ind - tax_bottom50_ind + budget_social_w_ind + budget_education_w_ind - ineq_no_problem_ind + total_donation_d_ind)/6 + +foreach var in tax_top1 tax_bottom50 budget_social_w budget_education_w ineq_no_problem total_donation_d{ + drop `var'_ind +} + +*** Gen Immigration support index + +foreach var in imm_not_problem imm_benefits_soon imm_citizenship_soon /// + trully_american_cit q_govt_imm { +su `var' +local `var'mc: display %5.3f `r(mean)' +su `var' +local `var'sdc: display %5.3f `r(sd)' +gen `var'_ind=(`var'-``var'mc')/``var'sdc' +replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==. +} + +gen index_imm_support=(imm_benefits_soon_ind + imm_citizenship_soon_ind /// + +trully_american_cit_ind + q_govt_imm_ind +imm_not_problem_ind)/5 + + +drop imm_not_problem_ind imm_benefits_soon_ind imm_citizenship_soon_ind /// + trully_american_cit_ind q_govt_imm_ind + +****************************** +* Perception indices ***** +****************************** +*** Gen indices *** + +foreach var in mis_share_mu mis_share_ch mis_share_LA mis_share_AS mis_share_AF mis_share_E mis_share_NA /// + mis_unemp_imm mis_loweduc_imm mis_higheduc_imm mis_poverty_imm /// + effort_poor moh_more imm_tra_more{ + +su `var' +local `var'mc: display %5.3f `r(mean)' +su `var' +local `var'sdc: display %5.3f `r(sd)' +gen `var'_ind=(`var'-``var'mc')/``var'sdc' +replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==. +} + +gen culture_index = (mis_share_mu_ind - mis_share_ch_ind + mis_share_LA_ind + mis_share_AS_ind + mis_share_AF_ind - mis_share_E_ind - mis_share_NA_ind)/7 + +gen econ_index = (mis_unemp_imm_ind + mis_loweduc_imm_ind - mis_higheduc_imm_ind +mis_poverty_imm_ind)/4 + +gen free_riding_index = (effort_poor_ind + moh_more_ind + imm_tra_more_ind)/3 + +foreach var in mis_share_mu mis_share_ch mis_share_LA mis_share_AS mis_share_AF mis_share_E mis_share_NA /// + mis_unemp_imm mis_loweduc_imm mis_higheduc_imm mis_poverty_imm /// + effort_poor moh_more imm_tra_more{ + + drop `var'_ind + + } + + +label var culture_index "Perc. cultural distance index" +label var econ_index "Perc. economic weakness index" +label var free_riding_index "Perc. free-riding index" + + +******************************************** +* Declare variables to be used as controls * +******************************************** + +global controls right left male young immigrant_parent children university_degree top_income sector_dummy + + +************************** +* Correlation Graph with support for immigration and redistribution +************************* + +global X mis_share_foreign culture_index econ_index free_riding_index + +preserve + +** Standardize vars ** + +foreach var in red_index index_imm_support $X $controls{ + su `var' + local `var'mc: display %5.3f `r(mean)' + local `var'sdc: display %5.3f `r(sd)' + replace `var'=(`var'-``var'mc')/``var'sdc' + } + +* Regressions (All together) - Immigration + eststo: xi: reg index_imm_support $X $controls i.country, robust +foreach var in $X{ + local b`var'_imm= _b[`var'] + local se`var'_imm = _se[`var'] + local ub_b`var'_imm= _b[`var'] + 1.96*_se[`var'] + local lb_b`var'_imm= _b[`var'] - 1.96*_se[`var'] +} + +* Regressions (All together) - Redistribution + + + eststo: xi: reg red_index $X $controls i.country, robust +foreach var in $X{ + local b`var'_red= _b[`var'] + local se`var'_red = _se[`var'] + local ub_b`var'_red= _b[`var'] + 1.96*_se[`var'] + local lb_b`var'_red= _b[`var'] - 1.96*_se[`var'] +} + +* Make Graph + + clear + set obs 17 + egen t = seq() + label define quintile 15 "Perc. free-riding index" 11 "Perc. economic weakness index" 7 "Perc. cultural distance index" 3 "All Immigrants (misp.)" + label values t quintile + + gen bY = . + gen ub_bY = . + gen lb_bY = . + gen bN = . + gen ub_bN = . + gen lb_bN = . + gen n=_n + + + local q = 3 + foreach var in $X { + replace bY=`b`var'_imm' if n==`q'+1 + replace ub_bY=`ub_b`var'_imm' if n==`q'+1 + replace lb_bY=`lb_b`var'_imm' if n==`q'+1 + local q = `q' + 4 + } + + local q = 3 + foreach var in $X { + replace bN=`b`var'_red' if n==`q'-1 + replace ub_bN=`ub_b`var'_red' if n==`q'-1 + replace lb_bN=`lb_b`var'_red' if n==`q'-1 + local q = `q' + 4 + } + +twoway (rspike lb_bY ub_bY t, hor lcolor(blue*.2) lpattern(solid) lwidth(vthick)) /// + (scatter t bY, mcolor(blue*0.7) lcolor(blue*0.7) lpattern(solid) msymbol(S) msize(large)) /// + (rspike lb_bN ub_bN t, hor lcolor(red*.2) lpattern(solid) lwidth(vthick)) /// + (scatter t bN, mcolor(red*1.2) lcolor(red*1.2) lpattern(solid) msymbol(D) msize(large)), /// + ytitle("") xlabel(-0.4[0.1]0.15, labsize(medlarge)) ylabel(3 7 11 15, value labsize(medlarge) angle(0) glcolor(gs16) noticks) /// + xtitle("Correlation", size(medlarge)) /// + legend(order(2 4) row(2) lab(2 "Support for Immigration") lab(4 "Support for Redistribution")) /// + yline(5, lcolor(gs8) lpattern("-")) yline(9, lcolor(gs8) lpattern("-")) /// + yline(13, lcolor(gs8) lpattern("-")) /// + xline(0, lcolor(black) lw(vthin)) /// + graphregion(color(white)) plotregion(color(white)) + graph export "$outdir/Figure_10.eps", as(eps) replace + +restore diff --git a/37/replication_package/Do/Figures/Fig2to7.Rmd b/37/replication_package/Do/Figures/Fig2to7.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..4146f2fa8e96e58cfa5e28d0fe18de2d043abcca --- /dev/null +++ b/37/replication_package/Do/Figures/Fig2to7.Rmd @@ -0,0 +1,992 @@ +--- +title: "Figures 2 to 7" +output: pdf_document +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = F, warning = F, message = F) +``` + +```{r, include = F, echo = F} +# Importing Packages +rm(list=ls()) +gc() +library(tidyverse) +library(extrafont) +library(gtable) +library(ggplot2) +library(gridExtra) +library(grid) +library(cowplot) +library(grDevices) +loadfonts() +``` + +```{r} +# SPECIFY DIRECTORY OF THE REPLICATION PACKAGE +setwd("C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing") + +# IMPORTING DATASETS +datafig_2_l = read_csv('Out/Figures_data/figure_2_l_data.csv', show_col_types = FALSE) +datafig_2_r = read_csv('Out/Figures_data/figure_2_r_data.csv', show_col_types = FALSE) +datafig_3_a_l = read_csv('Out/Figures_data/figure_3_a_l_data.csv', show_col_types = FALSE) +datafig_3_a_r = read_csv('Out/Figures_data/figure_3_a_r_data.csv', show_col_types = FALSE) +datafig_3_b_l = read_csv('Out/Figures_data/figure_3_b_l_data.csv', show_col_types = FALSE) +datafig_3_b_r = read_csv('Out/Figures_data/figure_3_b_r_data.csv', show_col_types = FALSE) +datafig_4_a_l = read_csv('Out/Figures_data/figure_4_a_l_data.csv', show_col_types = FALSE) +datafig_4_a_r = read_csv('Out/Figures_data/figure_4_a_r_data.csv', show_col_types = FALSE) +datafig_4_b_l = read_csv('Out/Figures_data/figure_4_b_l_data.csv', show_col_types = FALSE) +datafig_4_b_r = read_csv('Out/Figures_data/figure_4_b_r_data.csv', show_col_types = FALSE) +datafig_5_a_l = read_csv('Out/Figures_data/figure_5_a_l_data.csv', show_col_types = FALSE) +datafig_5_a_r = read_csv('Out/Figures_data/figure_5_a_r_data.csv', show_col_types = FALSE) +datafig_5_b_l = read_csv('Out/Figures_data/figure_5_b_l_data.csv', show_col_types = FALSE) +datafig_5_b_r = read_csv('Out/Figures_data/figure_5_b_r_data.csv', show_col_types = FALSE) +datafig_6_a_l = read_csv('Out/Figures_data/figure_6_a_l_data.csv', show_col_types = FALSE) +datafig_6_a_r = read_csv('Out/Figures_data/figure_6_a_r_data.csv', show_col_types = FALSE) +datafig_6_b_l = read_csv('Out/Figures_data/figure_6_b_l_data.csv', show_col_types = FALSE) +datafig_6_b_r = read_csv('Out/Figures_data/figure_6_b_r_data.csv', show_col_types = FALSE) +datafig_7_l = read_csv('Out/Figures_data/figure_7_l_data.csv', show_col_types = FALSE) +datafig_7_r = read_csv('Out/Figures_data/figure_7_r_data.csv', show_col_types = FALSE) + +# Standardize the dataset labels of Figure 2 +datafig_2_r$t = datafig_3_a_r$t +``` + +```{r} +# Function to Export Figures: # SPECIFY DIRECTORY OF THE REPLICATION PACKAGE + +FigureExporter = function(Figure, Name, WhereFolderDraft = "C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"){ + figure_name <- Name + figures_dir <- file.path(WhereFolderDraft, 'Out/Figures') +fig_path <- file.path(figures_dir, figure_name) +png(fig_path, width = 4800, height=2700, res = 720, type = c("cairo-png")) +Figure1 = Figure +print(Figure1) +} +``` + + +```{r} +# Data Adjustment for Cleaning (Left Panel) Function + +DataAdjust = function(data){ +data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")] +data$m_perc <- data$m_perc/100 +data$m_real <- data$m_real/100 +data <- transform(data, + lbound = lb_perc/100, + ubound = ub_perc/100 + ) + +diff <- data %>% + mutate(Max = max(m_perc, m_real), + Min = min(m_perc, m_real), + Diff = Max / Min - 1) %>% + arrange(desc(Diff)) + +# Create difference between perception and real +data$diff <- (data$m_perc - data$m_real)/data$m_real +data_adj = data +data_adj +} +``` + + +```{r} +# Data Adjustment for Cleaning (Left Panel) Function - Without Rescaling + +DataAdjustNoResc = function(data){ +data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")] +data$m_perc <- data$m_perc +data$m_real <- data$m_real +data <- transform(data, + lbound = lb_perc, + ubound = ub_perc) + +diff <- data %>% + mutate(Max = max(m_perc, m_real), + Min = min(m_perc, m_real), + Diff = Max / Min - 1) %>% + arrange(desc(Diff)) + +# Create difference between perception and real +data$diff <- (data$m_perc - data$m_real)/data$m_real +data_adj = data +data_adj +} +``` + + +```{r} +# Left Panel Function (from Cleaned Dataset) + +LeftPanelAdjustedData = function(data_adj, label, x_lb, x_upb, distance_ticks, + labelActual = "Actual", labelMean = "Perceived (mean)"){ +p <- ggplot(data_adj, aes(x=t)) + + ## Plot segment joining and points + geom_segment(aes(x=t, xend=t, y=m_real, yend=m_perc), size = 0.4, color="black") + + geom_segment(aes(x=t, xend=t, y=lb_perc, yend=ub_perc), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + + geom_point(aes(x=t, y=m_real, colour='Actual', shape = "Actual"), size=4) + + geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + + coord_flip() + +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + + scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0), + limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) + + theme_light() + + theme( + ## Control grid + panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), + panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), + + ## Control legend + legend.position = "bottom", + legend.box = "horizontal", + legend.justification = c(0.5,0), + legend.title = element_blank(), + text = element_text(family = "LM Roman 10", color='black', size=10), + axis.text = element_text(colour = 'black'), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=15)), + axis.ticks.x = element_blank() + ) + + theme(legend.text=element_text(size=8))+ + scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) + + scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) + + xlab("") + + ylab(label) +p1} +``` + +```{r} +# Left Panel Function (from Initial Dataset) + +LeftPanel = function(data, label, x_lb, x_upb, distance_ticks, + labelActual = "Actual", labelMean = "Perceived (mean)"){ + +#Cleaning Data +data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")] +data$m_perc <- data$m_perc/100 +data$m_real <- data$m_real/100 +data <- transform(data, + lbound = lb_perc/100, + ubound = ub_perc/100 + ) + +diff <- data %>% + mutate(Max = max(m_perc, m_real), + Min = min(m_perc, m_real), + Diff = Max / Min - 1) %>% + arrange(desc(Diff)) + +## Create difference between perception and real +data$diff <- (data$m_perc - data$m_real)/data$m_real + +#Plot + +p <- ggplot(data, aes(x=t)) + + ## Plot segment joining and points + geom_segment(aes(x=t, xend=t, y=m_real, yend=m_perc), size = 0.4, color="black") + + geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + + geom_point(aes(x=t, y=m_real, colour='Actual', shape = "Actual"), size=4) + + geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + + coord_flip() + +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + + scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0), + limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) + + theme_light() + + theme( + ## Control grid + panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), + panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), + + ## Control legend + legend.position = "bottom", + legend.box = "horizontal", + legend.justification = c(0.5,0), + legend.title = element_blank(), + text = element_text(family = "LM Roman 10", color='black', size=11), + axis.text = element_text(colour = 'black'), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=15)), + axis.ticks.x = element_blank() + ) + + theme(legend.text=element_text(size=9))+ + scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) + + scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) + + xlab("") + + ylab(label) +p1} +``` + +```{r} +# Right Panel Function + +RightPanel = function(data, label, x_lb, x_upb){ + +## Load and clean data +data[is.na(data)]<-0 +data$b <- data$bY + data$bN +data$lb <- data$lb_bY + data$lb_bN +data$ub <- data$ub_bY + data$ub_bN +data <- data[which(data$b!=0),c("t","b", "lb", "ub")] + +groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1) +data$group <- groups + +mylabs <- c(0,1,1,0,1,0,0,1,0,1,0,1,1,0,0) +data$mylabs <- mylabs + +data[which(data$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.' +data[which(data$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College' +data[which(data$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College' +data[which(data$t=='Rich'),'t'] <- 'High Income' +data[which(data$t=='Not Rich'),'t'] <- 'Low Income' +data[which(data$t=='Not College'),'t'] <- 'No College' +data[which(data$t=='Right-Wing'),'t'] <- 'Right-Wing' +data[which(data$t=='Left-Wing'),'t'] <- 'Left-Wing' + +#Plot +p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) + + geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t, colour = factor(mylabs), alpha = 0.05), size = 2) + + geom_point(aes(x=b,y=t, colour=factor(mylabs), shape=factor(mylabs), size = factor(mylabs))) + + facet_grid(group ~ ., space = 'free_y', scales = "free_y") + + xlim(x_lb,x_upb) + + xlab(label) + + theme_light() + + theme( + legend.position = 'none', axis.line=element_blank(), #Removing the axis + panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'), + panel.grid.major.y = element_blank(), + text = element_text(family = "LM Roman 10", size = 11, colour = "black"), + axis.text = element_text(size = 11, colour = 'black'), + panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs + strip.background = element_blank(), + strip.text.y = element_blank(), + axis.text.y = element_text(size=9), + axis.title.y = element_blank(), + ### Add spacing for xlabel + axis.title.x = element_text(size = 9, margin = margin(t = 13)), + axis.ticks=element_blank(), #Removing the ticks + panel.spacing.y = unit(0, "lines") + ) + + theme(legend.text=element_text(size=9))+ + scale_colour_manual(values = c(rgb(0.7,0.2,0.1,1),'#F6891B'))+ + scale_shape_manual(values=c(18,15))+ + scale_size_manual(values=c(4,3)) +p2} +``` + + + +```{r} +# Right Panel Function, with Percentages on the X-Axis + +RightPanelPercentage = function(data, label, x_lb, x_upb, distance_ticks){ + +## Load and Clean Data +data[is.na(data)]<-0 +data$b <- data$bY + data$bN +data$lb <- data$lb_bY + data$lb_bN +data$ub <- data$ub_bY + data$ub_bN +data <- data[which(data$b!=0),c("t","b", "lb", "ub")] + +groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1) +data$group <- groups + +mylabs <- c(0,1,1,0,1,0,0,1,0,1,0,1,1,0,0) +data$mylabs <- mylabs + +data[which(data$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.' +data[which(data$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College' +data[which(data$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College' +data[which(data$t=='Rich'),'t'] <- 'High Income' +data[which(data$t=='Not Rich'),'t'] <- 'Low Income' +data[which(data$t=='Not College'),'t'] <- 'No College' + +#Create loop to add "%" sign to any break value +m = rep(NA, length(seq(x_lb, x_upb, by = distance_ticks))) +for (i in seq(from = 1, to = length(seq(x_lb, x_upb, by = distance_ticks)))){ +m[i] = paste(round(100*seq(x_lb, x_upb, by = distance_ticks)[i]),"%", sep="")} + +#Plot +p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) + + geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t, colour = factor(mylabs), alpha = 0.05), size = 2) + + geom_point(aes(x=b,y=t, colour=factor(mylabs), shape=factor(mylabs), size = factor(mylabs))) + + facet_grid(group ~ ., space = 'free_y', scales = "free_y") + + scale_x_continuous(breaks = seq(x_lb, x_upb, by = distance_ticks), labels = m) + + xlab(label) + + theme_light() + + theme( + legend.position = 'none', axis.line=element_blank(), #Removing the axis + panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'), + panel.grid.major.y = element_blank(), + text = element_text(family = "LM Roman 10", size = 11, colour = "black"), + axis.text = element_text(size = 10, colour = 'black'), + panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs + strip.background = element_blank(), + strip.text.y = element_blank(), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.y = element_blank(), + ### Add spacing for xlabel + axis.title.x = element_text(size = 9, margin = margin(t = 13)), + axis.ticks=element_blank(), #Removing the ticks + panel.spacing.y = unit(0, "lines") + ) + + theme(legend.text=element_text(size=9))+ + scale_colour_manual(values = c(rgb(0.7,0.2,0.1,1),'#F6891B'))+ + scale_shape_manual(values=c(18,15))+ + scale_size_manual(values=c(4,3)) +p2} +``` + + + + +```{r} +###Final Figure Function: creates the Final Figure, assemblying Panels + +FinalPlot = function(DataLeft, LabelLeft, LowerLeft, UpperLeft, TicksLeft, + DataRight, LabelRight, LowerRight, UpperRight){ +#Plot +p1 <- LeftPanel(DataLeft, LabelLeft, LowerLeft, UpperLeft, TicksLeft) +p2 <- RightPanel(DataRight, LabelRight, LowerRight, UpperRight) +Final_Plot <- plot_grid(p1,p2, labels=NULL, ncol=2, align='h', axis='b') +plot(Final_Plot) +} +``` + +```{r} +lay <- rbind(c(0,0,0,0,1,1,1,1), c(0,0,0,0,1,1,1,1)) +``` + + +#Figure 2 + +```{r} +# Generate Figure +FinalPlot(datafig_2_l, "Share of Immigrants", 0, .40 , .1, datafig_2_r, "Misperception (in % points)", 0, 30) + +# Export +FigureExporter(FinalPlot(datafig_2_l, "Share of Immigrants", 0, .40 , .1, datafig_2_r, "Misperception (in % points)", 0, 30), "Figure_2.png") +``` + + +#Figure 3 Panel A + +```{r} +# Generate Figure +FinalPlot(datafig_3_a_l, "Share of Muslim Immigrants", 0, .55 , .1, datafig_3_a_r, "Misperception (in % points)", 0, 20) + +# Export +FigureExporter(FinalPlot(datafig_3_a_l, "Share of Muslim Immigrants", 0, .55 , .1, datafig_3_a_r, "Misperception (in % points)", 0, 20), "Figure_3_A.png") +``` + +\newpage + + +#Figure 3 Panel B + +```{r} +# Generate Figure +FinalPlot(datafig_3_b_l, "Share of Christian Immigrants", 0, .65 , .1, datafig_3_b_r, "Misperception (in % points)", -30, 0) + +# Export +FigureExporter(FinalPlot(datafig_3_b_l, "Share of Christian Immigrants", 0, .65 , .1, datafig_3_b_r, "Misperception (in % points)", -30, 0), "Figure_3_B.png") +``` + + +#Figure 4 Panel A + +```{r} +# Left Panel + +#Adjust Data +datafig_4_a_l_adj = datafig_4_a_l[datafig_4_a_l$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(datafig_4_a_l) %in% "n")] + +LeftPanelAdjustedData9 = function(data_adj, label, x_lb, x_upb, distance_ticks, + labelActual = "Natives", labelMean = "Immigrants"){ +p <- ggplot(data_adj, aes(x=t)) + + ## Plot segment joining and points + geom_segment(aes(x=t, xend=t, y=lb_perc, yend=ub_perc), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + + geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) + + geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) + + geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + + coord_flip() + +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + + scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) + + theme_light() + + theme( + ## Control grid + panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), + panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), + + ## Control legend + legend.position = "bottom", + legend.box = "horizontal", + legend.justification = c(0.4,0), + legend.title = element_blank(), + text = element_text(family = "LM Roman 10", color='black', size=10), + axis.text = element_text(colour = 'black'), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=15)), + axis.ticks.x = element_blank() + ) + + theme(legend.text=element_text(size=9))+ + scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) + + scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) + + xlab("") + + ylab(label) +p1} +``` + +```{r} +# Rigth Panel + +#Adjust Data +## Load and Clean Data +datafig_4_a_r[is.na(datafig_4_a_r)]<-0 +datafig_4_a_r_adj = datafig_4_a_r +datafig_4_a_r_adj$b <- datafig_4_a_r$bY + datafig_4_a_r$bN +datafig_4_a_r_adj$lb <- datafig_4_a_r$lb_bY + datafig_4_a_r$lb_bN +datafig_4_a_r_adj$ub <- datafig_4_a_r$ub_bY + datafig_4_a_r$ub_bN +datafig_4_a_r_adj$bN <- datafig_4_a_r$bNY + datafig_4_a_r$bNN +datafig_4_a_r_adj$lbN <- datafig_4_a_r$lb_bNY + datafig_4_a_r$lb_bNN +datafig_4_a_r_adj$ubN <- datafig_4_a_r$ub_bNY + datafig_4_a_r$ub_bNN +datafig_4_a_r_adj<- datafig_4_a_r_adj[which(datafig_4_a_r_adj$b!=0), c("t","b", "lb", "ub", "bN", "lbN", "ubN")] + +groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1) +datafig_4_a_r_adj$group <- groups + +mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) +datafig_4_a_r_adj$mylabs <- mylabs + +mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2) +datafig_4_a_r_adj$mylabs1 <- mylabs1 + +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Rich'),'t'] <- 'High Income' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Not Rich'),'t'] <- 'Low Income' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Not College'),'t'] <- 'No College' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing' +datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing' + +#Plot +RightPanel9 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){ +p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) + + geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5, + shape = 18, size = 2) + + geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) + + geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15, + alpha = 0.5, size = 2) + + geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) + + facet_grid(group ~ ., space = 'free_y', scales = "free_y") + + xlim(x_lb,x_upb) + + xlab(label) + + theme_light() + + theme( + axis.line=element_blank(), #Removing the axis + panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'), + panel.grid.major.y = element_blank(), + text = element_text(family = "LM Roman 10", size = 10, colour = "black"), + axis.text = element_text(size = 10, colour = 'black'), + panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs + strip.background = element_blank(), + strip.text.y = element_blank(), + axis.title.y = element_blank(), + ### Add spacing for xlabel + axis.ticks=element_blank(), #Removing the ticks + panel.spacing.y = unit(0, "lines"), + + ## Control legend + legend.position = "bottom", + legend.box = "horizontal", + legend.justification = c(0.85,0), + legend.title = element_blank(), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=11)), + axis.ticks.x = element_blank() + ) + + theme(legend.text=element_text(size=9)) + + scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) + + scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18)) +p2} +``` + +```{r} +# Generate Figure +plot_grid(LeftPanelAdjustedData9(datafig_4_a_l_adj, "Misperception (in % points)", -25, 30 , 5, "Non-immigrants", "Immigrants"), + RightPanel9(datafig_4_a_r_adj, "Misperception (in % points)", -15, 15, "Non-immigrants", "Immigrants"), + labels=NULL, ncol=2, align='h', axis='b') + +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData9(datafig_4_a_l_adj, "Misperception (in % points)", -25, 30 , 5, "Non-immigrants", "Immigrants"), + RightPanel9(datafig_4_a_r_adj, "Misperception (in % points)", -15, 15, "Non-immigrants", "Immigrants"), + labels=NULL, ncol=2, align='h', axis='b'), + "Figure_4_A.png") +``` + + +#Figure 4 Panel B + +```{r} +# Left Panel + +#Adjust Data +datafig_4_b_l_adj = datafig_4_b_l[datafig_4_b_l$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(datafig_4_b_l) %in% "n")] + +LeftPanelAdjustedData9 = function(data_adj, label, x_lb, x_upb, distance_ticks, + labelActual = "Natives", labelMean = "Immigrants"){ +p <- ggplot(data_adj, aes(x=t)) + + ## Plot segment joining and points + geom_segment(aes(x=t, xend=t, y=lb_perc, yend=ub_perc), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + + geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) + + geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) + + geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + + coord_flip() + +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + + scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) + + theme_light() + + theme( + ## Control grid + panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), + panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), + + ## Control legend + legend.position = "bottom", + legend.box = "horizontal", + legend.justification = c(0.4,0), + legend.title = element_blank(), + text = element_text(family = "LM Roman 10", color='black', size=10), + axis.text = element_text(colour = 'black'), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=15)), + axis.ticks.x = element_blank() + ) + + theme(legend.text=element_text(size=9))+ + scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) + + scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) + + xlab("") + + ylab(label) +p1} +``` + +```{r} +# Rigth Panel + +#Adjust Data +## Load and Clean Data +datafig_4_b_r[is.na(datafig_4_b_r)]<-0 +datafig_4_b_r_adj = datafig_4_b_r +datafig_4_b_r_adj$b <- datafig_4_b_r$bY + datafig_4_b_r$bN +datafig_4_b_r_adj$lb <- datafig_4_b_r$lb_bY + datafig_4_b_r$lb_bN +datafig_4_b_r_adj$ub <- datafig_4_b_r$ub_bY + datafig_4_b_r$ub_bN +datafig_4_b_r_adj$bN <- datafig_4_b_r$bNY + datafig_4_b_r$bNN +datafig_4_b_r_adj$lbN <- datafig_4_b_r$lb_bNY + datafig_4_b_r$lb_bNN +datafig_4_b_r_adj$ubN <- datafig_4_b_r$ub_bNY + datafig_4_b_r$ub_bNN +datafig_4_b_r_adj<- datafig_4_b_r_adj[which(datafig_4_b_r_adj$b!=0), c("t","b", "lb", "ub", "bN", "lbN", "ubN")] + +groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1) +datafig_4_b_r_adj$group <- groups + +mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) +datafig_4_b_r_adj$mylabs <- mylabs + +mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2) +datafig_4_b_r_adj$mylabs1 <- mylabs1 + +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Rich'),'t'] <- 'High Income' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Not Rich'),'t'] <- 'Low Income' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Not College'),'t'] <- 'No College' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing' +datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing' + +#Plot +RightPanel9 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){ +p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) + + geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5, + shape = 18, size = 2) + + geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) + + geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15, + alpha = 0.5, size = 2) + + geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) + + facet_grid(group ~ ., space = 'free_y', scales = "free_y") + + xlim(x_lb,x_upb) + + xlab(label) + + theme_light() + + theme( + axis.line=element_blank(), #Removing the axis + panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'), + panel.grid.major.y = element_blank(), + text = element_text(family = "LM Roman 10", size = 10, colour = "black"), + axis.text = element_text(size = 10, colour = 'black'), + panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs + strip.background = element_blank(), + strip.text.y = element_blank(), + axis.title.y = element_blank(), + ### Add spacing for xlabel + axis.ticks=element_blank(), #Removing the ticks + panel.spacing.y = unit(0, "lines"), + + ## Control legend + legend.position = "bottom", + legend.box = "horizontal", + legend.justification = c(0.85,0), + legend.title = element_blank(), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=11)), + axis.ticks.x = element_blank() + ) + + theme(legend.text=element_text(size=9)) + + scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) + + scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18)) +p2} +``` + +```{r} +# Generate Figure +plot_grid(LeftPanelAdjustedData9(datafig_4_b_l_adj, "Misperception (in % points)", 5, 35 , 5, "Non-immigrants", "Immigrants"), + RightPanel9(datafig_4_b_r_adj, "Misperception (in % points)", 0, 35, "Non-immigrants", "Immigrants"), + labels=NULL, ncol=2, align='h', axis='b') + +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData9(datafig_4_b_l_adj, "Misperception (in % points)", 5, 35 , 5, "Non-immigrants", "Immigrants"), + RightPanel9(datafig_4_b_r_adj, "Misperception (in % points)", 0, 35, "Non-immigrants", "Immigrants"), + labels=NULL, ncol=2, align='h', axis='b'), + "Figure_4_B.png") +``` + +\newpage + + +#Figure 5 Panel A + +```{r} +# Data adjustment for Left Panel: no rescaling needed +datafig_5_a_l_adj = DataAdjustNoResc(datafig_5_a_l) + +# Generate Figure +plot_grid(LeftPanelAdjustedData(datafig_5_a_l_adj, "Share of Respondents", 0.1, .5 , .1, + "Alesina et al. (2018)", "Q on Imm."), + RightPanelPercentage(datafig_5_a_r, "Share of Respondents", 0.2, 0.6, 0.1), + labels=NULL, ncol=2, align='h', axis='b') + +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData(datafig_5_a_l_adj, "Share of Respondents", 0.1, .5 , .1, + "Alesina et al. (2018)", "Q on Imm."), + RightPanelPercentage(datafig_5_a_r, "Share of Respondents", 0.2, 0.6, 0.1), + labels=NULL, ncol=2, align='h', axis='b'), "Figure_5_A.png") +``` + + +#Figure 5 Panel B + +```{r} +# Data Adjustment +datafig_5_b_l_adj = DataAdjustNoResc(datafig_5_b_l) + +# Generate Figure +plot_grid(LeftPanelAdjustedData(datafig_5_b_l_adj, "Share of Respondents", 0.15, .8 , .1, + "Alesina et al. (2018)", "Q on Imm."), + RightPanelPercentage(datafig_5_b_r, "Share of Respondents", 0.50, 0.8, 0.05), + labels=NULL, ncol=2, align='h', axis='b') + +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData(datafig_5_b_l_adj, "Share of Respondents", 0.15, .8 , .1, + "Alesina et al. (2018)", "Q on Imm."), + RightPanelPercentage(datafig_5_b_r, "Share of Respondents", 0.50, 0.8, 0.05), + labels=NULL, ncol=2, align='h', axis='b'), "Figure_5_B.png") +``` + + +#Figure 6 Panel A + +```{r} +# Left Panel + +##Data Adjustment (do not consider m_real as missing) +datafig_6_a_l_adj = datafig_6_a_l[datafig_6_a_l$t %in% c("Sweden", "Germany", "Italy", + "France", "UK", "US"), !names(datafig_6_a_l) %in% c("n","m_real")] +datafig_6_a_l_adj$m_perc <- datafig_6_a_l_adj$m_perc +datafig_6_a_l_adj <- transform(datafig_6_a_l_adj, + lbound = lb_perc, + ubound = ub_perc) + +##Graph +LeftPanel_NoActual = function(data_adj, label, xlb, xupb, distance_ticks){ +p <- ggplot(data_adj, aes(x=t)) + + ## Plot segment joining and points + geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + + geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + + coord_flip() + +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + + scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0), + limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) + + theme_light() + + theme( + ## Control grid + panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), + panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), + + ## Control legend + legend.position = "none", + legend.box = "horizontal", + legend.justification = c(0.5,0), + legend.title = element_blank(), + text = element_text(family = "LM Roman 10", color='black', size=10), + axis.text = element_text(colour = 'black'), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=15)), + axis.ticks.x = element_blank()) + + theme(legend.text=element_text(size=9))+ + scale_colour_manual(name = "", labels = 'Perceived (mean)', values =rgb(0.7,0.2,0.1,1)) + + scale_shape_manual(name = "", labels = c('Perceived (mean)'), values = 15) + + xlab("") + + ylab(label) + +p1} +``` + + +```{r} +# Generate Figure +plot_grid(LeftPanel_NoActual(datafig_6_a_l_adj, "Share of Respondents", 0.05, 0.3, 0.05) , + RightPanelPercentage(datafig_6_a_r, "Share of Respondents", 0.05, 0.25, 0.05), + labels=NULL, ncol=2, align='h', axis='b') + +# Export +FigureExporter(plot_grid(LeftPanel_NoActual(datafig_6_a_l_adj, "Share of Respondents", 0.05, 0.3, 0.05) , + RightPanelPercentage(datafig_6_a_r, "Share of Respondents", 0.05, 0.25, 0.05), + labels=NULL, ncol=2, align='h', axis='b'), "Figure_6_A.png") +``` + + +#Figure 6 Panel B + +```{r} +# Left Panel + +##Data Adjustment (do not consider m_real as missing) +datafig_6_b_l_adj = datafig_6_b_l[datafig_6_b_l$t %in% c("Sweden", "Germany", "Italy", + "France", "UK", "US"), !names(datafig_6_b_l) %in% c("n","m_real")] +datafig_6_b_l_adj$m_perc <- datafig_6_b_l_adj$m_perc +datafig_6_b_l_adj <- transform(datafig_6_b_l_adj, + lbound = lb_perc, + ubound = ub_perc) + +##Graph +LeftPanel_NoActual = function(data_adj, label, xlb, xupb, distance_ticks){ +p <- ggplot(data_adj, aes(x=t)) + + ## Plot segment joining and points + geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + + geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + + coord_flip() + +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + + scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0), + limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) + + theme_light() + + theme( + ## Control grid + panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), + panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), + + ## Control legend + legend.position = "none", + legend.box = "horizontal", + legend.justification = c(0.5,0), + legend.title = element_blank(), + text = element_text(family = "LM Roman 10", color='black', size=11), + axis.text = element_text(colour = 'black'), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=15)), + axis.ticks.x = element_blank(), + ) + + theme(legend.text=element_text(size=9))+ + scale_colour_manual(name = "", labels = 'Perceived (mean)', values =rgb(0.7,0.2,0.1,1)) + + scale_shape_manual(name = "", labels = c('Perceived (mean)'), values = 15) + + xlab("") + + ylab(label) + +p1} +``` + +```{r} +# Generate Figure +plot_grid(LeftPanel_NoActual(datafig_6_b_l_adj, "Share of Respondents", 0, 0.4, 0.1) , + RightPanelPercentage(datafig_6_b_r, "Share of Respondents", 0.1, 0.4, 0.05), + labels=NULL, ncol=2, align='h', axis='b') + +# Export +FigureExporter(plot_grid(LeftPanel_NoActual(datafig_6_b_l_adj, "Share of Respondents", 0, 0.4, 0.1) , + RightPanelPercentage(datafig_6_b_r, "Share of Respondents", 0.1, 0.4, 0.05), + labels=NULL, ncol=2, align='h', axis='b'), "Figure_6_B.png") +``` + +\newpage + + +#Figure 7 + +```{r} +# Left Panel + +#Adjust Data +datafig_7_l_adj = datafig_7_l[datafig_7_l$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(datafig_7_l) %in% "n")] + +LeftPanelAdjustedData12 = function(data_adj, label, x_lb, x_upb, distance_ticks, + labelActual = "Natives", labelMean = "Immigrants"){ +p <- ggplot(data_adj, aes(x=t)) + + ## Plot segment joining and points + geom_segment(aes(x=t, xend=t, y=lb_perc, yend=ub_perc), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + + geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) + + geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) + + geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) + + coord_flip() + +## Add theme, labels, and modify scale +myshapes <- c("my_b" = "15", "my_d" = "18") +p1 <- p + + scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) + + theme_light() + + theme( + ## Control grid + panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), + panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), + + ## Control legend + legend.position = "bottom", + legend.box = "horizontal", + legend.justification = c(0.3,0), + legend.title = element_blank(), + text = element_text(family = "LM Roman 10", color='black', size=10), + axis.text = element_text(colour = 'black'), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=15)), + axis.ticks.x = element_blank() + ) + + theme(legend.text=element_text(size=9))+ + scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) + + scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) + + xlab("") + + ylab(label) +p1} +``` + +```{r} +# Rigth Panel + +#Adjust Data +## Load and clean data +datafig_7_r[is.na(datafig_7_r)]<-0 +datafig_7_r_adj = datafig_7_r +datafig_7_r_adj$b <- datafig_7_r$bY + datafig_7_r$bN +datafig_7_r_adj$lb <- datafig_7_r$lb_bY + datafig_7_r$lb_bN +datafig_7_r_adj$ub <- datafig_7_r$ub_bY + datafig_7_r$ub_bN +datafig_7_r_adj$bN <- datafig_7_r$bNY + datafig_7_r$bNN +datafig_7_r_adj$lbN <- datafig_7_r$lb_bNY + datafig_7_r$lb_bNN +datafig_7_r_adj$ubN <- datafig_7_r$ub_bNY + datafig_7_r$ub_bNN +datafig_7_r_adj<- datafig_7_r_adj[which(datafig_7_r_adj$b!=0), c("t","b", "lb", "ub", "bN", "lbN", "ubN")] + +groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1) +datafig_7_r_adj$group <- groups + +mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) +datafig_7_r_adj$mylabs <- mylabs + +mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2) +datafig_7_r_adj$mylabs1 <- mylabs1 + +datafig_7_r_adj[which(datafig_7_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.' +datafig_7_r_adj[which(datafig_7_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College' +datafig_7_r_adj[which(datafig_7_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Rich'),'t'] <- 'High Income' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Not Rich'),'t'] <- 'Low Income' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Not College'),'t'] <- 'No College' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing' +datafig_7_r_adj[which(datafig_7_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing' + +#Plot +RightPanel12 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){ +p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) + + geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5, + shape = 18, size = 2) + + geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) + + geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15, + alpha = 0.5, size = 2) + + geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) + + facet_grid(group ~ ., space = 'free_y', scales = "free_y") + + xlim(x_lb,x_upb) + + xlab(label) + + theme_light() + + theme( + axis.line=element_blank(), #Removing the axis + panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'), + panel.grid.major.y = element_blank(), + text = element_text(family = "LM Roman 10", size = 10, colour = "black"), + axis.text = element_text(size = 9, colour = 'black'), + panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs + strip.background = element_blank(), + axis.text.y = element_text(size=9), + axis.title.y = element_blank(), + ### Add spacing for xlabel + axis.title.x = element_text(size = 9, margin = margin(t=13)), + axis.ticks=element_blank(), #Removing the ticks + panel.spacing.y = unit(0, "lines"), + + ## Control legend + legend.position = "bottom", + legend.box = "horizontal", + legend.justification = c(0.65,0), + #panel.border = element_blank(), + legend.title = element_blank() + ) + + theme(legend.text=element_text(size=9)) + + scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) + + scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18)) +p2} +``` + +```{r} +# Generate Figure +plot_grid(LeftPanelAdjustedData12(datafig_7_l_adj, "Misperception (in % points)", -10, 30 , 10, "Non-immigrants", "Immigrants"), + RightPanel12(datafig_7_r_adj, "Misperception (in % points)", 0, 20, "Non-immigrants", "Immigrants"), + labels=NULL, ncol=2, align='h', axis='b') + +# Export +FigureExporter(plot_grid(LeftPanelAdjustedData12(datafig_7_l_adj, "Misperception (in % points)", -10, 30 , 10, "Non-immigrants", "Immigrants"), + RightPanel12(datafig_7_r_adj, "Misperception (in % points)", 0, 20, "Non-immigrants", "Immigrants"), + labels=NULL, ncol=2, align='h', axis='b'), + "Figure_7.png") +``` \ No newline at end of file diff --git a/37/replication_package/Do/Figures/Fig2to7_9_data.do b/37/replication_package/Do/Figures/Fig2to7_9_data.do new file mode 100644 index 0000000000000000000000000000000000000000..5e2282f87c20d95b98c3d67bfe18e1d88f3a9e59 --- /dev/null +++ b/37/replication_package/Do/Figures/Fig2to7_9_data.do @@ -0,0 +1,2056 @@ +********** +* Immigration and Redistribution +* Alesina, Miano, Stantcheva +* RESTUD + +* This files prepares and exports the data for Figures 2 to 7 and 9 in the folder Out/Figures_data. To produce the final figures the data should be imported in R using the codes Figures2_7.rmd and Figure9.rmd +********** + +clear all + +* Specify directory of the replication package +global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing" +cd "$dir" + +* Declare output sub-directory + +global outdir "Out/Figures_data" + +* Load the data + +use "Data/survey_analysis.dta", clear + +* Countries included in the analysis +global countries "US UK DE FR IT SE" + + +* Generate flags - To ensure answers quality +gen flag_1=0 +gen flag_2=0 + +* Keep only those with flag 1 and flag 2 equal to zero + +bysort country treatment_recod: egen min_duration = pctile(duration), p(2) +bysort country treatment_recod: egen max_duration = pctile(duration), p(98) + +replace flag_1=1 if durationmax_duration + +* Drop respondents in bottom and top 2% of distribution of time spent on the survey +keep if flag_1==0 & flag_2==0 + +*Drop variable used to exclude inattentive respondents +drop flag_1 flag_2 min_duration max_duration + +* Add data on actual natives and immigrants statistics and generate misperceptions * + +do "Do/misperceptions.do" + +* Gen variables to be plotted * + +* Dummy = 1 if Mohammad receives more on net from the state (either receives more transfers and pays same or less taxes or receives same transfers but pays less taxes) +gen moh_more=(Moh_transfers<3 & Moh_tax>2) +replace moh_more=1 if Moh_transfers==3 & Moh_tax>3 +replace moh_more=. if Moh_tax==. | Moh_transfers==. +la var moh_more "Mohammad receives more transfers and/or pays less taxes than John" +label val moh_more binary + +* Transfers +gen imm_tra_twice_more=(transfers_imm==11 |transfers_imm==12 |transfers_imm==13) +la var imm_tra_twice_more "Immigrants receive tiwice as many transfers as natives or more" +replace imm_tra_twice_more=. if transfers_imm==. +label val imm_tra_twice_more binary + +**************** +* Gen additional controls * +**************** + +* Immigrant parent +gen immigrant_parent=(q_parent_same==2) +replace immigrant_parent=. if q_parent_same==. +label var immigrant_parent "Immigrant parent" +label val immigrant_parent binary + + +* Gen Left-right variables * +* Based on vote or voting intentions +gen left=(party_voted==4 | party_voted==5) +replace left=. if party_voted==. | party_voted==6 | party_voted==0 +gen right=(party_voted==1 | party_voted==2) +replace right=. if party_voted==. | party_voted==6 | party_voted==0 +gen center=(party_voted==3) +replace center=. if party_voted==. | party_voted==6 | party_voted==0 + +label var left "Left-wing" +label var right "Right-wing" +label var center "Center" + +foreach i in left right center{ +label val `i' binary +} + +* Young +gen young=(age<45) +label var young "Age 18 to 45" +label val young binary + +* Gender +gen male=(sex==1) +label var male "Male" +label val male binary + +* Top income +gen top_income=0 +foreach x in $countries{ +su household_income if country=="`x'", d +replace top_income=1 if household_income>r(p75) & country=="`x'" +} +label var top_income "High Income" +label val top_income binary + +* Sector dummy +label var sector_dummy "High intensity sector" + + +* Gen variables for high immigration sectors, with low/high educ +gen sector_dummy_h=sector_dummy*university_degree +gen sector_dummy_l=sector_dummy*(1-university_degree) + + +********************** +* Keep only control group * + +keep if control==1 + +********************* + +* Gen group variables + +gen var_1= left +gen var_2= male +gen var_3= young +gen var_4= immigrant_parent +gen var_5= top_income +gen var_6= university_degree +gen var_7= sector_dummy_h +gen var_8= sector_dummy_l + + +************************ +* Figure 2 - Share of immigrants +************************ + +* Misperception by group + +**** Share of immigrants * +global vars mis_share_foreign +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "High Income" 10 "Low Income" 11 "College" 12 "No College" 13 "H.Imm. S.&No Coll." 14 "H. Imm. S.&Coll." 15 "Not H. Imm. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen ub_bY = . + gen lb_bY = . + gen bN = . + gen ub_bN = . + gen lb_bN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + export delimited "$outdir/figure_2_r_data.csv", replace + + restore + + +*** Perceptions by country *** + +gen var_perc = perc_share_foreign + +gen var_real = share_foreign + + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +ci means var_real if country=="`x'", level(95) +local m_real`x' = r(mean) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_real = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + replace m_real=`m_real`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + export delimited "$outdir/figure_2_l_data.csv", replace + +restore + +drop var_perc var_real + +************************ +* Figure 3, Panel A -- Share of Muslim immigrants +************************ + +**** Share of muslim +global vars mis_share_mu +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "Rich" 10 "Not Rich" 11 "College" 12 "Not College" 13 "H.Sect.&L.Ed" 14 "H.Sect.&H.Ed" 15 "No H. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen ub_bY = . + gen lb_bY = . + gen bN = . + gen ub_bN = . + gen lb_bN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + export delimited "$outdir/figure_3_a_r_data.csv", replace + + restore + +** By Country ** + +gen var_perc = perc_share_mu + +gen var_real = share_muslim + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +ci means var_real if country=="`x'", level(95) +local m_real`x' = r(mean) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_real = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + replace m_real=`m_real`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + export delimited "$outdir/figure_3_a_l_data.csv", replace + +restore + +drop var_perc var_real + + +************************ +* Figure 3, Panel B -- Share of Christian immigrants +************************ + + +* Misperception by group + +**** Share of christian * +global vars mis_share_ch +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "Rich" 10 "Not Rich" 11 "College" 12 "Not College" 13 "H.Sect.&L.Ed" 14 "H.Sect.&H.Ed" 15 "No H. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen ub_bY = . + gen lb_bY = . + gen bN = . + gen ub_bN = . + gen lb_bN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + export delimited "$outdir/figure_3_b_r_data.csv", replace + + restore + + + +*** By country + +gen var_perc = perc_share_ch + +gen var_real = share_christian + + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +ci means var_real if country=="`x'", level(95) +local m_real`x' = r(mean) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_real = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + replace m_real=`m_real`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + export delimited "$outdir/figure_3_b_l_data.csv", replace + +restore + +drop var_perc var_real + +************************* +* Figure 4, Immigrants' and natives' economic circumstances +* Panel A -- Share of High Educated +*********************** + + +* By group * + +global vars mis_higheduc_imm +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +qui su `var' if var_`q'==1, detail +local b2Y_`q' = r(p50) +local ub2_bY_`q' = r(p75) +local lb2_bY_`q' = r(p25) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +qui su `var' if var_`q'==0, detail +local b2N_`q' = r(p50) +local ub2_bN_`q' = r(p75) +local lb2_bN_`q' = r(p25) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +qui su `var' if var_1==1 & center!=1, detail +local b2Y_1 = r(p50) +local ub2_bY_1 = r(p75) +local lb2_bY_1 = r(p25) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) +qui su `var' if var_1==0 & center!=1, detail +local b2N_1 = r(p50) +local ub2_bN_1 = r(p75) +local lb2_bN_1 = r(p25) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +qui su `var' if sector_dummy==0 , detail +local b2N_7 = r(p50) +local b2N_8 = r(p50) +local ub2_bN_7 = r(p75) +local lb2_bN_7 = r(p25) +local ub2_bN_8 = r(p75) +local lb2_bN_8 = r(p25) +} + +global vars mis_higheduc_nat +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bNY_`q' = r(mean) +local ub_bNY_`q' = r(ub) +local lb_bNY_`q' = r(lb) +qui su `var' if var_`q'==1, detail +local b2NY_`q' = r(p50) +local ub2_bNY_`q' = r(p75) +local lb2_bNY_`q' = r(p25) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bNN_`q' = r(mean) +local ub_bNN_`q' = r(ub) +local lb_bNN_`q' = r(lb) +qui su `var' if var_`q'==0, detail +local b2NN_`q' = r(p50) +local ub2_bNN_`q' = r(p75) +local lb2_bNN_`q' = r(p25) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bNY_1 = r(mean) +local ub_bNY_1 = r(ub) +local lb_bNY_1 = r(lb) +qui su `var' if var_1==1 & center!=1, detail +local b2NY_1 = r(p50) +local ub2_bNY_1 = r(p75) +local lb2_bNY_1 = r(p25) +ci means `var' if var_1==0 & center!=1, level(95) +local bNN_1 = r(mean) +local ub_bNN_1 = r(ub) +local lb_bNN_1 = r(lb) +qui su `var' if var_1==0 & center!=1, detail +local b2NN_1 = r(p50) +local ub2_bNN_1 = r(p75) +local lb2_bNN_1 = r(p25) + +ci means `var' if sector_dummy==0 , level(95) +local bNN_7 = r(mean) +local ub_bNN_7 = r(ub) +local lb_bNN_7 = r(lb) +local bNN_8 = r(mean) +local ub_bNN_8 = r(ub) +local lb_bNN_8 = r(lb) +qui su `var' if sector_dummy==0 , detail +local b2NN_7 = r(p50) +local b2NN_8 = r(p50) +local ub2_bNN_7 = r(p75) +local lb2_bNN_7 = r(p25) +local ub2_bNN_8 = r(p75) +local lb2_bNN_8 = r(p25) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "Rich" 10 "Not Rich" 11 "College" 12 "Not College" 13 "H.Sect.&L.Ed" 14 "H.Sect.&H.Ed" 15 "No H. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen bNY = . + gen ub_bY = . + gen lb_bY = . + gen ub_bNY = . + gen lb_bNY = . + gen bN = . + gen bNN = . + gen ub_bN = . + gen lb_bN = . + gen ub_bNN = . + gen lb_bNN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 3 + forvalues i=1(1)6 { + replace bNY=`bNY_`i'' if n==`q' + replace ub_bNY=`ub_bNY_`i'' if n==`q' + replace lb_bNY=`lb_bNY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bNN=`bNN_`i'' if n==`q' + replace ub_bNN=`ub_bNN_`i'' if n==`q' + replace lb_bNN=`lb_bNN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + replace bNY=`bNY_8' if n==39 + replace ub_bNY=`ub_bNY_8' if n==39 + replace lb_bNY=`lb_bNY_8' if n==39 + + replace bNN=`bNY_7' if n==42 + replace ub_bNN=`ub_bNY_7' if n==42 + replace lb_bNN=`lb_bNY_7' if n==42 + + replace bNN=`bNN_7' if n==45 + replace ub_bNN=`ub_bNN_7' if n==45 + replace lb_bNN=`lb_bNN_7' if n==45 + + export delimited "$outdir/figure_4_a_r_data.csv", replace + +restore + + +*** Perceptions by country *** + +gen var_perc = mis_higheduc_imm + +gen var_nat = mis_higheduc_nat + + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +ci means var_nat if country=="`x'", level(95) +local m_nat`x' = r(mean) +local lb_nat`x' = r(lb) +local ub_nat`x' = r(ub) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_nat = . + gen lb_nat = . + gen ub_nat = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + replace m_nat=`m_nat`x'' if n==`q' + replace lb_nat=`lb_nat`x'' if n==`q' + replace ub_nat=`ub_nat`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + export delimited "$outdir/figure_4_a_l_data.csv", replace + +restore + +drop var_perc var_nat + + +************************* +* Figure 4, Panel B -- Unemployment +*********************** + + + +global vars mis_unemp_imm +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +qui su `var' if var_`q'==1, detail +local b2Y_`q' = r(p50) +local ub2_bY_`q' = r(p75) +local lb2_bY_`q' = r(p25) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +qui su `var' if var_`q'==0, detail +local b2N_`q' = r(p50) +local ub2_bN_`q' = r(p75) +local lb2_bN_`q' = r(p25) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +qui su `var' if var_1==1 & center!=1, detail +local b2Y_1 = r(p50) +local ub2_bY_1 = r(p75) +local lb2_bY_1 = r(p25) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) +qui su `var' if var_1==0 & center!=1, detail +local b2N_1 = r(p50) +local ub2_bN_1 = r(p75) +local lb2_bN_1 = r(p25) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +qui su `var' if sector_dummy==0 , detail +local b2N_7 = r(p50) +local b2N_8 = r(p50) +local ub2_bN_7 = r(p75) +local lb2_bN_7 = r(p25) +local ub2_bN_8 = r(p75) +local lb2_bN_8 = r(p25) +} + +global vars mis_unemp_nat +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bNY_`q' = r(mean) +local ub_bNY_`q' = r(ub) +local lb_bNY_`q' = r(lb) +qui su `var' if var_`q'==1, detail +local b2NY_`q' = r(p50) +local ub2_bNY_`q' = r(p75) +local lb2_bNY_`q' = r(p25) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bNN_`q' = r(mean) +local ub_bNN_`q' = r(ub) +local lb_bNN_`q' = r(lb) +qui su `var' if var_`q'==0, detail +local b2NN_`q' = r(p50) +local ub2_bNN_`q' = r(p75) +local lb2_bNN_`q' = r(p25) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bNY_1 = r(mean) +local ub_bNY_1 = r(ub) +local lb_bNY_1 = r(lb) +qui su `var' if var_1==1 & center!=1, detail +local b2NY_1 = r(p50) +local ub2_bNY_1 = r(p75) +local lb2_bNY_1 = r(p25) +ci means `var' if var_1==0 & center!=1, level(95) +local bNN_1 = r(mean) +local ub_bNN_1 = r(ub) +local lb_bNN_1 = r(lb) +qui su `var' if var_1==0 & center!=1, detail +local b2NN_1 = r(p50) +local ub2_bNN_1 = r(p75) +local lb2_bNN_1 = r(p25) + +ci means `var' if sector_dummy==0 , level(95) +local bNN_7 = r(mean) +local ub_bNN_7 = r(ub) +local lb_bNN_7 = r(lb) +local bNN_8 = r(mean) +local ub_bNN_8 = r(ub) +local lb_bNN_8 = r(lb) +qui su `var' if sector_dummy==0 , detail +local b2NN_7 = r(p50) +local b2NN_8 = r(p50) +local ub2_bNN_7 = r(p75) +local lb2_bNN_7 = r(p25) +local ub2_bNN_8 = r(p75) +local lb2_bNN_8 = r(p25) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "Rich" 10 "Not Rich" 11 "College" 12 "Not College" 13 "H.Sect.&L.Ed" 14 "H.Sect.&H.Ed" 15 "No H. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen bNY = . + gen ub_bY = . + gen lb_bY = . + gen ub_bNY = . + gen lb_bNY = . + gen bN = . + gen bNN = . + gen ub_bN = . + gen lb_bN = . + gen ub_bNN = . + gen lb_bNN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 3 + forvalues i=1(1)6 { + replace bNY=`bNY_`i'' if n==`q' + replace ub_bNY=`ub_bNY_`i'' if n==`q' + replace lb_bNY=`lb_bNY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bNN=`bNN_`i'' if n==`q' + replace ub_bNN=`ub_bNN_`i'' if n==`q' + replace lb_bNN=`lb_bNN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + replace bNY=`bNY_8' if n==39 + replace ub_bNY=`ub_bNY_8' if n==39 + replace lb_bNY=`lb_bNY_8' if n==39 + + replace bNN=`bNY_7' if n==42 + replace ub_bNN=`ub_bNY_7' if n==42 + replace lb_bNN=`lb_bNY_7' if n==42 + + replace bNN=`bNN_7' if n==45 + replace ub_bNN=`ub_bNN_7' if n==45 + replace lb_bNN=`lb_bNN_7' if n==45 + + export delimited "$outdir/figure_4_b_r_data.csv", replace + +restore + +*** Perceptions by country *** + +gen var_perc = mis_unemp_imm + +gen var_nat = mis_unemp_nat + + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +ci means var_nat if country=="`x'", level(95) +local m_nat`x' = r(mean) +local lb_nat`x' = r(lb) +local ub_nat`x' = r(ub) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_nat = . + gen lb_nat = . + gen ub_nat = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + replace m_nat=`m_nat`x'' if n==`q' + replace lb_nat=`lb_nat`x'' if n==`q' + replace ub_nat=`ub_nat`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + export delimited "$outdir/figure_4_b_l_data.csv", replace + +restore + +drop var_perc var_nat + +************************ +* Figure 5, Immigrants' Work Effort +* Panel A -- Effort - Poor +************************ + +* By group * + +* Lack of Effort reason poor * +global vars effort_poor +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "Rich" 10 "Not Rich" 11 "College" 12 "Not College" 13 "H.Sect.&L.Ed" 14 "H.Sect.&H.Ed" 15 "No H. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen ub_bY = . + gen lb_bY = . + gen bN = . + gen ub_bN = . + gen lb_bN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + export delimited "$outdir/figure_5_a_r_data.csv", replace + + + restore + +* By country * + +gen var_perc = effort_poor + + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +*ci means var_real if country=="`x'", level(95) +*local m_real`x' = r(mean) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_real = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + *replace m_real=`m_real`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + * Add averages from Alesina, Stantcheva and Teso (2018) + replace m_real=0.458694398 if n==30 + replace m_real=0.366271406 if n==25 + replace m_real=0.234680578 if n==20 + replace m_real=0.137414962 if n==15 + replace m_real=0.323788553 if n==5 + + export delimited "$outdir/figure_5_a_l_data.csv", replace + +restore + +drop var_perc + +************************* +* Figure 5, Panel B -- Effort - Rich +********************* + +* By group + +**** Effort reason rich * +global vars effort_rich +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "Rich" 10 "Not Rich" 11 "College" 12 "Not College" 13 "H.Sect.&L.Ed" 14 "H.Sect.&H.Ed" 15 "No H. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen ub_bY = . + gen lb_bY = . + gen bN = . + gen ub_bN = . + gen lb_bN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + export delimited "$outdir/figure_5_b_r_data.csv", replace + + restore + + +* By country + +gen var_perc = effort_rich + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +*ci means var_real if country=="`x'", level(95) +*local m_real`x' = r(mean) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_real = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + *replace m_real=`m_real`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + *US + replace m_real=0.391681105 if n==30 + *UK + replace m_real=0.312252969 if n==25 + *FR + replace m_real=0.305084735 if n==20 + *IT + replace m_real=0.16870749 if n==15 + *SE + replace m_real=0.383259922 if n==5 + + + export delimited "$outdir/figure_5_b_l_data.csv", replace +restore + +drop var_perc + + +************************ +* Figure 6, Are Immigrants The Beneficiaries of Redistribution? +* Panel A -- An immigtant gets twice as much as a native +************************ + +**** Immigrants get twice as much as natives or more * + +* By group + +global vars imm_tra_twice_more +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "Rich" 10 "Not Rich" 11 "College" 12 "Not College" 13 "H.Sect.&L.Ed" 14 "H.Sect.&H.Ed" 15 "No H. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen ub_bY = . + gen lb_bY = . + gen bN = . + gen ub_bN = . + gen lb_bN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + export delimited "$outdir/figure_6_a_r_data.csv", replace + + restore + +* By country + +gen var_perc = imm_tra_twice_more + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +*ci means var_real if country=="`x'", level(95) +*local m_real`x' = r(mean) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_real = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + *replace m_real=`m_real`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + export delimited "$outdir/figure_6_a_l_data.csv", replace + +restore + +drop var_perc + + +************************ +* Figure 6, Panel B -- Conditional Transfers (Mohammad vs. John) +************************ + +**** Mohammad question * + +* By group + +global vars moh_more +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "Rich" 10 "Not Rich" 11 "College" 12 "Not College" 13 "H.Sect.&L.Ed" 14 "H.Sect.&H.Ed" 15 "No H. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen ub_bY = . + gen lb_bY = . + gen bN = . + gen ub_bN = . + gen lb_bN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + export delimited "$outdir/figure_6_b_r_data.csv", replace + + restore + +* By country * + +gen var_perc = moh_more + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +*ci means var_real if country=="`x'", level(95) +*local m_real`x' = r(mean) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_real = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + *replace m_real=`m_real`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + export delimited "$outdir/figure_6_b_l_data.csv", replace + +restore + +drop var_perc + +************************ +* Figure 7 -- Poverty +************************ + +* By group * + +global vars mis_poverty_imm +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bY_`q' = r(mean) +local ub_bY_`q' = r(ub) +local lb_bY_`q' = r(lb) +qui su `var' if var_`q'==1, detail +local b2Y_`q' = r(p50) +local ub2_bY_`q' = r(p75) +local lb2_bY_`q' = r(p25) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bN_`q' = r(mean) +local ub_bN_`q' = r(ub) +local lb_bN_`q' = r(lb) +qui su `var' if var_`q'==0, detail +local b2N_`q' = r(p50) +local ub2_bN_`q' = r(p75) +local lb2_bN_`q' = r(p25) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bY_1 = r(mean) +local ub_bY_1 = r(ub) +local lb_bY_1 = r(lb) +qui su `var' if var_1==1 & center!=1, detail +local b2Y_1 = r(p50) +local ub2_bY_1 = r(p75) +local lb2_bY_1 = r(p25) +ci means `var' if var_1==0 & center!=1, level(95) +local bN_1 = r(mean) +local ub_bN_1 = r(ub) +local lb_bN_1 = r(lb) +qui su `var' if var_1==0 & center!=1, detail +local b2N_1 = r(p50) +local ub2_bN_1 = r(p75) +local lb2_bN_1 = r(p25) + +ci means `var' if sector_dummy==0 , level(95) +local bN_7 = r(mean) +local ub_bN_7 = r(ub) +local lb_bN_7 = r(lb) +local bN_8 = r(mean) +local ub_bN_8 = r(ub) +local lb_bN_8 = r(lb) +qui su `var' if sector_dummy==0 , detail +local b2N_7 = r(p50) +local b2N_8 = r(p50) +local ub2_bN_7 = r(p75) +local lb2_bN_7 = r(p25) +local ub2_bN_8 = r(p75) +local lb2_bN_8 = r(p25) +} + +global vars mis_poverty_nat +foreach var in $vars{ +forvalues q=2(1)8 { +ci means `var' if var_`q'==1, level(95) +local bNY_`q' = r(mean) +local ub_bNY_`q' = r(ub) +local lb_bNY_`q' = r(lb) +qui su `var' if var_`q'==1, detail +local b2NY_`q' = r(p50) +local ub2_bNY_`q' = r(p75) +local lb2_bNY_`q' = r(p25) +} +forvalues q=2(1)8 { +ci means `var' if var_`q'==0, level(95) +local bNN_`q' = r(mean) +local ub_bNN_`q' = r(ub) +local lb_bNN_`q' = r(lb) +qui su `var' if var_`q'==0, detail +local b2NN_`q' = r(p50) +local ub2_bNN_`q' = r(p75) +local lb2_bNN_`q' = r(p25) +} +ci means `var' if var_1==1 & center!=1, level(95) +local bNY_1 = r(mean) +local ub_bNY_1 = r(ub) +local lb_bNY_1 = r(lb) +qui su `var' if var_1==1 & center!=1, detail +local b2NY_1 = r(p50) +local ub2_bNY_1 = r(p75) +local lb2_bNY_1 = r(p25) +ci means `var' if var_1==0 & center!=1, level(95) +local bNN_1 = r(mean) +local ub_bNN_1 = r(ub) +local lb_bNN_1 = r(lb) +qui su `var' if var_1==0 & center!=1, detail +local b2NN_1 = r(p50) +local ub2_bNN_1 = r(p75) +local lb2_bNN_1 = r(p25) + +ci means `var' if sector_dummy==0 , level(95) +local bNN_7 = r(mean) +local ub_bNN_7 = r(ub) +local lb_bNN_7 = r(lb) +local bNN_8 = r(mean) +local ub_bNN_8 = r(ub) +local lb_bNN_8 = r(lb) +qui su `var' if sector_dummy==0 , detail +local b2NN_7 = r(p50) +local b2NN_8 = r(p50) +local ub2_bNN_7 = r(p75) +local lb2_bNN_7 = r(p25) +local ub2_bNN_8 = r(p75) +local lb2_bNN_8 = r(p25) +} +preserve + clear + set obs 46 + egen t = seq() + label define quintile 1 "Left-Wing" 2 "Right-Wing" 3 "Male" 4 "Female" 5 "Age 18-45" 6 "Age 46-69" 7 "Imm. Parent" 8 "No Imm. Parent" 9 "Rich" 10 "Not Rich" 11 "College" 12 "Not College" 13 "H.Sect.&L.Ed" 14 "H.Sect.&H.Ed" 15 "No H. Sect." + label values t quintile + replace t=t/3 + + gen bY = . + gen bNY = . + gen ub_bY = . + gen lb_bY = . + gen ub_bNY = . + gen lb_bNY = . + gen bN = . + gen bNN = . + gen ub_bN = . + gen lb_bN = . + gen ub_bNN = . + gen lb_bNN = . + gen n=_n + + + local q = 3 + forvalues i=1(1)6 { + replace bY=`bY_`i'' if n==`q' + replace ub_bY=`ub_bY_`i'' if n==`q' + replace lb_bY=`lb_bY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 3 + forvalues i=1(1)6 { + replace bNY=`bNY_`i'' if n==`q' + replace ub_bNY=`ub_bNY_`i'' if n==`q' + replace lb_bNY=`lb_bNY_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bN=`bN_`i'' if n==`q' + replace ub_bN=`ub_bN_`i'' if n==`q' + replace lb_bN=`lb_bN_`i'' if n==`q' + local q = `q' + 6 + } + + local q = 6 + forvalues i=1(1)6 { + replace bNN=`bNN_`i'' if n==`q' + replace ub_bNN=`ub_bNN_`i'' if n==`q' + replace lb_bNN=`lb_bNN_`i'' if n==`q' + local q = `q' + 6 + } + + + replace bY=`bY_8' if n==39 + replace ub_bY=`ub_bY_8' if n==39 + replace lb_bY=`lb_bY_8' if n==39 + + replace bN=`bY_7' if n==42 + replace ub_bN=`ub_bY_7' if n==42 + replace lb_bN=`lb_bY_7' if n==42 + + replace bN=`bN_7' if n==45 + replace ub_bN=`ub_bN_7' if n==45 + replace lb_bN=`lb_bN_7' if n==45 + + replace bNY=`bNY_8' if n==39 + replace ub_bNY=`ub_bNY_8' if n==39 + replace lb_bNY=`lb_bNY_8' if n==39 + + replace bNN=`bNY_7' if n==42 + replace ub_bNN=`ub_bNY_7' if n==42 + replace lb_bNN=`lb_bNY_7' if n==42 + + replace bNN=`bNN_7' if n==45 + replace ub_bNN=`ub_bNN_7' if n==45 + replace lb_bNN=`lb_bNN_7' if n==45 + + export delimited "$outdir/figure_7_r_data.csv", replace + +restore + +* By country * + +gen var_perc = mis_poverty_imm + +gen var_nat = mis_poverty_nat + + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +ci means var_nat if country=="`x'", level(95) +local m_nat`x' = r(mean) +local lb_nat`x' = r(lb) +local ub_nat`x' = r(ub) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_nat = . + gen lb_nat = . + gen ub_nat = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + replace m_nat=`m_nat`x'' if n==`q' + replace lb_nat=`lb_nat`x'' if n==`q' + replace ub_nat=`ub_nat`x'' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + export delimited "$outdir/figure_7_l_data.csv", replace + +restore + +drop var_perc var_nat + + +******************** +* Figure 9 - Share of first and second gen immigrants +******************* + + +* By Country graph + +gen var_perc = perc_share_foreign + +gen var_real = share_foreign + +gen var_real_2 = share_foreign2 + + + +*** Means of variables *** +foreach x in US UK IT FR SE DE { +ci means var_perc if country=="`x'", level(95) +*storing mean and confidence interval for perceived data +local m_perc`x' = r(mean) +local lb_perc`x' = r(lb) +local ub_perc`x' = r(ub) +ci means var_real if country=="`x'", level(95) +local m_real`x' = r(mean) +ci means var_real_2 if country=="`x'", level(95) +local m_real`x'_2 = r(mean) +qui su var_perc if country=="`x'", detail +local md_perc`x' = r(p50) +local p25`x' = r(p25) +local p75`x' = r(p75) +} + + +preserve + clear + set obs 31 + egen t = seq() + label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US" + label values t var + replace t=t/5 + + gen m_perc = . + gen md_perc = . + gen lb_perc = . + gen ub_perc = . + gen m_real = . + gen m_real_2 = . + gen p25 = . + gen p75 = . + + gen n=_n + + local q = 5 + foreach x in SE DE IT FR UK US { + replace m_perc=`m_perc`x'' if n==`q' + replace md_perc=`md_perc`x'' if n==`q' + replace lb_perc=`lb_perc`x'' if n==`q' + replace ub_perc=`ub_perc`x'' if n==`q' + replace m_real=`m_real`x'' if n==`q' + replace m_real_2=`m_real`x'_2' if n==`q' + replace p25=`p25`x'' if n==`q' + replace p75=`p75`x'' if n==`q' + local q = `q' + 5 + } + + + export delimited "$outdir/figure_9_data.csv", replace + + + + +restore + +drop var_perc var_real var_real_2 + diff --git a/37/replication_package/Do/Figures/Fig8.do b/37/replication_package/Do/Figures/Fig8.do new file mode 100644 index 0000000000000000000000000000000000000000..f8ff4e0cb417861aec037cb00d6ca77c3a7896e9 --- /dev/null +++ b/37/replication_package/Do/Figures/Fig8.do @@ -0,0 +1,244 @@ +********** +* Immigration and Redistribution +* Alesina, Miano, Stantcheva +* RESTUD + +* Figure 8 +********** + +clear all + +* Specify directory of the replication package +global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing" +cd "$dir" + +* Declare output sub-directory + +global outdir "Out/Figures" + +* Load the data +use "Data/survey_analysis.dta", clear + +* Countries included in the analysis +global countries "US UK DE FR IT SE" + +* Generate flags - To ensure answers quality +gen flag_1=0 +gen flag_2=0 + +bysort country treatment_recod: egen min_duration = pctile(duration), p(2) +bysort country treatment_recod: egen max_duration = pctile(duration), p(98) + +replace flag_1=1 if durationmax_duration + +* Drop respondents in bottom and top 2% of distribution of time spent on the survey +keep if flag_1==0 & flag_2==0 + +*Drop variable used to exclude inattentive respondents +drop flag_1 flag_2 min_duration max_duration + +* Gen dummies for Categorical variables + +* Immigration is not a problem +gen imm_not_problem=(q_imm_problem==16 | q_imm_problem==17) +replace imm_not_problem=. if q_imm_problem==. +la var imm_not_problem "The current number of immigrants is not a problem" + +* When should immigrants be entitled to get benefits? +gen imm_benefits_soon=(q_imm_benefits==1 | q_imm_benefits==2 | q_imm_benefits==4) +replace imm_benefits_soon=. if q_imm_benefits==. +la var imm_benefits_soon "Immigrants should get benefits in less than 3 years" + +* When should immigrants be allowed to apply for citizenship? +gen imm_citizenship_soon=(q_imm_citizenship==1 | q_imm_citizenship==2) +replace imm_citizenship_soon=. if q_imm_citizenship==. +la var imm_citizenship_soon "Immigrants should get citizenship in 2 or 5 years" + +* When would you consider an immigrant "Truly American"? +gen trully_american_cit=(q_imm_american==7 | q_imm_american==1 | q_imm_american==4) +replace trully_american_cit=. if q_imm_american==. +la var trully_american_cit "Consider American at citizenship or sooner" + +* Government should care about everyone +gen govt_everyone=(q_govt_imm==7 | q_govt_imm==6) +replace govt_everyone=. if q_govt_imm==. +la var govt_everyone "The government should care equally about everyone" + + +**************** +* Gen controls * +**************** + + +* Gen Left-right variables +* Based on vote or voting intensions +gen left=(party_voted==4 | party_voted==5) +replace left=. if party_voted==. | party_voted==6 | party_voted==0 +gen right=(party_voted==1 | party_voted==2) +replace right=. if party_voted==. | party_voted==6 | party_voted==0 +gen center=(party_voted==3) +replace center=. if party_voted==. | party_voted==6 | party_voted==0 + +label var left "Left-wing" +label var right "Right-wing" +label var center "Center" + +foreach i in left right center{ +label val `i' binary +} + + +* Gen variables for HI sectors, with low/high educ +gen sector_dummy_h=sector_dummy*university_degree +gen sector_dummy_l=sector_dummy*(1-university_degree) + + +*Young +gen young=(age<45) + + +gen US=(country=="US") +gen UK=(country=="UK") +gen IT=(country=="IT") +gen SE=(country=="SE") +gen DE=(country=="DE") +gen FR=(country=="FR") + + + +* Keep control group only +**************** +keep if control==1 +**************** + + +* Declare variables to be included in the graph + +global imm_vars imm_not_problem imm_benefits_soon imm_citizenship_soon /// + trully_american_cit govt_everyone + + + +********** BY COUNTRY ********** + +*** Means of variables *** +foreach x in US UK FR IT DE SE { +foreach y in $imm_vars { +su `y' if country=="`x'" +local m`y'`x' = r(mean) +} +} + + +preserve + clear + set obs 26 + egen t = seq() + label define var 5 "Govt. should care about everyone" 4 "American upon citiz. or before" 3 "Imm. allowed to get citiz. soon" /// + 2 "Imm. should get benefits soon" 1 "Imm. not a problem" + label values t var + replace t=t/5 + + + gen m_US = . + gen m_UK = . + gen m_FR = . + gen m_IT = . + gen m_DE = . + gen m_SE = . + + gen n=_n + foreach x in US UK FR IT DE SE { + replace m_`x'=`mgovt_everyone`x'' if n==25 + replace m_`x'=`mtrully_american_cit`x'' if n==20 + replace m_`x'=`mimm_citizenship_soon`x'' if n==15 + replace m_`x'=`mimm_benefits_soon`x'' if n==10 + replace m_`x'=`mimm_not_problem`x'' if n==5 + } + + + + twoway (scatter t m_US, mcolor(red) msize(large) lcolor(midblue) lpattern(solid) msymbol(D)) /// + (scatter t m_UK, mcolor(blue) msize(large) lcolor(red) lpattern(solid) msymbol(O)) /// + (scatter t m_FR, mcolor(dkgreen) msize(large) lcolor(red) lpattern(solid) msymbol(S)) /// + (scatter t m_IT, mcolor(orange) msize(large) lcolor(red) lpattern(solid) msymbol(T)) /// + (scatter t m_DE, mcolor(balck) msize(large) lcolor(red) lpattern(solid) msymbol(C)) /// + (scatter t m_SE, mcolor(purple) msize(vlarge) lcolor(midblue) lpattern(solid) msymbol(X)), /// + ytitle("") ylabel(1 2 3 4 5, value labsize(medium) angle(0) glcolor(gs16) noticks) /// + legend(order(1 2 3 4 5 6) cols(3) label(1 "US") label(2 "UK") label(3 "France") label(4 "Italy") label(5 "Germany") label(6 "Sweden") size(2.3)) /// + xtitle("Share Answering Yes") /// + yline(1, lcolor(gs14) lpattern("-")) yline(2, lcolor(gs14) lpattern("-")) /// + yline(3, lcolor(gs14) lpattern("-")) yline(4, lcolor(gs14) lpattern("-")) /// + yline(5, lcolor(gs14) lpattern("-")) /// + graphregion(color(white)) plotregion(color(white)) + graph export "$outdir/Figure_8_A.eps", as(eps) replace + +restore + + +********** BY CORE CHARACTERISTICS ********** + +gen var_1 = left +gen var_2 = right +gen var_3 = university_degree +gen var_4 = (1-university_degree) +gen var_5 = sector_dummy_l +gen var_6 = sector_dummy_h +gen var_7 = (1-sector_dummy) + +*** Means of variables *** +forval i=1(1)7 { +foreach y in $imm_vars { +su `y' if var_`i'==1 +local `y'_m`i' = r(mean) +} +} + + +preserve + clear + set obs 26 + egen t = seq() + label define var 5 "Govt. should care about everyone" 4 "American upon citiz. or before" 3 "Imm. allowed to get citiz. soon" /// + 2 "Imm. should get benefits soon" 1 "Imm. not a problem" + label values t var + replace t=t/5 + + forval i=1(1)7{ + gen m_`i' = . + } + + *label define var 1 "" 2 "" 3 "" 4 "" 5 "" + + gen n=_n + + forval i=1(1)7 { + replace m_`i'=`govt_everyone_m`i'' if n==25 + replace m_`i'=`trully_american_cit_m`i'' if n==20 + replace m_`i'=`imm_citizenship_soon_m`i'' if n==15 + replace m_`i'=`imm_benefits_soon_m`i'' if n==10 + replace m_`i'=`imm_not_problem_m`i'' if n==5 + } + + + + twoway (scatter t m_1, mcolor(eltblue) msize(large) lcolor(eltblue) lpattern(solid) msymbol(S)) /// + (scatter t m_2, mcolor(maroon) msize(large) lcolor(maroon) lpattern(solid) msymbol(D)) /// + (scatter t m_3, mcolor(dkgreen) msize(large) lcolor(dkgreen) lpattern(solid) msymbol(C)) /// + (scatter t m_4, mcolor(yellow*1.3) msize(large) lcolor(yellow*1.3) lpattern(solid) msymbol(T)) /// + (scatter t m_5, mcolor(orange) msize(vlarge) lcolor(orange) lpattern(solid) msymbol(+) mlwidth(medthick)) /// + (scatter t m_6, mcolor(black) msize(huge) lcolor(black) lpattern(solid) msymbol(X) mlwidth(medthick)) /// + (scatter t m_7, mcolor(navy) msize(vlarge) lcolor(navy) lpattern(solid) msymbol(pipe) mlwidth(medthick)) , /// + ytitle("") ylabel(1 2 3 4 5, value labsize(medium) angle(0) glcolor(gs16) noticks) /// + legend(order(1 2 3 4 5 6 7) cols(3) label(1 "Left-Wing") label(2 "Right-Wing") label(3 "College") label(4 "No College") label(5 "H Imm, No college") label(6 "H Imm, College") label(7 "No H Imm") size(2.2)) /// + xtitle("Share Answering Yes") xlabel(0(0.2)1) /// + yline(1, lcolor(gs14) lpattern("-")) yline(2, lcolor(gs14) lpattern("-")) /// + yline(3, lcolor(gs14) lpattern("-")) yline(4, lcolor(gs14) lpattern("-")) /// + yline(5, lcolor(gs14) lpattern("-")) /// + xlabel(0.1(0.2)0.7) /// + graphregion(color(white)) plotregion(color(white)) + graph export "$outdir/Figure_8_B.eps", as(eps) replace + +restore + diff --git a/37/replication_package/Do/Figures/Fig9.Rmd b/37/replication_package/Do/Figures/Fig9.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..ff21122b4bf7c227f36e990b9039d8686362669b --- /dev/null +++ b/37/replication_package/Do/Figures/Fig9.Rmd @@ -0,0 +1,132 @@ +--- +title: "Figure 9" +output: pdf_document +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = F, warning = F, message = F) +``` + +```{r, include = F, echo = F} +# Importing Packages +rm(list=ls()) +gc() +library(tidyverse) +library(extrafont) +library(gtable) +library(ggplot2) +library(gridExtra) +library(grid) +library(cowplot) +library(grDevices) +loadfonts() +``` + +```{r} +# SPECIFY DIRECTORY OF THE REPLICATION PACKAGE +setwd("C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing") + +# IMPORTING DATASET +datafig_second_gen = read_csv('Out/Figures_data/figure_9_data.csv', show_col_types = FALSE) +``` + +```{r} +# Function to Export Figures: SPECIFY DIRECTORY OF THE REPLICATION PACKAGE + +FigureExporter = function(Figure, Name, WhereFolderDraft = "C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"){ + figure_name <- Name + figures_dir <- file.path(WhereFolderDraft, 'Out/Figures') + fig_path <- file.path(figures_dir, figure_name) + png(fig_path, width = 4800, height=2700, res = 720, type = c("cairo-png")) + Figure1 = Figure + print(Figure1) +} +``` + + + +```{r} +#Data Adjustment for cleaning (Left Panel) Function - Without Rescaling + +DataAdjustNoResc = function(data){ + data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")] + data$m_perc <- data$m_perc + data$m_real <- data$m_real + data <- transform(data, + lbound = lb_perc, + ubound = ub_perc) + + diff <- data %>% + mutate(Max = max(m_perc, m_real), + Min = min(m_perc, m_real), + Diff = Max / Min - 1) %>% + arrange(desc(Diff)) + + ## Create difference between perception and real + data$diff <- (data$m_perc - data$m_real)/data$m_real + data_adj = data + data_adj +} +``` + + +#Figure 9 + +```{r} +# Data adjustment: rescaling not needed +datafig_second_gen_adj = DataAdjustNoResc(datafig_second_gen) + +# Function to generate the graph +Left_10_B = function(xlb, xupb, distance_ticks){ + data = datafig_second_gen_adj + + p <- ggplot(data, aes(x=t)) + + ## Plot segment joining and points + geom_segment(aes(x=t, xend=t, y=m_real, yend=m_perc), size = 0.4, color="black") + + geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) + + geom_point(aes(x=t, y=m_real_2, colour= 'Act. 1 & 2 Gen.', shape = 'Act. 1 & 2 Gen.'), size=4) + + geom_point(aes(x=t, y=m_real, colour='Act. 1 Gen.', shape = 'Act. 1 Gen.'), size=4) + + geom_point(aes(x=t, y=m_perc, colour='Perceived (mean)', shape = 'Perceived (mean)'), size=3) + + coord_flip() + + ## Add theme, labels, and modify scale + myshapes <- c("my_b" = "15", "my_d" = "18") + p1 <- p + + scale_y_continuous(limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) + + theme_light() + + theme( + ## Control grid + panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'), + panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'), + + ## Control legend + legend.position = "bottom", + legend.box = "horizontal", + legend.justification = c(0.5,0), + legend.title = element_blank(), + text = element_text(family = "LM Roman 10", color='black', size=11), + axis.text = element_text(colour = 'black'), + axis.text.x = element_text(size=9), + axis.text.y = element_text(size=9), + axis.title.x = element_text(size = 9, margin = margin(t=15)), + axis.ticks.x = element_blank() + ) + + scale_colour_manual(name = "", labels = c( "Act. 1 & 2 Gen.", 'Act. 1 Gen.','Perceived (mean)'), + values = c("Act. 1 & 2 Gen." = "#1A476F", 'Act. 1 Gen.' = "#0080FF", + 'Perceived (mean)' = rgb(0.7,0.2,0.1,1))) + + scale_shape_manual(name = "", labels = c("Act. 1 & 2 Gen.",'Act. 1 Gen.', 'Perceived (mean)'), + values = c( "Act. 1 & 2 Gen." = 20, 'Act. 1 Gen.' = 18, 'Perceived (mean)' = 15)) + + xlab("") + + ylab("Share of Immigrants") + + guides(col = guide_legend(nrow=2,byrow=TRUE)) + p1} +``` + +```{r} +# Generate Figure +plot_grid(Left_10_B(0, 40, 5), labels=NULL, ncol=2, align='h', axis='b') + +# Export +FigureExporter(plot_grid(Left_10_B(0, 40, 5), labels=NULL, ncol=2, align='h', axis='b'), "Figure_9.png") + +``` diff --git a/37/replication_package/Do/Tables/Tab1.do b/37/replication_package/Do/Tables/Tab1.do new file mode 100644 index 0000000000000000000000000000000000000000..7f6b37aeed915294fa55cf6d6b886d401edf3034 --- /dev/null +++ b/37/replication_package/Do/Tables/Tab1.do @@ -0,0 +1,295 @@ +********** +* Immigration and Redistribution +* Alesina, Miano, Stantcheva +* RESTUD + +* Table 1 +* You should install the command frmttable before running this dofile -- type "search frmttable" and select sg97_5 +********** + +clear all + +* Specify directory of the replication package +global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing" +cd "$dir" + +* Declare output sub-directory +global outdir "Out/Tables" + +* Load the data +use "Data/survey_analysis.dta", clear + +* Generate country dummies +gen US=(country=="US") +label var US "Answered the survey for the United States" +gen UK=(country=="UK") +label var UK "Answered the survey for the United Kingdom" +gen Italy=(country=="IT") +label var Italy "Answered the survey for Italy" +gen Sweden=(country=="SE") +label var Sweden "Answered the survey for Sweden" +gen Germany=(country=="DE") +label var Germany "Answered the survey for Germany" +gen France=(country=="FR") +label var France "Answered the survey for France" + +foreach i in US UK Italy Sweden Germany France{ +label val `i' binary +} + +* Generate flags - To ensure answers quality + +* Time spent on the survey +gen flag_1=0 +gen flag_2=0 + +bysort country treatment_recod: egen min_duration = pctile(duration), p(2) +bysort country treatment_recod: egen max_duration = pctile(duration), p(98) + +replace flag_1=1 if durationmax_duration + +* Time spent on videos +global videos t1 t2 t3 + +foreach q in $videos{ + +bysort country: egen max_time_`q'= pctile(time_`q'), p(98) +} + +foreach q in $videos{ + +gen flag_time_max_`q'=(time_`q'> max_time_`q') +replace flag_time_max_`q'=. if time_`q'==. + +} + + +* Drop respondents that have spent too little or too much time on the survey (bottom/top 2%) +keep if flag_1==0 & flag_2==0 + + +* Drop respondents who have spent too much time on the videos (top 2%) +foreach q in $videos{ + +drop if flag_time_max_`q'==1 + +} + +* Drop the variables used to exclude inattentive respondents +drop flag_1 flag_2 min_duration max_duration max_time_t1 max_time_t2 max_time_t3 flag_time_max_t1 flag_time_max_t2 flag_time_max_t3 + +* Gen variables * + +* Gender +gen male=(sex==1) +label var male "Is a male" +label val male binary + +* Age brackets +gen age_1=(age>=18 & age<=29) +label var age_1 "Is between 18 and 29" +gen age_2=(age>=30 & age<=39) +label var age_2 "Is between 30 and 39" +gen age_3=(age>=40 & age<=49) +label var age_3 "Is between 40 and 49" +gen age_4=(age>=50 & age<=59) +label var age_4 "Is between 50 and 59" +gen age_5=(age>=60) +label var age_5 "Is 60 or above" + +foreach i in 1 2 3 4 5{ +label val age_`i' binary +} + +* Income brackets +gen inc_bracket_1=0 +label var inc_bracket_1 "Is in the first income bracket" +gen inc_bracket_2=0 +label var inc_bracket_2 "Is in the second income bracket" +gen inc_bracket_3=0 +label var inc_bracket_3 "Is in the third income bracket" +gen inc_bracket_4=0 +label var inc_bracket_4 "Is in the last income bracket" + + * US + replace inc_bracket_1=1 if household_income<4 & US==1 + replace inc_bracket_2=1 if (household_income==4 | household_income==5) & US==1 + replace inc_bracket_3=1 if(household_income==6 | household_income==7) & US==1 + replace inc_bracket_4=1 if household_income>7 & US==1 + + * UK + replace inc_bracket_1=1 if income_q_UK==1 | income_q_UK==4 + replace inc_bracket_2=1 if income_q_UK==5 + replace inc_bracket_3=1 if income_q_UK==6 + replace inc_bracket_4=1 if income_q_UK==7 + + * FR + replace inc_bracket_1=1 if income_q_FR==1 | income_q_FR==4 + replace inc_bracket_2=1 if income_q_FR==5 + replace inc_bracket_3=1 if income_q_FR==3 + replace inc_bracket_4=1 if income_q_FR==2 | income_q_FR==8 + + * IT + replace inc_bracket_1=1 if income_q_IT==1 + replace inc_bracket_2=1 if income_q_IT==4 + replace inc_bracket_3=1 if income_q_IT==5 + replace inc_bracket_4=1 if income_q_IT==3 | income_q_IT==2 + + * DE + replace inc_bracket_1=1 if income_q_DE==1 | income_q_DE==4 + replace inc_bracket_2=1 if income_q_DE==5 | income_q_DE==3 + replace inc_bracket_3=1 if income_q_DE==2 + replace inc_bracket_4=1 if income_q_DE==8 | income_q_DE==9 + + *SE + replace inc_bracket_1=1 if income_q_SE==1 + replace inc_bracket_2=1 if income_q_SE==5 + replace inc_bracket_3=1 if income_q_SE==4 + replace inc_bracket_4=1 if income_q_SE==3 + +foreach i in 1 2 3 4{ +label val inc_bracket_`i' binary +} + +* Married dummy (=0 if "other") +gen married=(marital_status==2) +label var married "Is married" +label val married binary + +* Gen employed +gen employed=(employment<4) +replace employed=. if employment==. +label var employed "Is employed" +label val employed binary + +* Gen unemployed +gen unemployed=(employment==4) +replace unemployed=. if employment==. +label var unemployed "Is unemployed" +label val unemployed binary + + + +******** Table 1: to check representativeness of the sample ****** + +cap mata drop A + +* Gender +foreach x in US UK France Italy Germany Sweden { +su male if `x'==1 +local male`x' : display %5.2f `r(mean)' +} +matrix A=(`maleUS', 0.49,`maleUK', 0.48,`maleFrance', 0.49,`maleItaly', 0.50, `maleGermany', 0.49, `maleSweden', 0.50) + +* Age +foreach x in US UK France Italy Germany Sweden { +su age_1 if `x'==1 +local age_1`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`age_1US', 0.24,`age_1UK', 0.26,`age_1France', 0.23,`age_1Italy', 0.19, `age_1Germany', 0.22, `age_1Sweden', 0.24) +matrix A=A\B +foreach x in US UK France Italy Germany Sweden { +su age_2 if `x'==1 +local age_2`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`age_2US', 0.20,`age_2UK', 0.19,`age_2France', 0.20,`age_2Italy', 0.22,`age_2Germany', 0.18, `age_2Sweden', 0.19) +matrix A=A\B +foreach x in US UK France Italy Germany Sweden { +su age_3 if `x'==1 +local age_3`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`age_3US', 0.19,`age_3UK', 0.21,`age_3France', 0.21,`age_3Italy', 0.23, `age_3Germany', 0.20,`age_3Sweden', 0.21) +matrix A=A\B +foreach x in US UK France Italy Germany Sweden { +su age_4 if `x'==1 +local age_4`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`age_4US', 0.20,`age_4UK', 0.18,`age_4France', 0.20,`age_4Italy', 0.19, `age_4Germany', 0.23,`age_4Sweden', 0.18) +matrix A=A\B +foreach x in US UK France Italy Germany Sweden { +su age_5 if `x'==1 +local age_5`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`age_5US', 0.17,`age_5UK', 0.16,`age_5France', 0.15,`age_5Italy', 0.17, `age_5Germany', 0.17,`age_5Sweden', 0.18) +matrix A=A\B + +* Income +foreach x in US UK France Italy Germany Sweden { +su inc_bracket_1 if `x'==1 +local inc_bracket_1`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`inc_bracket_1US', 0.16,`inc_bracket_1UK', 0.31,`inc_bracket_1France', 0.32,`inc_bracket_1Italy', 0.27, `inc_bracket_1Germany', 0.26,`inc_bracket_1Sweden', 0.33) +matrix A=A\B +foreach x in US UK France Italy Germany Sweden { +su inc_bracket_2 if `x'==1 +local inc_bracket_2`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`inc_bracket_2US', 0.19,`inc_bracket_2UK', 0.35,`inc_bracket_2France', 0.30,`inc_bracket_2Italy', 0.28, `inc_bracket_2Germany', 0.29,`inc_bracket_2Sweden', 0.29) +matrix A=A\B +foreach x in US UK France Italy Germany Sweden { +su inc_bracket_3 if `x'==1 +local inc_bracket_3`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`inc_bracket_3US', 0.22,`inc_bracket_3UK', 0.11,`inc_bracket_3France', 0.14,`inc_bracket_3Italy', 0.19, `inc_bracket_3Germany', 0.23,`inc_bracket_3Sweden', 0.22) +matrix A=A\B +foreach x in US UK France Italy Germany Sweden { +su inc_bracket_4 if `x'==1 +local inc_bracket_4`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`inc_bracket_4US', 0.43,`inc_bracket_4UK', 0.23,`inc_bracket_4France', 0.24,`inc_bracket_4Italy', 0.26, `inc_bracket_4Germany', 0.22,`inc_bracket_4Sweden', 0.17) +matrix A=A\B + + +* Married +foreach x in US UK France Italy Germany Sweden { +su married if `x'==1 +local married`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`marriedUS', 0.49,`marriedUK', 0.41,`marriedFrance', 0.46,`marriedItaly', 0.46, `marriedGermany', 0.46, `marriedSweden', 0.33) +matrix A=A\B + + +* Employed +foreach x in US UK France Italy Germany Sweden { +su employed if `x'==1 +local employed`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`employedUS', 0.70,`employedUK', 0.74,`employedFrance', 0.65,`employedItaly', 0.57, `employedGermany', 0.75, `employedSweden', 0.77) +matrix A=A\B + +* Unemployed +foreach x in US UK France Italy Germany Sweden { +su unemployed if `x'==1 +local unemployed`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`unemployedUS', 0.05,`unemployedUK', 0.05,`unemployedFrance', 0.09,`unemployedItaly', 0.11, `unemployedGermany', 0.04,`unemployedSweden', 0.05) +matrix A=A\B + +* University degree +foreach x in US UK France Italy Germany Sweden { +su university_degree if `x'==1 +local university`x' : display %5.2f `r(mean)' +} +cap mata drop B +matrix B=(`universityUS', 0.41,`universityUK', 0.36,`universityFrance', 0.31,`universityItaly', 0.16, `universityGermany', 0.25, `universitySweden', 0.36) +matrix A=A\B + +mat rownames A=male age_1 age_2 age_3 age_4 age_5 inc_bracket_1 inc_bracket_2 inc_bracket_3 inc_bracket_4 married employed unemployed university + +frmttable using "$outdir/summary_stats_sample_by_country_final.tex", statmat(A) tex fragment replace /// + ctitle("",US,"", UK,"", France,"", Italy,"", Germany, "", Sweden,""\"", Sample, Pop, Sample, Pop,Sample, Pop,Sample, Pop,Sample, Pop,Sample, Pop\"", "(1)", "(2)", "(3)", "(4)", "(5)", "(6)", "(7)", "(8)", "(9)", "(10)", "(11)", "(12)") /// + rtitle(Male\ 18-29 y.o.\30-39 y.o.\40-49 y.o.\50-59 y.o.\60-69 y.o.\Income Bracket 1 \Income Bracket 2 \Income Bracket 3 \Income Bracket 4\ Married\ Employed\ Unemployed\ College) /// + multicol(1,2,2;1,4,2;1,6,2;1,8,2;1,10,2;1,12,2) hlines(110100000000000001) noce diff --git a/37/replication_package/Do/Tables/Tab2_3.do b/37/replication_package/Do/Tables/Tab2_3.do new file mode 100644 index 0000000000000000000000000000000000000000..ef5a7740e132b5de89b102718ca67394bb1573a0 --- /dev/null +++ b/37/replication_package/Do/Tables/Tab2_3.do @@ -0,0 +1,516 @@ +********** +* Immigration and Redistribution +* Alesina, Miano, Stantcheva +* RESTUD + +* Tables 2 and 3 +* The command appendfile should be installed before running this dofile. Type "ssc install appendfile". +********** + +clear all + +* Specify directory of the replication package +global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing" +cd "$dir" + +* Declare output sub-directory +global outdir "Out/Tables" + +* Load survey + local data +use "Data/survey_analysis.dta", clear + +* Countries included in the analysis +global countries US IT FR DE SE UK + +* Generate flags - To ensure answers quality +gen flag_1=0 +gen flag_2=0 + +bysort country treatment_recod: egen min_duration = pctile(duration), p(2) +bysort country treatment_recod: egen max_duration = pctile(duration), p(98) + +replace flag_1=1 if durationmax_duration + + +* Drop respondents that have spent too little or too much time (top/bottom 2%) +keep if flag_1==0 & flag_2==0 + +*Drop variables that were used to exclude innatentive respondents +drop flag_1 flag_2 min_duration max_duration + +* Add data on actual immigrants and non-immigrants statistics and generate misperceptions * +do "Do/misperceptions.do" + +*** Keep only control group *** +keep if control==1 + + +**************** +* Gen controls * +**************** + + +* Gen Left-Right variables * + +* Based on vote or voting intensions +gen left=(party_voted==4 | party_voted==5) +replace left=. if party_voted==. | party_voted==6 | party_voted==0 +gen right=(party_voted==1 | party_voted==2) +replace right=. if party_voted==. | party_voted==6 | party_voted==0 +gen center=(party_voted==3) +replace center=. if party_voted==. | party_voted==6 | party_voted==0 + +label var left "Left-wing" +label var right "Right-wing" +label var center "Center" + +foreach i in left right center{ +label val `i' binary +} + + +* Gen controls * + +* Young +gen young=(age<45) +label var young "Age 18-45" +label val young binary + +* Gender +gen female=(sex==2) +label var female "Female" +label val female binary + +* Immigrant parent +gen immigrant_parent=(q_parent_same==2) +replace immigrant_parent=. if q_parent_same==. +label var immigrant_parent "Immigrant parent" +label val immigrant_parent binary + +* Top income +gen top_income=0 +foreach x in $countries{ +su household_income if country=="`x'", d +replace top_income=1 if household_income>r(p75) & country=="`x'" +} +label var top_income "High Income" +label val top_income binary + +* Gen variables for HI sectors, with college/no college +gen sector_dummy_h=sector_dummy*university_degree +gen sector_dummy_l=sector_dummy*(1-university_degree) + +label var sector_dummy_h "H. Imm. Sect. College" +label var sector_dummy_l "H. Imm. Sect. No College" +label val sector_dummy_h binary +label val sector_dummy_l binary + +* Gen additional variables entering the indices + +* Dummy = 1 if Mohammad receives more on net from the state (either receives more transfers and pays same or less taxes or receives same transfers but pays less taxes) +gen moh_more=(Moh_transfers<3 & Moh_tax>2) +replace moh_more=1 if Moh_transfers==3 & Moh_tax>3 +replace moh_more=. if Moh_tax==. | Moh_transfers==. +la var moh_more "Mohammad receives more transfers and/or pay less taxes than John" +label val moh_more binary + +* Transfers +gen imm_tra_more=(transfers_imm==10 | transfers_imm==11 |transfers_imm==12 |transfers_imm==13) +la var imm_tra_more "Immigrants receive more transfers" +replace imm_tra_more=. if transfers_imm==. +label val imm_tra_more binary + +******* +* Declare controls to be included in regressions * +global controls_index right female young immigrant_parent university_degree top_income sector_dummy_l sector_dummy_h + +********** + +*** Gen indices *** +* Cultural distance, Economic circumstances, Free riding * +foreach var in mis_share_foreign mis_share_LA mis_share_AS mis_share_AF mis_share_E mis_share_NA /// + mis_unemp_imm_nn mis_loweduc_imm_nn mis_higheduc_imm_nn effort_poor moh_more imm_tra_more{ + +reg `var' $controls_index +su `var' if e(sample)==1 +local `var'mc: display %5.3f `r(mean)' +su `var' if e(sample)==1 +local `var'sdc: display %5.3f `r(sd)' +gen `var'_ind=(`var'-``var'mc')/``var'sdc' +replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==. // This is to avoid dropping entirely from the analysis respondents who have just one missing component of the index +} + + +gen culture_index = (mis_share_LA_ind + mis_share_AS_ind + mis_share_AF_ind - mis_share_E_ind - mis_share_NA_ind)/5 + +gen econ_index = (mis_unemp_imm_nn_ind + mis_loweduc_imm_nn_ind - mis_higheduc_imm_nn_ind)/3 + +gen free_riding_index = (effort_poor_ind + moh_more_ind + imm_tra_more_ind)/3 + +foreach var in mis_share_foreign mis_share_LA mis_share_AS mis_share_AF mis_share_E mis_share_NA /// + mis_unemp_imm_nn mis_higheduc_imm_nn effort_poor moh_more imm_tra_more mis_loweduc_imm_nn { + + drop `var'_ind + + } + + + +label var culture_index "Perceived cultural distance index" +label var econ_index "Perceived economic weakness index" +label var free_riding_index "Perceived free-riding index" + + +****** +* Gen actual local cultural distance index and other indices * +foreach var in share_foreign_lc share_LatinAmerica_lc share_Asia_lc share_Africa_lc share_Europe_lc share_NorthAmerica_lc college_imm_lc loweduc_imm_lc unemp_imm_lc{ + +su `var' +local `var'mc: display %5.3f `r(mean)' +su `var' +local `var'sdc: display %5.3f `r(sd)' +gen `var'_ind=(`var'-``var'mc')/``var'sdc' +replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==. +} + +gen culture_index_act = (-share_LatinAmerica_lc_ind+share_Asia_lc_ind +share_Africa_lc_ind -share_Europe_lc_ind - share_NorthAmerica_lc_ind)/5 + +gen econ_index_act = (loweduc_imm_lc_ind -college_imm_lc_ind +unemp_imm_lc_ind)/3 + +drop share_foreign_lc_ind share_LatinAmerica_lc_ind share_Asia_lc_ind share_Africa_lc_ind share_Europe_lc_ind college_imm_lc_ind unemp_imm_lc_ind loweduc_imm_lc_ind share_NorthAmerica_lc_ind + +label var culture_index_act "Actual local cultural distance index" +label var econ_index_act "Actual local economic circumstances index" + +* Standardize indices * +foreach var in culture_index econ_index free_riding_index culture_index_act econ_index_act{ + reg `var' $controls_index + su `var' if e(sample)==1 + local `var'mc: display %5.3f `r(mean)' + local `var'sdc: display %5.3f `r(sd)' + replace `var'=(`var'-``var'mc')/``var'sdc' + } + + +********************************************************** +*** Table 2: Perception vs. Actual Indices +********************************************************** + +* Regressions * + +global table_name "$outdir/table_local_indices" + +* Table start +file open holder using $table_name.tex, write replace text +file write holder "\begin{tabular}{lcccc} " _n +file write holder "\\ \\ & All & Perc. Cultural Distance & Perc. Econ. Weakness & Perc. Free Riding \\" _n +file write holder "& Immigrants (misp.) & Index & Index & Index \\" _n +file write holder "& (1) & (2) & (3) & (4) \\ \hline" _n +file close holder +* Table end +file open holder using temp_end.tex, write replace text +file write holder "\hline \end{tabular}" _n +file close holder + + + +eststo clear +foreach var in mis_share_foreign{ +eststo: xi: reg `var' share_foreign_lc $controls_index i.country, robust +su `var' if e(sample)==1 +local `var'mc: display %5.2f `r(mean)' +} + +foreach var in culture_index{ +eststo: xi: reg `var' culture_index_act $controls_index i.country, robust +su `var' if e(sample)==1 +local `var'mc: display %5.2f abs(`r(mean)') // Abs is used to correct stata's rounding error +} + +foreach var in econ_index{ +eststo: xi: reg `var' econ_index_act $controls_index i.country, robust +su `var' if e(sample)==1 +local `var'mc: display %5.2f abs(`r(mean)') +} + +foreach var in free_riding_index{ +eststo: xi: reg `var' $controls_index i.country, robust +su `var' if e(sample)==1 +local `var'mc: display %5.2f abs(`r(mean)') +} + + +esttab using temp1.tex, replace fragment booktabs keep(share_foreign_lc culture_index_act econ_index_act $controls_index) order(share_foreign_lc culture_index_act econ_index_act $controls_index) noconst label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + + +* Table middle +file open holder using temp_mid1.tex, write replace text +file write holder "Control mean & `mis_share_foreignmc' & `culture_indexmc' & `econ_indexmc' & `free_riding_indexmc' \\" _n +file close holder + + +appendfile temp1.tex $table_name.tex +appendfile temp_mid1.tex $table_name.tex +appendfile temp_end.tex $table_name.tex + + +erase temp1.tex +erase temp_end.tex +erase temp_mid1.tex + + +******************************************* +* Table 3: Correlation matrix +******************************************* + +global controls right female young immigrant_parent university_degree top_income sector_dummy_l sector_dummy_h + +global Y perc_share_foreign perch_share_LA perc_share_AF perc_share_AS perc_share_E perc_share_NA perc_unemp_imm perc_loweduc_imm perc_higheduc_imm + +global X share_foreign_lc share_LatinAmerica_lc share_Asia_lc share_Africa_lc share_Europe_lc college_imm_lc unemp_imm_lc unemp_nat_lc college_nat_lc poor_lc black_cz hispanic_cz + +preserve + +* Perceptions +gen perc1 = perc_share_foreign +gen perc2 = perc_share_LA +gen perc3 = perc_share_AF +gen perc4 = perc_share_AS +gen perc5 = perc_share_E +gen perc6 = perc_unemp_imm +gen perc7 = perc_loweduc_imm +gen perc8 = perc_higheduc_imm + + * National only +gen perc9 = perc_poverty_imm +gen perc10 = perc_share_mu + + +* Actual local +gen act_l1 = share_foreign_lc +gen act_l2 = share_LatinAmerica_lc +gen act_l3 = share_Africa_lc +gen act_l4 = share_Asia_lc +gen act_l5 = share_Europe_lc +gen act_l6 = unemp_imm_lc +gen act_l7 = loweduc_imm_lc +gen act_l8 = college_imm_lc + +gen act_natl6 = unemp_nat_lc +gen act_natl7 = loweduc_nat_lc +gen act_natl8 = college_nat_lc +gen act_natl9 = poor_lc + +gen act_diffl6 = unemp_imm_lc - unemp_nat_lc +gen act_diffl7 = loweduc_imm_lc - loweduc_nat_lc +gen act_diffl8 = college_imm_lc - college_nat_lc + +* Actual national +gen act_n1 = share_foreign +gen act_n2 = share_LA +gen act_n3 = share_NAF + share_SA +gen act_n4 = share_ME + share_A +gen act_n5 = share_WE + share_EE +gen act_n6 = unemp_imm +gen act_n7 = loweduc_imm +gen act_n8 = higheduc_imm + +gen act_n9 = poverty_imm +gen act_n10 = share_muslim + +gen act_natn6 = unemp_nat +gen act_natn7 = loweduc_nat +gen act_natn8 = higheduc_nat +gen act_natn9 = poverty_nat + +gen act_diffn6 = unemp_imm - unemp_nat +gen act_diffn7 = loweduc_imm - loweduc_nat +gen act_diffn8 = higheduc_imm - higheduc_nat +gen act_diffn9 = poverty_imm - poverty_nat + + +* Natives + +* Perceptions +gen percn1 = perc_unemp_nat +gen percn2 = perc_loweduc_nat +gen percn3 = perc_higheduc_nat +gen percn4 = perc_poverty_nat + +* Actual local +gen actn_l1 = unemp_nat_lc +gen actn_l2 = loweduc_nat_lc +gen actn_l3 = college_nat_lc +gen actn_l4 = poor_lc + +* Actual national +gen actn_n1 = unemp_nat +gen actn_n2 = loweduc_nat +gen actn_n3 = higheduc_nat +gen actn_n4 = poverty_nat + + + +* Regressions * +global table_name "$outdir/corr_matrix" + +* Table start +file open holder using $table_name.tex, write replace text +file write holder "\begin{tabular}{lcccccccccc} " _n +file write holder "& \multicolumn{8}{l}{\textbf{Panel A: Correlation of Perceived Immigrants Characteristics with Actual Immigrants Characteristics}} \\" _n +file write holder "& Share of & Imm. from Latin & Imm. from & Imm. from & Imm. from & Unemployment & No High & College-educated & Poverty & Muslim \\" _n +file write holder "& Immigrants & America & Africa & Asia & Europe & Imm. & School Imm. & Imm. & Imm. & Imm. \\" _n +file write holder "& (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) \\ \hline" _n +file close holder +* Table end +file open holder using temp_end.tex, write replace text +file write holder "\hline \end{tabular}" _n +file close holder + +* Local +gen act_l=. +label var act_l "Local correlation" + +eststo clear +forval i=1(1)8 { +replace act_l=act_l`i' +eststo: xi: reg perc`i' act_l $controls i.country, robust +} +esttab using temp_1.tex, replace fragment booktabs keep(act_l) noconst noobs label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + +* National +gen act_n=. +label var act_n "National correlation" + +eststo clear +forval i=1(1)10 { +replace act_n=act_n`i' +eststo: xi: reg perc`i' act_n $controls, robust +} +esttab using temp_2.tex, replace fragment booktabs keep(act_n) noconst noobs label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + +* Table middle +file open holder using temp_mid1.tex, write replace text +file write holder "\\ & \multicolumn{10}{l}{\textbf{Panel B: Correlation of Perceived Immigrants Characteristics with Actual Non-immigrants Characteristics}} \\" _n +file write holder "& Unemployment & No High & College-educated & Poverty \\" _n +file write holder "& Imm. & School Imm. & Imm. & Imm. \\" _n +file write holder "& (1) & (2) & (3) & (4) \\ \hline" _n +file close holder + +* Natives - Local +gen act_natl=. +label var act_natl "Local correlation" +eststo clear +forval i=6(1)9 { +replace act_natl=act_natl`i' +eststo: xi: reg perc`i' act_natl $controls i.country, robust +} +esttab using temp_3.tex, replace fragment booktabs keep(act_natl) noconst noobs label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + + +* Natives - National +gen act_natn=. +label var act_natn "National correlation" +eststo clear +forval i=6(1)9 { +replace act_natn=act_natn`i' +eststo: xi: reg perc`i' act_natn $controls, robust +} +esttab using temp_4.tex, replace fragment booktabs keep(act_natn) noconst noobs label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + +* Table middle +file open holder using temp_mid2.tex, write replace text +file write holder "\\ & \multicolumn{10}{l}{\textbf{Panel C: Correlation of Perceived Immigrants Characteristics with Actual Immigrants - Non-immigrants Differences}} \\" _n +file write holder "& Unemployment & No High & College-educated & Poverty \\" _n +file write holder "& Imm. & School Imm. & Imm. & Imm. \\" _n +file write holder "& (1) & (2) & (3) & (4) \\ \hline" _n +file close holder + +* Imm-Natives diff - Local +gen act_diffl=. +label var act_diffl "Local correlation" +eststo clear +forval i=6(1)8 { +replace act_diffl=act_diffl`i' +eststo: xi: reg perc`i' act_diffl $controls i.country, robust +} +esttab using temp_5.tex, replace fragment booktabs keep(act_diffl) noconst noobs label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + + +* Imm-Natives diff - National +gen act_diffn=. +label var act_diffn "National correlation" +eststo clear +forval i=6(1)9 { +replace act_diffn=act_diffn`i' +eststo: xi: reg perc`i' act_diffn $controls, robust +} +esttab using temp_6.tex, replace fragment booktabs keep(act_diffn) noconst noobs label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + + +** Natives ** + +* Table middle +file open holder using temp_mid3.tex, write replace text +file write holder "\\ & \multicolumn{10}{l}{\textbf{Panel D: Correlation of Perceived Non-immigrants Characteristics with Actual Non-immigrants Characteristics}} \\" _n +file write holder "& Unemployment & No High & College-educated & Poverty \\" _n +file write holder "& Nat. & School Nat. & Nat. & Nat. \\" _n +file write holder "& (1) & (2) & (3) & (4) \\ \hline" _n +file close holder + +* Local +gen actn_l=. +label var actn_l "Local correlation" + +eststo clear +forval i=1(1)4 { +replace actn_l=actn_l`i' +eststo: xi: reg percn`i' actn_l $controls i.country, robust +} +esttab using temp_7.tex, replace fragment booktabs keep(actn_l) noconst noobs label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + +* National +gen actn_n=. +label var actn_n "National correlation" + +eststo clear +forval i=1(1)4 { +replace actn_n=actn_n`i' +eststo: xi: reg percn`i' actn_n $controls, robust +} +esttab using temp_8.tex, replace fragment booktabs keep(actn_n) noconst noobs label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + + +appendfile temp_1.tex $table_name.tex +appendfile temp_2.tex $table_name.tex +appendfile temp_mid1.tex $table_name.tex +appendfile temp_3.tex $table_name.tex +appendfile temp_4.tex $table_name.tex +appendfile temp_mid2.tex $table_name.tex +appendfile temp_5.tex $table_name.tex +appendfile temp_6.tex $table_name.tex +appendfile temp_mid3.tex $table_name.tex +appendfile temp_7.tex $table_name.tex +appendfile temp_8.tex $table_name.tex +appendfile temp_end.tex $table_name.tex + + +forval i=1(1)8{ +erase temp_`i'.tex +} +erase temp_mid1.tex +erase temp_mid2.tex +erase temp_mid3.tex +erase temp_end.tex + +restore diff --git a/37/replication_package/Do/Tables/Tab4to6.do b/37/replication_package/Do/Tables/Tab4to6.do new file mode 100644 index 0000000000000000000000000000000000000000..ac5682ce67afa19ca2ffd61a048510fc1fb897e7 --- /dev/null +++ b/37/replication_package/Do/Tables/Tab4to6.do @@ -0,0 +1,397 @@ +********** +* Immigration and Redistribution +* Alesina, Miano, Stantcheva +* RESTUD + +* Tables 4, 5 and 6 +* You should install winsor2 and appendfile before running this dofile. Type "ssc install winsor2" and "ssc install appendfile". +********** + +clear all + +* Specify directory of the replication package +global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing" +cd "$dir" + +* Declare output sub-directory +global outdir "Out/Tables" + +* Load survey data +use "Data/survey_analysis.dta", clear + +* Countries included in the analysis +global countries "US UK DE FR IT SE" + +* Generate flags - To ensure answers quality +global videos t1 t2 t3 + +gen flag_1=0 +gen flag_2=0 + +bysort country treatment_recod: egen min_duration = pctile(duration), p(2) +bysort country treatment_recod: egen max_duration = pctile(duration), p(98) + +replace flag_1=1 if durationmax_duration + + +* Time spent on each video + +* Gen time (in seconds) spent on each video treatment - based on page submit +foreach q in $videos{ + +bysort country: egen max_time_`q'= pctile(time_`q'), p(98) +} + +foreach q in $videos{ + +gen flag_time_max_`q'=(time_`q'> max_time_`q') +replace flag_time_max_`q'=. if time_`q'==. + +} + +* Drop respondents that have spent too little or too much time (bottom/top 2%) +keep if flag_1==0 & flag_2==0 + + +* Drop respondents who have spent too much time on the videos (top 2%) +foreach q in $videos{ + +drop if flag_time_max_`q'==1 + +} + +* Drop the variables used to exclude inattentive respondents +drop flag_1 flag_2 min_duration max_duration max_time_t1 max_time_t2 max_time_t3 flag_time_max_t1 flag_time_max_t2 flag_time_max_t3 + + +* Add data on actual immigrants statistics and generate misperceptions * +do "Do/misperceptions.do" + +* Share of all immigrants for the US (legal and undocumented) +replace share_foreign=13.5 if country=="US" + +* Redefing misperception share of all immigrants for the US, to keep into account above correction +replace mis_share_foreign=perc_share_foreign-share_foreign if country=="US" + +****** Gen dummy for (almost) accurate perception of immigration + +gen accurate_share_foreign=0 +replace accurate_share_foreign=1 if mis_share_foreign>-1 & mis_share_foreign<1 +replace accurate_share_foreign=. if mis_share_foreign==. +label var accurate_share_foreign "Accurate perception of the share of immigrants" +label val accurate_share_foreign binary + +* Gen additional outcome variables + +* Immigration is not a problem +gen imm_not_problem=(q_imm_problem==16 | q_imm_problem==17) +replace imm_not_problem=. if q_imm_problem==. +la var imm_not_problem "Immigration is not a problem" +label val imm_not_problem binary + +* When should immigrants be entitled to get benefits? +gen imm_benefits_soon=(q_imm_benefits==1 | q_imm_benefits==2 | q_imm_benefits==4) +replace imm_benefits_soon=. if q_imm_benefits==. +la var imm_benefits_soon "Immigrants should get benefits in less than 3 years" +label val imm_benefits_soon binary + +* When should immigrants be allowed to apply for citizenship? +gen imm_citizenship_soon=(q_imm_citizenship==1 | q_imm_citizenship==2) +replace imm_citizenship_soon=. if q_imm_citizenship==. +la var imm_citizenship_soon "Immigrants should get citizenship in 2 or 5 years" +label val imm_citizenship_soon binary + +* When would you consider an immigrant "Truly American"? +gen trully_american_cit=(q_imm_american==7 | q_imm_american==1 | q_imm_american==4) +replace trully_american_cit=. if q_imm_american==. +la var trully_american_cit "Consider American at citizenship or sooner" +label val trully_american_cit binary + +*Budget allocation +winsor2 budget_safetynet budget_health budget_education, s(_w) c(5 95) by(country) +la var budget_safetynet_w "% of the budget assigned to Income Support Program (winsorized)" +la var budget_health_w "% of the budget assigned to Public Spending on Health (winsorized)" +la var budget_education_w "% of the budget assigned to Spending on Schooling (winsorized)" + +gen budget_social_w = budget_health_w + budget_safetynet_w +la var budget_social_w "% of the budget assigned to Income Support Program and Health (winsorized)" + +* Inequality is a serious problem +gen ineq_problem_ser=(q_inequality_problem==4 | q_inequality_problem==5) +replace ineq_problem_ser=. if q_inequality_problem==. +la var ineq_problem_ser "Inequality is a serious problem" +label val ineq_problem_ser binary + +* Total donation above 50th percentile within country +gen total_donation_d=0 +foreach x in $countries { +su total_donation if country=="`x'", d +replace total_donation_d=1 if total_donation>r(p50) & country=="`x'" +} +replace total_donation_d=. if total_donation==. + +la var total_donation_d "Donated more than the median of the country of reference" +label val total_donation_d binary + + +**************** +* Gen controls * +**************** + +* Gen Left-right variables, based on vote or voting intentions * +gen left=(party_voted==4 | party_voted==5) +replace left=. if party_voted==. | party_voted==6 | party_voted==0 +gen right=(party_voted==1 | party_voted==2) +replace right=. if party_voted==. | party_voted==6 | party_voted==0 +gen center=(party_voted==3) +replace center=. if party_voted==. | party_voted==6 | party_voted==0 + +label var left "Left-wing" +label var right "Right-wing" +label var center "Center" + +foreach i in left right center{ +label val `i' binary +} + +*Young +gen young=(age<45) +label var young "Is less than 45" +label val young binary + +* Gender +gen male=(sex==1) +label var male "Male" +label val male binary + +* Children dummy +gen children=(number_children>1) +replace children=. if number_children==. +label var children "Has children" +label val children binary + +* Immigrant parent +gen immigrant_parent=(q_parent_same==2) +replace immigrant_parent=. if q_parent_same==. +label var immigrant_parent "At least one of the parents is an immigrant" +label val immigrant_parent binary + +* Top income +gen top_income=0 +foreach x in $countries{ +su household_income if country=="`x'", d +replace top_income=1 if household_income>r(p75) & country=="`x'" +} +label var top_income "High Income" +label val top_income binary + +* Immigration block first +label var immigfirst "Order/Salience T" + +* Gen interacted treatments +gen treatment1_if = treatment1*immigfirst +gen treatment2_if = treatment2*immigfirst +gen treatment3_if = treatment3*immigfirst +label var treatment1_if "Share of Immigrants Treatment and saw first the Immigration Block" +label var treatment2_if "Origin of Immigrants Treatment and saw first the Immigration Block" +label var treatment3_if "Hard Work Treatment and saw first the Immigration Block" + +foreach i in 1 2 3{ +label val treatment`i'_if binary +} + + +******************************************** +* Declare variables to be used as controls * +******************************************** + + +global controls right left male young immigrant_parent children university_degree top_income sector_dummy + + +******************************************************* +* Declare variables to be included in the regressions * +******************************************************* + +global treatments_int treatment1 treatment2 treatment3 treatment1_if treatment2_if treatment3_if + +global treatments treatment1 treatment2 treatment3 + +global X $treatments $controls i.country + +global X_int immigfirst $treatments_int $controls i.country + + +**************** +*** TABLE 4: Second Stage - Support for Redistribution & Order treatment *** +**************** + +global table_name "$outdir/table_2stage_redistribution" + +**************** + +* Table start +file open holder using $table_name.tex, write replace text +file write holder "\begin{tabular}{lcccccc} " _n +file write holder "& Tax & Tax & Social & Education & Inequality & Donation \\" _n +file write holder "& Top 1 & Bottom 50 & Budget & Budget & Serious Problem & Above Median \\" _n +file write holder "& (1) & (2) & (3) & (4) & (5) & (6) \\ \hline" _n +file close holder +* Table end +file open holder using temp_end.tex, write replace text +file write holder "\hline \end{tabular}" _n +file close holder + + +eststo clear + +foreach var in tax_top1 tax_bottom50 budget_social_w budget_education_w ineq_problem_ser total_donation_d{ +eststo: xi: reg `var' $X_int, robust +su `var' if e(sample)==1 & control==1 & immigfirst==0 +local `var'mc: display %5.2f `r(mean)' +} +esttab using temp_all_2.tex, replace fragment booktabs keep(immigfirst $treatments) order(immigfirst $treatments) noconst label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + +* Table middle +file open holder using temp_mid3.tex, write replace text +file write holder "Control mean & `tax_top1mc' & `tax_bottom50mc' & `budget_social_wmc' & `budget_education_wmc' & `ineq_problem_sermc' & `total_donation_dmc' \\" _n +file close holder + + +appendfile temp_all_2.tex $table_name.tex +appendfile temp_mid3.tex $table_name.tex +appendfile temp_end.tex $table_name.tex + + + +erase temp_all_2.tex +erase temp_mid3.tex +erase temp_end.tex + + +***************** +*** TABLE 5: First Stage *** +***************** + +global table_name "$outdir/table_1stage" + +* Table start +file open holder using $table_name.tex, write replace text +file write holder "\begin{tabular}{lccccccc} " _n +file write holder "& All & Accurate Perception & M. East and & N. America, W. and & Muslim & Christian & Lack of Effort \\" _n +file write holder "& Immigrants & All Immigrants & N. Africa & E. Europe & & & Reason Poor \\" _n +file write holder "& (misp.) & & (misp.) & (misp.) & (misp.) & (misp.) & \\" _n +file write holder "& (1) & (2) & (3) & (4) & (5) & (6) & (7) \\ \hline" _n +file close holder +* Table end +file open holder using temp_end.tex, write replace text +file write holder "\hline \end{tabular}" _n +file close holder + + +eststo clear +foreach var in mis_share_foreign accurate_share_foreign mis_share_ME_NAF mis_share_NA_WE_EE mis_share_mu mis_share_ch effort_poor{ +eststo: xi: reg `var' $X, robust +su `var' if e(sample)==1 & control==1 +local `var'mc: display %5.2f `r(mean)' +} +esttab using temp_all.tex, replace fragment booktabs keep($treatments) noconst label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + +* Table middle +file open holder using temp_mid1.tex, write replace text +file write holder "Control mean & `mis_share_foreignmc' & `accurate_share_foreignmc' & `mis_share_ME_NAFmc' & `mis_share_NA_WE_EEmc' & `mis_share_mumc' & `mis_share_chmc' & `effort_poormc' \\" _n +file close holder + + +appendfile temp_all.tex $table_name.tex +appendfile temp_mid1.tex $table_name.tex +appendfile temp_end.tex $table_name.tex + + +erase temp_all.tex +erase temp_end.tex +erase temp_mid1.tex + + +******** +* Table 6: Second Stage - Support for Immigration +********* + +global table_name "$outdir/table_2stage_immigration" + + +*** Gen Immigration support index + +foreach var in imm_not_problem imm_benefits_soon imm_citizenship_soon /// + trully_american_cit q_govt_imm { +xi: reg `var' $X +su `var' if e(sample)==1 & control==1 +local `var'mc: display %5.3f `r(mean)' +su `var' if e(sample)==1 & control==1 +local `var'sdc: display %5.3f `r(sd)' +su `var' if e(sample)==1 & treatment1==1 +local `var'mt1: display %5.3f `r(mean)' +su `var' if e(sample)==1 & treatment2==1 +local `var'mt2: display %5.3f `r(mean)' +su `var' if e(sample)==1 & treatment3==1 +local `var'mt3: display %5.3f `r(mean)' +gen `var'_ind=(`var'-``var'mc')/``var'sdc' +replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==. & control==1 +replace `var'_ind=(``var'mt1'-``var'mc')/``var'sdc' if `var'==. & treatment1==1 +replace `var'_ind=(``var'mt2'-``var'mc')/``var'sdc' if `var'==. & treatment2==1 +replace `var'_ind=(``var'mt3'-``var'mc')/``var'sdc' if `var'==. & treatment3==1 +} + +gen index_imm_support=(imm_benefits_soon_ind + imm_citizenship_soon_ind /// + +trully_american_cit_ind + q_govt_imm_ind +imm_not_problem_ind)/5 + + +drop imm_not_problem_ind imm_benefits_soon_ind imm_citizenship_soon_ind /// + trully_american_cit_ind q_govt_imm_ind + +* Standardize resulting index +xi: reg index_imm_support $X +su index_imm_support if e(sample)==1 & control==1 +local index_imm_supportmc: display %5.3f `r(mean)' +local index_imm_supportsdc: display %5.3f `r(sd)' +replace index_imm_support = (index_imm_support - `index_imm_supportmc')/`index_imm_supportsdc' + +* Table start +file open holder using $table_name.tex, write replace text +file write holder "\begin{tabular}{lcccccc} " _n +file write holder "& Imm. Not & Imm. Benefits & Imm. Citizenship & American & Govt. Should care & Imm Support \\" _n +file write holder "& A Problem & Soon & Soon & Upon Citizenship/Before & About Everyone & Index \\" _n +file write holder "& (1) & (2) & (3) & (4) & (5) & (6) \\ \hline" _n +file close holder +* Table end +file open holder using temp_end.tex, write replace text +file write holder "\hline \end{tabular}" _n +file close holder + +eststo clear +foreach var in imm_not_problem imm_benefits_soon imm_citizenship_soon /// + trully_american_cit q_govt_imm index_imm_support{ +eststo: xi: reg `var' $X, robust +su `var' if e(sample)==1 & control==1 +local `var'mc: display %5.2f `r(mean)' +} +esttab using temp_all.tex, replace fragment booktabs keep($treatments) noconst label /// +star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress + +* Table middle +file open holder using temp_mid1.tex, write replace text +file write holder "Control mean & `imm_not_problemmc' & `imm_benefits_soonmc' & `imm_citizenship_soonmc' & `trully_american_citmc' & `q_govt_immmc' & `index_imm_supportmc' \\" _n +file close holder + + +appendfile temp_all.tex $table_name.tex +appendfile temp_mid1.tex $table_name.tex +appendfile temp_end.tex $table_name.tex + + +erase temp_all.tex +erase temp_mid1.tex +erase temp_end.tex diff --git a/37/replication_package/Do/misperceptions.do b/37/replication_package/Do/misperceptions.do new file mode 100644 index 0000000000000000000000000000000000000000..149e5755dcdc20ab7fa069b2a6efd1cebda81d39 --- /dev/null +++ b/37/replication_package/Do/misperceptions.do @@ -0,0 +1,316 @@ +********** +* Immigration and Redistribution +* Alesina, Miano, Stantcheva +* RESTUD + +* This file generates the variables for the actual statistics on immigrants and non-immigrants (natives) and computes misperceptions (perceived - actual) +* See the Appendix for all the details on the sources and computations of the actual statistics +********** + +** Share of foreign-born *** +gen share_foreign=. +la var share_foreign "Actual share of foreign born" +replace share_foreign=14.8 if country=="DE" +replace share_foreign=12.2 if country=="FR" +replace share_foreign=10 if country=="IT" +replace share_foreign=13.4 if country=="UK" +replace share_foreign=10 if country=="US" +replace share_foreign=17.6 if country=="SE" + +** Share of second-generation immigrants *** +gen share_second_gen=. +la var share_second_gen "Actual share of second-gen. immigrants" +replace share_second_gen=7.4 if country=="DE" +replace share_second_gen=11 if country=="FR" +replace share_second_gen=2.4 if country=="IT" +replace share_second_gen=9.2 if country=="UK" +replace share_second_gen=15.4 if country=="US" // Also including 3.5 illegal immigrants +replace share_second_gen=13 if country=="SE" + +********** +* Share of immigrants from each area +gen share_NA=. +la var share_NA "Actual share imm. from North America" +gen share_LA=. +la var share_LA "Actual share imm. from Latin America" +gen share_WE=. +la var share_WE "Actual share imm. from Western Europe" +gen share_EE=. +la var share_EE "Actual share imm. from Eastern Europe" +gen share_NAF=. +la var share_NAF "Actual share imm. from North Africa" +gen share_SA=. +la var share_SA "Actual share imm. from Sub-Saharan Africa" +gen share_ME=. +la var share_ME "Actual share imm. from Middle East" +gen share_A=. +la var share_A "Actual share imm. from Asia" +gen share_O=. +la var share_O "Actual share imm. from Oceania" + +* United States +replace share_NA=2.3 if country=="US" +replace share_LA=42.3 if country=="US" +replace share_WE=7.7 if country=="US" +replace share_EE=6.1 if country=="US" +replace share_NAF=0.3 if country=="US" +replace share_SA=4.8 if country=="US" +replace share_ME=4.1 if country=="US" +replace share_A=32.1 if country=="US" +replace share_O=0.7 if country=="US" + +* UK +replace share_NA=2.3 if country=="UK" +replace share_LA=3.9 if country=="UK" +replace share_WE=19.0 if country=="UK" +replace share_EE=20.0 if country=="UK" +replace share_NAF=0.9 if country=="UK" +replace share_SA=16.0 if country=="UK" +replace share_ME=5.1 if country=="UK" +replace share_A=30.1 if country=="UK" +replace share_O=2.28 if country=="UK" + +* Italy +replace share_NA=0.9 if country=="IT" +replace share_LA=9.1 if country=="IT" +replace share_WE=14.3 if country=="IT" +replace share_EE=38.1 if country=="IT" +replace share_NAF=10.2 if country=="IT" +replace share_SA=8.2 if country=="IT" +replace share_ME=2.9 if country=="IT" +replace share_A=15.9 if country=="IT" +replace share_O=0.4 if country=="IT" + +* France +replace share_NA=1 if country=="FR" +replace share_LA=3.4 if country=="FR" +replace share_WE=29.3 if country=="FR" +replace share_EE=5.2 if country=="FR" +replace share_NAF=35.3 if country=="FR" +replace share_SA=13.1 if country=="FR" +replace share_ME=5.6 if country=="FR" +replace share_A=7.3 if country=="FR" +replace share_O=0.2 if country=="FR" + +* Germany +replace share_NA=1.1 if country=="DE" +replace share_LA=3.2 if country=="DE" +replace share_WE=14.9 if country=="DE" +replace share_EE=42.6 if country=="DE" +replace share_NAF=1.5 if country=="DE" +replace share_SA=2.3 if country=="DE" +replace share_ME=17.3 if country=="DE" +replace share_A=15.9 if country=="DE" +replace share_O=0.1 if country=="DE" + +* Sweden +replace share_NA=1.4 if country=="SE" +replace share_LA=5.5 if country=="SE" +replace share_WE=23.6 if country=="SE" +replace share_EE=22.2 if country=="SE" +replace share_NAF=1.2 if country=="SE" +replace share_SA=9.1 if country=="SE" +replace share_ME=23.8 if country=="SE" +replace share_A=12.4 if country=="SE" +replace share_O=0.31 if country=="SE" + +************* + +* Share of immigrants - Religion +gen share_christian=. +gen share_muslim=. + +label var share_muslim "Actual Share Muslims" + +label var share_christian "Actual Share Christians" + + +* United States +replace share_christian=61 if country=="US" +replace share_muslim=10 if country=="US" + +* UK +replace share_christian=58 if country=="UK" +replace share_muslim=23 if country=="UK" + +* France +replace share_christian=43 if country=="FR" +replace share_muslim=48 if country=="FR" + +* Italy +replace share_christian=57 if country=="IT" +replace share_muslim=33 if country=="IT" + +* Germany +replace share_christian=51 if country=="DE" +replace share_muslim=30 if country=="DE" + +* Sweden +replace share_christian=61 if country=="SE" +replace share_muslim=27 if country=="SE" + +* Immigrants' unemployment rate +gen unemp_imm=. +la var unemp_imm "Actual immigrant's unemployment rate" +replace unemp_imm=6.9 if country=="DE" +replace unemp_imm=16.6 if country=="FR" +replace unemp_imm=14.7 if country=="IT" +replace unemp_imm=5.7 if country=="UK" +replace unemp_imm=5.5 if country=="US" +replace unemp_imm=16.1 if country=="SE" + +* Highly educated immigrats +gen higheduc_imm=. +la var higheduc_imm "Actual share of highly educated immigrants" +replace higheduc_imm=22.3 if country=="DE" +replace higheduc_imm=28.8 if country=="FR" +replace higheduc_imm=11.7 if country=="IT" +replace higheduc_imm=48.8 if country=="UK" +replace higheduc_imm=41.4 if country=="US" +replace higheduc_imm=37.9 if country=="SE" + +* Low educated immigrats +gen loweduc_imm=. +la var loweduc_imm "Actual share of low educated immigrants" +replace loweduc_imm=35.1 if country=="DE" +replace loweduc_imm=39.1 if country=="FR" +replace loweduc_imm=49.1 if country=="IT" +replace loweduc_imm=16.6 if country=="UK" +replace loweduc_imm=22.0 if country=="US" +replace loweduc_imm=33.7 if country=="SE" + +* Immigrants' poverty rate +gen poverty_imm=. +la var poverty_imm "Actual immigrants' poverty rate" +replace poverty_imm=20.5 if country=="DE" +replace poverty_imm=23.8 if country=="FR" +replace poverty_imm=34.9 if country=="IT" +replace poverty_imm=19 if country=="UK" +replace poverty_imm=13.6 if country=="US" +replace poverty_imm=29.8 if country=="SE" + +**** +* Natives' unemployment rate *** +gen unemp_nat=. +la var unemp_nat "Actual natives' unemployment rate" +replace unemp_nat=3.8 if country=="DE" +replace unemp_nat=9.1 if country=="FR" +replace unemp_nat=11.2 if country=="IT" +replace unemp_nat=4.9 if country=="UK" +replace unemp_nat=5.2 if country=="US" +replace unemp_nat=5.1 if country=="SE" + +* Highly educated natives +gen higheduc_nat=. +la var higheduc_nat "Actual share of highly educated natives" +replace higheduc_nat=24.9 if country=="DE" +replace higheduc_nat=31.2 if country=="FR" +replace higheduc_nat=16.3 if country=="IT" +replace higheduc_nat=36 if country=="UK" +replace higheduc_nat=40.8 if country=="US" +replace higheduc_nat=34.6 if country=="SE" + +* Low educated natives +gen loweduc_nat=. +la var loweduc_nat "Actual share of low educated natives" +replace loweduc_nat=16.3 if country=="DE" +replace loweduc_nat=23.4 if country=="FR" +replace loweduc_nat=40.4 if country=="IT" +replace loweduc_nat=21.3 if country=="UK" +replace loweduc_nat=11.9 if country=="US" +replace loweduc_nat=17.6 if country=="SE" + +* Natives' poverty rate +gen poverty_nat=. +la var poverty_nat "Actual natives' poverty rate" +replace poverty_nat=16.3 if country=="DE" +replace poverty_nat=10.7 if country=="FR" +replace poverty_nat=17.5 if country=="IT" +replace poverty_nat=14.5 if country=="UK" +replace poverty_nat=10.5 if country=="US" +replace poverty_nat=12 if country=="SE" + + + +* Gen misperception variables (guessed - real --> negative for understatement, positive for overstatement) * + +* Share, origin, religion of immigrants +foreach g in foreign NA LA WE EE NAF SA ME A O ch mu{ + gen mis_share_`g' = perc_share_`g' - share_`g' +} + +* Unemployment, education, poverty of immigrants and natives + +foreach g in imm nat{ + foreach s in unemp higheduc loweduc poverty{ + gen mis_`s'_`g' = perc_`s'_`g' - `s'_`g' + } +} + +gen mis_unemp_imm_nn=perc_unemp_imm-unemp_imm +gen mis_higheduc_imm_nn=perc_higheduc_imm-higheduc_imm +gen mis_loweduc_imm_nn=perc_loweduc_imm-loweduc_imm +gen mis_poverty_imm_nn=perc_poverty_imm-poverty_imm + +* Grouped origins + + * Middle East + North Africa + gen mis_share_ME_NAF = mis_share_ME + mis_share_NAF + + * North America + Western and Eastern Europe + gen mis_share_NA_WE_EE = mis_share_NA + mis_share_WE + mis_share_EE + + * Europe + gen mis_share_E = mis_share_WE + mis_share_EE + gen perc_share_E = perc_share_WE + perc_share_EE + + * Africa + gen mis_share_AF = mis_share_NAF + mis_share_SA + gen perc_share_AF = perc_share_NAF + perc_share_SA + + * Asia + gen mis_share_AS = mis_share_A + mis_share_ME + gen perc_share_AS = perc_share_A + perc_share_ME + +* Gen misperception relative to first and second generation immigrants +gen share_foreign2= share_foreign + share_second_gen + +gen mis_share_foreign2 = perc_share_foreign - share_foreign2 + +*Relabel variables +label var mis_share_foreign "Misperception of the share of immigrants" +label var mis_share_NA "Misperception of the share of immigrants from North America" +label var mis_share_LA "Misperception of the share of immigrants from Latin America" +label var mis_share_WE "Misperception of the share of immigrants from Western Europe" +label var mis_share_EE "Misperception of the share of immigrants from Eastern Europe" +label var mis_share_NAF "Misperception of the share of immigrants from North Africa" +label var mis_share_SA "Misperception of the share of immigrants from Sub-saharian Africa" +label var mis_share_ME "Misperception of the share of immigrants from Middle East" +label var mis_share_A "Misperception of the share of immigrants from Asia" +label var mis_share_O "Misperception of the share of immigrants from Oceania" +label var mis_share_ch "Misperception of the share of christian immigrants" +label var mis_share_mu "Misperception of the share of muslim immigrants" +label var mis_unemp_imm "Misperception of the share of unemployed immigrants" +label var mis_higheduc_imm "Misperception of the share of high-educated immigrants" +label var mis_loweduc_imm "Misperception of the share of low-educated immigrants" +label var mis_poverty_imm "Misperception of the share of immigrants living below the poverty threshold" +label var mis_unemp_nat "Misperception of the share of unemployed natives" +label var mis_higheduc_nat "Misperception of the share of high-educated natives" +label var mis_loweduc_nat "Misperception of the share of low-educated natives" +label var mis_poverty_nat "Misperception of the share of natives living below the poverty threshold" +label var mis_share_ME_NAF "Misperception of the share of immigrants from Middle East and North Africa" +label var mis_share_NA_WE_EE "Misperception of the share of immigrants from North America, Western and Eastern Europe" +label var mis_share_E "Misperception of the share of immigrants from Europe" +label var perc_share_E "Perceived share of immigrants from Europe" +label var mis_share_AF "Misperception of the share of immigrants from Africa" +label var perc_share_AF "Perceived share of immigrants from Africa" +label var mis_share_AS "Misperception of the share of immigrants from Asia and Middle East" +label var perc_share_AS "Perceived share of immigrants from Asia and Middle East" +label var share_foreign2 "Actual share of immigrants from first and second generations" +label var mis_share_foreign2 "Misperception of the actual share of immigrants from first and second generations" +label var mis_unemp_imm_nn "Misperception of the number of unemployed immigrants" +label var mis_higheduc_imm_nn "Misperception of the number of high-educated immigrants" +label var mis_loweduc_imm_nn "Misperception of the number of low-educated immigrants" +label var mis_poverty_imm_nn "Misperception of the number of immigrants under the poverty threshold" + + diff --git a/37/replication_package/Out/Figures/Figure_10.eps b/37/replication_package/Out/Figures/Figure_10.eps new file mode 100644 index 0000000000000000000000000000000000000000..af77631272eaaad9319aa89c69dd44b80fcd0582 --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_10.eps @@ -0,0 +1,849 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%% This is a Stata generated postscript file +%%BoundingBox: 0 0 396 288 +%%HiResBoundingBox: 0.000 0.000 396.000 288.000 +%%DocumentNeededResources: font Helvetica +/xratio 0.012375 def +/yratio 0.012375 def +/Sbgfill { + /y1 exch def + /x1 exch def + /y0 exch def + /x0 exch def + x0 y0 moveto + x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto + fill +} def +/Spt { + yratio mul + /yp exch def + xratio mul + /xp exch def + Slrgb setrgbcolor + xp yp .5 0 360 arc fill +} def +/Sln { + yratio mul + /y1p exch def + xratio mul + /x1p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Slw setlinewidth + Slrgb setrgbcolor + x0p y0p M x1p y1p lineto S +} def +/Scrv { + yratio mul + /y3p exch def + xratio mul + /x3p exch def + yratio mul + /y2p exch def + xratio mul + /x2p exch def + yratio mul + /y1p exch def + xratio mul + /x1p exch def + Slw setlinewidth + Slrgb setrgbcolor + x1p y1p x2p y2p x3p y3p curveto + S +} def +/Stxtl { + /sp exch def + yratio mul + /sizep exch def + dup + /anglep exch def + 0 exch sub + /angle2p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Strgb setrgbcolor + x0p y0p M anglep rotate sizep fntsize sp show stroke angle2p rotate +} def +/Stxtc { + /sp exch def + yratio mul + /sizep exch def + dup + /anglep exch def + 0 exch sub + /angle2p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Strgb setrgbcolor + x0p y0p M anglep rotate sizep fntsize sp stringwidth exch -2 div exch rm sp show stroke angle2p rotate +} def +/Stxtr { + /sp exch def + yratio mul + /sizep exch def + dup + /anglep exch def + 0 exch sub + /angle2p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Strgb setrgbcolor + x0p y0p M anglep rotate sizep fntsize sp stringwidth 1 index -1 mul exch rm pop sp show stroke angle2p rotate +} def +/Srect { + /sfill exch def + /sstroke exch def + yratio mul + /y1 exch def + xratio mul + /x1 exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto closepath + sfill Sfill + sstroke Sstroke +} def +/Sellipse { + /sfill exch def + /sstroke exch def + yratio mul + /yrad exch def + xratio mul + /xrad exch def + yratio mul + /y exch def + xratio mul + /x exch def + /savematrix matrix currentmatrix def + x y translate + xrad yrad scale + 0 0 1 0 360 arc + savematrix setmatrix + sfill Sfill + sstroke Sstroke +} def +/Stri { + /sfill exch def + /sstroke exch def + xratio mul + /r exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + /xcen x0 def + y0 r add + /ytop exch def + r 2 div + y0 exch sub + /ybot exch def + r 3 sqrt 2 div mul dup + xcen exch sub + /xleft exch def + xcen add + /xright exch def + newpath xcen ytop moveto xright ybot lineto xleft ybot lineto xcen ytop lineto closepath + sfill Sfill + sstroke Sstroke +} def +/Soldtri { + /sfill exch def + xratio mul + /r exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + x0 r sub + /x1 exch def + y0 r sub + /y1 exch def + x0 r add + /x2 exch def + y0 r sub + /y2 exch def + /x3 x0 def + y0 r add + /y3 exch def + newpath x1 y1 moveto x2 y2 lineto x3 y3 lineto x1 y1 lineto closepath + sfill 1 eq { + Ssrgb setrgbcolor + gsave + fill + grestore + } if + Slw setlinewidth + Slrgb setrgbcolor + S +} def +/Sdia { + /sfill exch def + /sstroke exch def + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + x r sub + /x0 exch def + /y0 y def + /x1 x def + y r sub + /y1 exch def + x r add + /x2 exch def + /y2 y def + /x3 x def + y r add + /y3 exch def + newpath x0 y0 moveto x1 y1 lineto x2 y2 lineto x3 y3 lineto closepath + sfill Sfill + sstroke Sstroke +} def +/Scc { + /sfill exch def + /sstroke exch def + xratio mul + /r0 exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + x0 y0 r0 0 360 arc closepath + sfill Sfill + sstroke Sstroke +} def +/Spie { + /sfill exch def + /salign exch def + /a1 exch def + /a0 exch def + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + /Pie { + x y moveto x y r a0 a1 arc closepath + } def + newpath Pie + sfill Sfill + Slrgb setrgbcolor + salign 0 eq { + gsave + Slw 2 mul setlinewidth + clip + S + grestore + } if + salign 1 eq { + Slw setlinewidth + S + } if + salign 2 eq { + gsave + Slw 2 mul setlinewidth + strokepath + pathbbox + /ury exch def + /urx exch def + /lly exch def + /llx exch def + newpath llx lly moveto llx ury lineto urx ury lineto urx lly lineto closepath + Pie + eoclip + newpath Pie + S + grestore + } if + newpath +} def +/Splu { + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + x r sub + /x0 exch def + x r add + /x1 exch def + x0 y M x1 y L + y r sub + /y0 exch def + y r add + /y1 exch def + x y0 M x y1 L +} def +/Scro { + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + x r sub + /x0 exch def + y r sub + /y0 exch def + x r add + /x1 exch def + y r add + /y1 exch def + x0 y0 M x1 y1 L + x r add + /x0 exch def + y r sub + /y0 exch def + x r sub + /x1 exch def + y r add + /y1 exch def + x0 y0 M x1 y1 L +} def +/Sm { + yratio mul + /y exch def + xratio mul + /x exch def + x y M +} def +/Sl { + yratio mul + /y exch def + xratio mul + /x exch def + x y L +} def +/SPl { + yratio mul + /y exch def + xratio mul + /x exch def + x y PL +} def +/Sarr { + /sfill exch def + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + y r add + /ytop exch def + y r sub + /ybot exch def + gsave + Slrgb setrgbcolor + sfill 0 eq { + r 2 mul 3 div dup + x exch sub + /xleft exch def + x add + /xright exch def + newpath xleft y moveto x ytop lineto xright y lineto x ytop moveto x ybot lineto + Lcs + 1 setlinejoin + } { + r 2 div dup + x exch sub + /xleft exch def + x add + /xright exch def + newpath xleft y moveto x ytop lineto xright y lineto x ytop closepath moveto x ybot lineto + gsave + fill + grestore + } ifelse + Slw setlinewidth + S + grestore +} def +/Spipe { + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + y r sub + /y0 exch def + y r add + /y1 exch def + x y0 M x y1 L +} def +/Sv { + xratio mul + /r exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + /xcen x0 def + y0 r add + /ytop exch def + r 2 div + y0 exch sub + /ybot exch def + r 3 sqrt 2 div mul dup + xcen exch sub + /xleft exch def + xcen add + /xright exch def + newpath xleft ytop moveto xcen ybot lineto xright ytop lineto + Slw setlinewidth + Slrgb setrgbcolor + S +} def +/Lcs { + currentlinecap + 1 setlinecap +} def +/Lcr { + setlinecap +} def +/Sbp { + newpath +} def +/Sep { + /sfill exch def + closepath + /salign exch def + Lcs + salign 0 eq { + sfill Sfill + gsave + Slw 2 mul setlinewidth + clip + Slrgb setrgbcolor + S + grestore + } if + salign 1 eq { + sfill Sfill + Slw setlinewidth + Slrgb setrgbcolor + S + } if + salign 2 eq { + gsave + Slw 2 mul setlinewidth + Slrgb setrgbcolor + S + grestore + sfill Sfill + } if + newpath + Lcr +} def +/Sbpa { + newpath +} def +/Sepa { + Slw setlinewidth + Slrgb setrgbcolor + currentlinejoin + 1 setlinejoin + S + setlinejoin + newpath +} def +/Stransrot { + /anglep exch def + yratio mul + /y exch def + xratio mul + /x exch def + x y translate + anglep rotate + x neg y neg translate +} def +/cp {currentpoint} def +/M {moveto} def +/rm {rmoveto} def +/S { + Slw 0.000 eq { + newpath + } if + Slw 0.000 ne { + stroke + } if +} def +/L {Slw setlinewidth Slrgb setrgbcolor lineto Lcs S Lcr} def +/PL {Slw setlinewidth Slrgb setrgbcolor lineto} def +/MF-Helvetica { + /newfontname exch def + /fontname exch def + /fontdict fontname findfont def + /newfont fontdict maxlength dict def + fontdict { + exch dup /FID eq {pop pop} {exch newfont 3 1 roll put} ifelse + } forall + newfont /FontName newfontname put + newfont /Encoding ISOLatin1Encoding put + newfontname newfont definefont pop +} def +/Helvetica /Helvetica-0 MF-Helvetica +/Slw 0.120 def +0.918 0.949 0.953 setrgbcolor +0 0 396.000 288.000 Sbgfill +/Sfill { + /sfill exch def + sfill 1 eq { + Ssrgb setrgbcolor + gsave + fill + grestore + } if +} def +/Sstroke { + /sstroke exch def + sstroke 1 eq { + Slw setlinewidth + Slrgb setrgbcolor + S + } if + newpath +} def +/Slrgb {1.000 1.000 1.000} def +/Strgb {1.000 1.000 1.000} def +/Ssrgb {1.000 1.000 1.000} def +/Slw 0.576 def +0 0 31999 23272 0 1 Srect +23 23 31976 23249 1 0 Srect +16045 6677 31184 22457 0 1 Srect +16068 6700 31161 22434 1 0 Srect +/Slrgb {0.000 0.000 0.000} def +/Strgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +16045 9034 31184 9034 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +16045 12723 31184 12723 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +16045 16412 31184 16412 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +16045 20101 31184 20101 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.432 def +27849 6677 27849 22457 Sln +/Slw 0.864 def +/Slrgb {0.502 0.502 0.502} def +16045 10878 16371 10878 Sln +16510 10878 16836 10878 Sln +16975 10878 17301 10878 Sln +17440 10878 17766 10878 Sln +17906 10878 18232 10878 Sln +18371 10878 18697 10878 Sln +18836 10878 19162 10878 Sln +19301 10878 19627 10878 Sln +19767 10878 20093 10878 Sln +20232 10878 20558 10878 Sln +20697 10878 21023 10878 Sln +21162 10878 21488 10878 Sln +21628 10878 21953 10878 Sln +22093 10878 22419 10878 Sln +22558 10878 22884 10878 Sln +23023 10878 23349 10878 Sln +23488 10878 23814 10878 Sln +23954 10878 24280 10878 Sln +24419 10878 24745 10878 Sln +24884 10878 25210 10878 Sln +25349 10878 25675 10878 Sln +25815 10878 26141 10878 Sln +26280 10878 26606 10878 Sln +26745 10878 27071 10878 Sln +27210 10878 27536 10878 Sln +27676 10878 28001 10878 Sln +28141 10878 28467 10878 Sln +28606 10878 28932 10878 Sln +29071 10878 29397 10878 Sln +29536 10878 29862 10878 Sln +30002 10878 30328 10878 Sln +30467 10878 30793 10878 Sln +30932 10878 31184 10878 Sln +16045 14567 16371 14567 Sln +16510 14567 16836 14567 Sln +16975 14567 17301 14567 Sln +17440 14567 17766 14567 Sln +17906 14567 18232 14567 Sln +18371 14567 18697 14567 Sln +18836 14567 19162 14567 Sln +19301 14567 19627 14567 Sln +19767 14567 20093 14567 Sln +20232 14567 20558 14567 Sln +20697 14567 21023 14567 Sln +21162 14567 21488 14567 Sln +21628 14567 21953 14567 Sln +22093 14567 22419 14567 Sln +22558 14567 22884 14567 Sln +23023 14567 23349 14567 Sln +23488 14567 23814 14567 Sln +23954 14567 24280 14567 Sln +24419 14567 24745 14567 Sln +24884 14567 25210 14567 Sln +25349 14567 25675 14567 Sln +25815 14567 26141 14567 Sln +26280 14567 26606 14567 Sln +26745 14567 27071 14567 Sln +27210 14567 27536 14567 Sln +27676 14567 28001 14567 Sln +28141 14567 28467 14567 Sln +28606 14567 28932 14567 Sln +29071 14567 29397 14567 Sln +29536 14567 29862 14567 Sln +30002 14567 30328 14567 Sln +30467 14567 30793 14567 Sln +30932 14567 31184 14567 Sln +16045 18256 16371 18256 Sln +16510 18256 16836 18256 Sln +16975 18256 17301 18256 Sln +17440 18256 17766 18256 Sln +17906 18256 18232 18256 Sln +18371 18256 18697 18256 Sln +18836 18256 19162 18256 Sln +19301 18256 19627 18256 Sln +19767 18256 20093 18256 Sln +20232 18256 20558 18256 Sln +20697 18256 21023 18256 Sln +21162 18256 21488 18256 Sln +21628 18256 21953 18256 Sln +22093 18256 22419 18256 Sln +22558 18256 22884 18256 Sln +23023 18256 23349 18256 Sln +23488 18256 23814 18256 Sln +23954 18256 24280 18256 Sln +24419 18256 24745 18256 Sln +24884 18256 25210 18256 Sln +25349 18256 25675 18256 Sln +25815 18256 26141 18256 Sln +26280 18256 26606 18256 Sln +26745 18256 27071 18256 Sln +27210 18256 27536 18256 Sln +27676 18256 28001 18256 Sln +28141 18256 28467 18256 Sln +28606 18256 28932 18256 Sln +29071 18256 29397 18256 Sln +29536 18256 29862 18256 Sln +30002 18256 30328 18256 Sln +30467 18256 30793 18256 Sln +30932 18256 31184 18256 Sln +/Ssrgb {0.282 0.424 0.549} def +/Slw 4.032 def +/Slrgb {0.800 0.800 1.000} def +27339 9956 28682 9956 Sln +25389 13645 26911 13645 Sln +22324 17334 23690 17334 Sln +16562 21023 17907 21023 Sln +/Slw 0.864 def +/Slrgb {0.302 0.302 1.000} def +/Ssrgb {0.302 0.302 1.000} def +27692 9637 28328 10273 0 1 Srect +27727 9672 28293 10238 1 0 Srect +25831 13326 26467 13962 0 1 Srect +25866 13361 26432 13927 1 0 Srect +22688 17016 23324 17652 0 1 Srect +22723 17051 23289 17617 1 0 Srect +16916 20705 17552 21341 0 1 Srect +16951 20740 17517 21306 1 0 Srect +/Ssrgb {0.467 0.569 0.349} def +/Slw 4.032 def +/Slrgb {1.000 0.800 0.800} def +25846 8111 27611 8111 Sln +28546 11800 30471 11800 Sln +24795 15490 26548 15490 Sln +23810 19179 25426 19179 Sln +/Slw 0.864 def +/Slrgb {0.835 0.000 0.000} def +/Ssrgb {0.835 0.000 0.000} def +26728 8111 449 0 1 Sdia +26728 8111 400 1 0 Sdia +29508 11800 449 0 1 Sdia +29508 11800 400 1 0 Sdia +25671 15489 449 0 1 Sdia +25671 15489 400 1 0 Sdia +24617 19178 449 0 1 Sdia +24617 19178 400 1 0 Sdia +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +16045 6677 16045 22457 Sln +15884 8695 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(All Immigrants \(misp.\)) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(All Immigrants \(misp.\)) Stxtl +(All Immigrants \(misp.\)) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +15884 12384 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(Perc. cultural distance index) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(Perc. cultural distance index) Stxtl +(Perc. cultural distance index) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +15884 16073 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(Perc. economic weakness index) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(Perc. economic weakness index) Stxtl +(Perc. economic weakness index) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +15884 19762 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(Perc. free-riding index) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(Perc. free-riding index) Stxtl +(Perc. free-riding index) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +16045 6677 31184 6677 Sln +16557 6677 16557 6354 Sln +16557 5513 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(-.4) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(-.4) Stxtl +(-.4) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +19380 6677 19380 6354 Sln +19380 5513 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(-.3) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(-.3) Stxtl +(-.3) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +22203 6677 22203 6354 Sln +22203 5513 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(-.2) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(-.2) Stxtl +(-.2) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +25026 6677 25026 6354 Sln +25026 5513 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(-.1) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(-.1) Stxtl +(-.1) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +27849 6677 27849 6354 Sln +27849 5513 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(0) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(0) Stxtl +(0) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +30672 6677 30672 6354 Sln +30672 5513 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(.1) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(.1) Stxtl +(.1) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +23615 4463 0 +/Helvetica-0 findfont 970 yratio mul scalefont setfont +(Correlation) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 970 +(Correlation) Stxtl +(Correlation) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +/Ssrgb {1.000 1.000 1.000} def +17930 1094 29300 3731 0 1 Srect +17953 1117 29277 3708 1 0 Srect +/Slw 0.864 def +/Slrgb {0.302 0.302 1.000} def +/Ssrgb {0.302 0.302 1.000} def +18244 2660 18880 3296 0 1 Srect +18279 2695 18845 3261 1 0 Srect +/Slrgb {0.835 0.000 0.000} def +/Ssrgb {0.835 0.000 0.000} def +18562 1847 449 0 1 Sdia +18562 1847 400 1 0 Sdia +19330 2695 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(Support for Immigration) Stxtl +(Support for Immigration) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +19330 1564 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(Support for Redistribution) Stxtl +(Support for Redistribution) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +S showpage +%%EOF diff --git a/37/replication_package/Out/Figures/Figure_2.png b/37/replication_package/Out/Figures/Figure_2.png new file mode 100644 index 0000000000000000000000000000000000000000..d9c9c93ef76c52698a8f14e1360d82f6a9e7c972 --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d451878c4bae4b772cd9caaa6eb6ec84a89bff1db12d9ba47fe7ad0bb46662b +size 212081 diff --git a/37/replication_package/Out/Figures/Figure_3_A.png b/37/replication_package/Out/Figures/Figure_3_A.png new file mode 100644 index 0000000000000000000000000000000000000000..d4afef30d1a5d9de3e9ca2c9e6403521d9f69b39 --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_3_A.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b544da05440710db29be20aa4a114f879fa5fd1b8b093b22d0aff0fcea4d43d +size 219142 diff --git a/37/replication_package/Out/Figures/Figure_3_B.png b/37/replication_package/Out/Figures/Figure_3_B.png new file mode 100644 index 0000000000000000000000000000000000000000..33a12f5085efb7098dc2f2519a657ff9c641ac6f --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_3_B.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e858e2770d7acff7179fca0d7b4975c96ad662abc5975a6c634e7f27036b283 +size 218566 diff --git a/37/replication_package/Out/Figures/Figure_4_A.png b/37/replication_package/Out/Figures/Figure_4_A.png new file mode 100644 index 0000000000000000000000000000000000000000..f291c8cd43fba39e5e2d021a301e26398392b70d --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_4_A.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:321316ebbf873712015462e13c69a0535b09f36e15719a354420d771f02f2ee5 +size 230558 diff --git a/37/replication_package/Out/Figures/Figure_4_B.png b/37/replication_package/Out/Figures/Figure_4_B.png new file mode 100644 index 0000000000000000000000000000000000000000..469dc1844902047bc39cc13e42051eb3c84f40f9 --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_4_B.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1c00eb9d4a2e3014319d586996befb82ac18c47ef477196a3f67e5d885ea9e0 +size 224854 diff --git a/37/replication_package/Out/Figures/Figure_5_A.png b/37/replication_package/Out/Figures/Figure_5_A.png new file mode 100644 index 0000000000000000000000000000000000000000..e873d96da7be038509153edef28bd5e9ea6d7259 --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_5_A.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77cae3ddde194578a04033509dabf312b22fe9c4c31d30fb1df214adda5ae271 +size 202326 diff --git a/37/replication_package/Out/Figures/Figure_5_B.png b/37/replication_package/Out/Figures/Figure_5_B.png new file mode 100644 index 0000000000000000000000000000000000000000..0489c6f1e0780b5ca34df2079871cde56a8c8aa5 --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_5_B.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd3295f41a7901a04bdea6e543b711a392cce844e7483d5f4e386dfaf2c1f34e +size 212453 diff --git a/37/replication_package/Out/Figures/Figure_6_A.png b/37/replication_package/Out/Figures/Figure_6_A.png new file mode 100644 index 0000000000000000000000000000000000000000..b133485842007838e46aefcf08d8c54048a7250f --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_6_A.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2aac3ef1c48ae0196886ab52fb9271a0c1ee375e4530783371b4f9ee1d845a1 +size 197894 diff --git a/37/replication_package/Out/Figures/Figure_6_B.png b/37/replication_package/Out/Figures/Figure_6_B.png new file mode 100644 index 0000000000000000000000000000000000000000..87cf7ef0a389dd35acb537339ad383d0996ff1ac --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_6_B.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15a831e5af649ee0ccdc95fdc316f140dc834f825f5720c494db4dc2677e0f6e +size 194940 diff --git a/37/replication_package/Out/Figures/Figure_7.png b/37/replication_package/Out/Figures/Figure_7.png new file mode 100644 index 0000000000000000000000000000000000000000..60a8abecbf5515026c778882e5128cf2f35378bd --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a11a74d1cf9e914267e74986c29abc1c6bae1481d7bc86010d74e2b1cac0805 +size 213996 diff --git a/37/replication_package/Out/Figures/Figure_8_A.eps b/37/replication_package/Out/Figures/Figure_8_A.eps new file mode 100644 index 0000000000000000000000000000000000000000..cbd1c831f44778d64e9a4099450bf99a33482761 --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_8_A.eps @@ -0,0 +1,984 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%% This is a Stata generated postscript file +%%BoundingBox: 0 0 396 288 +%%HiResBoundingBox: 0.000 0.000 396.000 288.000 +%%DocumentNeededResources: font Helvetica +/xratio 0.012375 def +/yratio 0.012375 def +/Sbgfill { + /y1 exch def + /x1 exch def + /y0 exch def + /x0 exch def + x0 y0 moveto + x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto + fill +} def +/Spt { + yratio mul + /yp exch def + xratio mul + /xp exch def + Slrgb setrgbcolor + xp yp .5 0 360 arc fill +} def +/Sln { + yratio mul + /y1p exch def + xratio mul + /x1p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Slw setlinewidth + Slrgb setrgbcolor + x0p y0p M x1p y1p lineto S +} def +/Scrv { + yratio mul + /y3p exch def + xratio mul + /x3p exch def + yratio mul + /y2p exch def + xratio mul + /x2p exch def + yratio mul + /y1p exch def + xratio mul + /x1p exch def + Slw setlinewidth + Slrgb setrgbcolor + x1p y1p x2p y2p x3p y3p curveto + S +} def +/Stxtl { + /sp exch def + yratio mul + /sizep exch def + dup + /anglep exch def + 0 exch sub + /angle2p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Strgb setrgbcolor + x0p y0p M anglep rotate sizep fntsize sp show stroke angle2p rotate +} def +/Stxtc { + /sp exch def + yratio mul + /sizep exch def + dup + /anglep exch def + 0 exch sub + /angle2p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Strgb setrgbcolor + x0p y0p M anglep rotate sizep fntsize sp stringwidth exch -2 div exch rm sp show stroke angle2p rotate +} def +/Stxtr { + /sp exch def + yratio mul + /sizep exch def + dup + /anglep exch def + 0 exch sub + /angle2p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Strgb setrgbcolor + x0p y0p M anglep rotate sizep fntsize sp stringwidth 1 index -1 mul exch rm pop sp show stroke angle2p rotate +} def +/Srect { + /sfill exch def + /sstroke exch def + yratio mul + /y1 exch def + xratio mul + /x1 exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto closepath + sfill Sfill + sstroke Sstroke +} def +/Sellipse { + /sfill exch def + /sstroke exch def + yratio mul + /yrad exch def + xratio mul + /xrad exch def + yratio mul + /y exch def + xratio mul + /x exch def + /savematrix matrix currentmatrix def + x y translate + xrad yrad scale + 0 0 1 0 360 arc + savematrix setmatrix + sfill Sfill + sstroke Sstroke +} def +/Stri { + /sfill exch def + /sstroke exch def + xratio mul + /r exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + /xcen x0 def + y0 r add + /ytop exch def + r 2 div + y0 exch sub + /ybot exch def + r 3 sqrt 2 div mul dup + xcen exch sub + /xleft exch def + xcen add + /xright exch def + newpath xcen ytop moveto xright ybot lineto xleft ybot lineto xcen ytop lineto closepath + sfill Sfill + sstroke Sstroke +} def +/Soldtri { + /sfill exch def + xratio mul + /r exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + x0 r sub + /x1 exch def + y0 r sub + /y1 exch def + x0 r add + /x2 exch def + y0 r sub + /y2 exch def + /x3 x0 def + y0 r add + /y3 exch def + newpath x1 y1 moveto x2 y2 lineto x3 y3 lineto x1 y1 lineto closepath + sfill 1 eq { + Ssrgb setrgbcolor + gsave + fill + grestore + } if + Slw setlinewidth + Slrgb setrgbcolor + S +} def +/Sdia { + /sfill exch def + /sstroke exch def + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + x r sub + /x0 exch def + /y0 y def + /x1 x def + y r sub + /y1 exch def + x r add + /x2 exch def + /y2 y def + /x3 x def + y r add + /y3 exch def + newpath x0 y0 moveto x1 y1 lineto x2 y2 lineto x3 y3 lineto closepath + sfill Sfill + sstroke Sstroke +} def +/Scc { + /sfill exch def + /sstroke exch def + xratio mul + /r0 exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + x0 y0 r0 0 360 arc closepath + sfill Sfill + sstroke Sstroke +} def +/Spie { + /sfill exch def + /salign exch def + /a1 exch def + /a0 exch def + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + /Pie { + x y moveto x y r a0 a1 arc closepath + } def + newpath Pie + sfill Sfill + Slrgb setrgbcolor + salign 0 eq { + gsave + Slw 2 mul setlinewidth + clip + S + grestore + } if + salign 1 eq { + Slw setlinewidth + S + } if + salign 2 eq { + gsave + Slw 2 mul setlinewidth + strokepath + pathbbox + /ury exch def + /urx exch def + /lly exch def + /llx exch def + newpath llx lly moveto llx ury lineto urx ury lineto urx lly lineto closepath + Pie + eoclip + newpath Pie + S + grestore + } if + newpath +} def +/Splu { + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + x r sub + /x0 exch def + x r add + /x1 exch def + x0 y M x1 y L + y r sub + /y0 exch def + y r add + /y1 exch def + x y0 M x y1 L +} def +/Scro { + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + x r sub + /x0 exch def + y r sub + /y0 exch def + x r add + /x1 exch def + y r add + /y1 exch def + x0 y0 M x1 y1 L + x r add + /x0 exch def + y r sub + /y0 exch def + x r sub + /x1 exch def + y r add + /y1 exch def + x0 y0 M x1 y1 L +} def +/Sm { + yratio mul + /y exch def + xratio mul + /x exch def + x y M +} def +/Sl { + yratio mul + /y exch def + xratio mul + /x exch def + x y L +} def +/SPl { + yratio mul + /y exch def + xratio mul + /x exch def + x y PL +} def +/Sarr { + /sfill exch def + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + y r add + /ytop exch def + y r sub + /ybot exch def + gsave + Slrgb setrgbcolor + sfill 0 eq { + r 2 mul 3 div dup + x exch sub + /xleft exch def + x add + /xright exch def + newpath xleft y moveto x ytop lineto xright y lineto x ytop moveto x ybot lineto + Lcs + 1 setlinejoin + } { + r 2 div dup + x exch sub + /xleft exch def + x add + /xright exch def + newpath xleft y moveto x ytop lineto xright y lineto x ytop closepath moveto x ybot lineto + gsave + fill + grestore + } ifelse + Slw setlinewidth + S + grestore +} def +/Spipe { + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + y r sub + /y0 exch def + y r add + /y1 exch def + x y0 M x y1 L +} def +/Sv { + xratio mul + /r exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + /xcen x0 def + y0 r add + /ytop exch def + r 2 div + y0 exch sub + /ybot exch def + r 3 sqrt 2 div mul dup + xcen exch sub + /xleft exch def + xcen add + /xright exch def + newpath xleft ytop moveto xcen ybot lineto xright ytop lineto + Slw setlinewidth + Slrgb setrgbcolor + S +} def +/Lcs { + currentlinecap + 1 setlinecap +} def +/Lcr { + setlinecap +} def +/Sbp { + newpath +} def +/Sep { + /sfill exch def + closepath + /salign exch def + Lcs + salign 0 eq { + sfill Sfill + gsave + Slw 2 mul setlinewidth + clip + Slrgb setrgbcolor + S + grestore + } if + salign 1 eq { + sfill Sfill + Slw setlinewidth + Slrgb setrgbcolor + S + } if + salign 2 eq { + gsave + Slw 2 mul setlinewidth + Slrgb setrgbcolor + S + grestore + sfill Sfill + } if + newpath + Lcr +} def +/Sbpa { + newpath +} def +/Sepa { + Slw setlinewidth + Slrgb setrgbcolor + currentlinejoin + 1 setlinejoin + S + setlinejoin + newpath +} def +/Stransrot { + /anglep exch def + yratio mul + /y exch def + xratio mul + /x exch def + x y translate + anglep rotate + x neg y neg translate +} def +/cp {currentpoint} def +/M {moveto} def +/rm {rmoveto} def +/S { + Slw 0.000 eq { + newpath + } if + Slw 0.000 ne { + stroke + } if +} def +/L {Slw setlinewidth Slrgb setrgbcolor lineto Lcs S Lcr} def +/PL {Slw setlinewidth Slrgb setrgbcolor lineto} def +/MF-Helvetica { + /newfontname exch def + /fontname exch def + /fontdict fontname findfont def + /newfont fontdict maxlength dict def + fontdict { + exch dup /FID eq {pop pop} {exch newfont 3 1 roll put} ifelse + } forall + newfont /FontName newfontname put + newfont /Encoding ISOLatin1Encoding put + newfontname newfont definefont pop +} def +/Helvetica /Helvetica-0 MF-Helvetica +/Slw 0.120 def +0.918 0.949 0.953 setrgbcolor +0 0 396.000 288.000 Sbgfill +/Sfill { + /sfill exch def + sfill 1 eq { + Ssrgb setrgbcolor + gsave + fill + grestore + } if +} def +/Sstroke { + /sstroke exch def + sstroke 1 eq { + Slw setlinewidth + Slrgb setrgbcolor + S + } if + newpath +} def +/Slrgb {1.000 1.000 1.000} def +/Strgb {1.000 1.000 1.000} def +/Ssrgb {1.000 1.000 1.000} def +/Slw 0.576 def +0 0 31999 23272 0 1 Srect +23 23 31976 23249 1 0 Srect +15486 6031 31184 22457 0 1 Srect +15509 6054 31161 22434 1 0 Srect +/Slrgb {0.000 0.000 0.000} def +/Strgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +15486 9007 31184 9007 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +15486 12088 31184 12088 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +15486 15168 31184 15168 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +15486 18249 31184 18249 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +15486 21329 31184 21329 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {0.878 0.878 0.878} def +15486 9007 15812 9007 Sln +15951 9007 16277 9007 Sln +16416 9007 16742 9007 Sln +16882 9007 17208 9007 Sln +17347 9007 17673 9007 Sln +17812 9007 18138 9007 Sln +18277 9007 18603 9007 Sln +18743 9007 19069 9007 Sln +19208 9007 19534 9007 Sln +19673 9007 19999 9007 Sln +20138 9007 20464 9007 Sln +20604 9007 20929 9007 Sln +21069 9007 21395 9007 Sln +21534 9007 21860 9007 Sln +21999 9007 22325 9007 Sln +22464 9007 22790 9007 Sln +22930 9007 23256 9007 Sln +23395 9007 23721 9007 Sln +23860 9007 24186 9007 Sln +24325 9007 24651 9007 Sln +24791 9007 25117 9007 Sln +25256 9007 25582 9007 Sln +25721 9007 26047 9007 Sln +26186 9007 26512 9007 Sln +26652 9007 26977 9007 Sln +27117 9007 27443 9007 Sln +27582 9007 27908 9007 Sln +28047 9007 28373 9007 Sln +28512 9007 28838 9007 Sln +28978 9007 29304 9007 Sln +29443 9007 29769 9007 Sln +29908 9007 30234 9007 Sln +30373 9007 30699 9007 Sln +30839 9007 31165 9007 Sln +15486 12088 15812 12088 Sln +15951 12088 16277 12088 Sln +16416 12088 16742 12088 Sln +16882 12088 17208 12088 Sln +17347 12088 17673 12088 Sln +17812 12088 18138 12088 Sln +18277 12088 18603 12088 Sln +18743 12088 19069 12088 Sln +19208 12088 19534 12088 Sln +19673 12088 19999 12088 Sln +20138 12088 20464 12088 Sln +20604 12088 20929 12088 Sln +21069 12088 21395 12088 Sln +21534 12088 21860 12088 Sln +21999 12088 22325 12088 Sln +22464 12088 22790 12088 Sln +22930 12088 23256 12088 Sln +23395 12088 23721 12088 Sln +23860 12088 24186 12088 Sln +24325 12088 24651 12088 Sln +24791 12088 25117 12088 Sln +25256 12088 25582 12088 Sln +25721 12088 26047 12088 Sln +26186 12088 26512 12088 Sln +26652 12088 26977 12088 Sln +27117 12088 27443 12088 Sln +27582 12088 27908 12088 Sln +28047 12088 28373 12088 Sln +28512 12088 28838 12088 Sln +28978 12088 29304 12088 Sln +29443 12088 29769 12088 Sln +29908 12088 30234 12088 Sln +30373 12088 30699 12088 Sln +30839 12088 31165 12088 Sln +15486 15168 15812 15168 Sln +15951 15168 16277 15168 Sln +16416 15168 16742 15168 Sln +16882 15168 17208 15168 Sln +17347 15168 17673 15168 Sln +17812 15168 18138 15168 Sln +18277 15168 18603 15168 Sln +18743 15168 19069 15168 Sln +19208 15168 19534 15168 Sln +19673 15168 19999 15168 Sln +20138 15168 20464 15168 Sln +20604 15168 20929 15168 Sln +21069 15168 21395 15168 Sln +21534 15168 21860 15168 Sln +21999 15168 22325 15168 Sln +22464 15168 22790 15168 Sln +22930 15168 23256 15168 Sln +23395 15168 23721 15168 Sln +23860 15168 24186 15168 Sln +24325 15168 24651 15168 Sln +24791 15168 25117 15168 Sln +25256 15168 25582 15168 Sln +25721 15168 26047 15168 Sln +26186 15168 26512 15168 Sln +26652 15168 26977 15168 Sln +27117 15168 27443 15168 Sln +27582 15168 27908 15168 Sln +28047 15168 28373 15168 Sln +28512 15168 28838 15168 Sln +28978 15168 29304 15168 Sln +29443 15168 29769 15168 Sln +29908 15168 30234 15168 Sln +30373 15168 30699 15168 Sln +30839 15168 31165 15168 Sln +15486 18249 15812 18249 Sln +15951 18249 16277 18249 Sln +16416 18249 16742 18249 Sln +16882 18249 17208 18249 Sln +17347 18249 17673 18249 Sln +17812 18249 18138 18249 Sln +18277 18249 18603 18249 Sln +18743 18249 19069 18249 Sln +19208 18249 19534 18249 Sln +19673 18249 19999 18249 Sln +20138 18249 20464 18249 Sln +20604 18249 20929 18249 Sln +21069 18249 21395 18249 Sln +21534 18249 21860 18249 Sln +21999 18249 22325 18249 Sln +22464 18249 22790 18249 Sln +22930 18249 23256 18249 Sln +23395 18249 23721 18249 Sln +23860 18249 24186 18249 Sln +24325 18249 24651 18249 Sln +24791 18249 25117 18249 Sln +25256 18249 25582 18249 Sln +25721 18249 26047 18249 Sln +26186 18249 26512 18249 Sln +26652 18249 26977 18249 Sln +27117 18249 27443 18249 Sln +27582 18249 27908 18249 Sln +28047 18249 28373 18249 Sln +28512 18249 28838 18249 Sln +28978 18249 29304 18249 Sln +29443 18249 29769 18249 Sln +29908 18249 30234 18249 Sln +30373 18249 30699 18249 Sln +30839 18249 31165 18249 Sln +15486 21329 15812 21329 Sln +15951 21329 16277 21329 Sln +16416 21329 16742 21329 Sln +16882 21329 17208 21329 Sln +17347 21329 17673 21329 Sln +17812 21329 18138 21329 Sln +18277 21329 18603 21329 Sln +18743 21329 19069 21329 Sln +19208 21329 19534 21329 Sln +19673 21329 19999 21329 Sln +20138 21329 20464 21329 Sln +20604 21329 20929 21329 Sln +21069 21329 21395 21329 Sln +21534 21329 21860 21329 Sln +21999 21329 22325 21329 Sln +22464 21329 22790 21329 Sln +22930 21329 23256 21329 Sln +23395 21329 23721 21329 Sln +23860 21329 24186 21329 Sln +24325 21329 24651 21329 Sln +24791 21329 25117 21329 Sln +25256 21329 25582 21329 Sln +25721 21329 26047 21329 Sln +26186 21329 26512 21329 Sln +26652 21329 26977 21329 Sln +27117 21329 27443 21329 Sln +27582 21329 27908 21329 Sln +28047 21329 28373 21329 Sln +28512 21329 28838 21329 Sln +28978 21329 29304 21329 Sln +29443 21329 29769 21329 Sln +29908 21329 30234 21329 Sln +30373 21329 30699 21329 Sln +30839 21329 31165 21329 Sln +/Slrgb {1.000 0.000 0.000} def +/Ssrgb {1.000 0.000 0.000} def +20098 9007 449 0 1 Sdia +20098 9007 400 1 0 Sdia +20479 12087 449 0 1 Sdia +20479 12087 400 1 0 Sdia +30466 15168 449 0 1 Sdia +30466 15168 400 1 0 Sdia +29698 18248 449 0 1 Sdia +29698 18248 400 1 0 Sdia +20586 21329 449 0 1 Sdia +20586 21329 400 1 0 Sdia +/Slrgb {0.000 0.000 1.000} def +/Ssrgb {0.000 0.000 1.000} def +16081 9007 318 0 1 Scc +16081 9007 283 1 0 Scc +21797 12087 318 0 1 Scc +21797 12087 283 1 0 Scc +28143 15168 318 0 1 Scc +28143 15168 283 1 0 Scc +23338 18248 318 0 1 Scc +23338 18248 283 1 0 Scc +19590 21329 318 0 1 Scc +19590 21329 283 1 0 Scc +/Slrgb {0.000 0.376 0.000} def +/Ssrgb {0.000 0.376 0.000} def +17253 8689 17889 9325 0 1 Srect +17288 8724 17854 9290 1 0 Srect +21796 11769 22432 12405 0 1 Srect +21831 11804 22397 12370 1 0 Srect +26187 14850 26823 15486 0 1 Srect +26222 14885 26788 15451 1 0 Srect +25822 17930 26458 18566 0 1 Srect +25857 17965 26423 18531 1 0 Srect +18844 21011 19480 21647 0 1 Srect +18879 21046 19445 21612 1 0 Srect +/Slrgb {1.000 0.498 0.000} def +/Ssrgb {1.000 0.498 0.000} def +15997 9007 447 0 1 Stri +15997 9007 377 1 0 Stri +23305 12087 447 0 1 Stri +23305 12087 377 1 0 Stri +24840 15168 447 0 1 Stri +24840 15168 377 1 0 Stri +24632 18248 447 0 1 Stri +24632 18248 377 1 0 Stri +18699 21329 447 0 1 Stri +18699 21329 377 1 0 Stri +/Slrgb {0.000 0.000 0.000} def +/Ssrgb {0.000 0.000 0.000} def +16963 9007 318 0 1 Scc +16963 9007 283 1 0 Scc +24360 12087 318 0 1 Scc +24360 12087 283 1 0 Scc +27209 15168 318 0 1 Scc +27209 15168 283 1 0 Scc +24132 18248 318 0 1 Scc +24132 18248 283 1 0 Scc +19720 21329 318 0 1 Scc +19720 21329 283 1 0 Scc +/Slrgb {0.502 0.000 0.502} def +/Ssrgb {0.502 0.000 0.502} def +17295 9007 257 Scro +25889 12087 257 Scro +30672 15168 257 Scro +25387 18248 257 Scro +21981 21329 257 Scro +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +15486 6031 15486 22457 Sln +15324 8696 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(Imm. not a problem) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(Imm. not a problem) Stxtl +(Imm. not a problem) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +15324 11777 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(Imm. should get benefits soon) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(Imm. should get benefits soon) Stxtl +(Imm. should get benefits soon) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +15324 14857 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(Imm. allowed to get citiz. soon) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(Imm. allowed to get citiz. soon) Stxtl +(Imm. allowed to get citiz. soon) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +15324 17938 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(American upon citiz. or before) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(American upon citiz. or before) Stxtl +(American upon citiz. or before) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +15324 21018 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(Govt. should care about everyone) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(Govt. should care about everyone) Stxtl +(Govt. should care about everyone) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +15486 6031 31184 6031 Sln +16270 6031 16270 5707 Sln +16270 4980 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(.2) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(.2) Stxtl +(.2) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +20745 6031 20745 5707 Sln +20745 4980 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(.4) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(.4) Stxtl +(.4) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +25219 6031 25219 5707 Sln +25219 4980 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(.6) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(.6) Stxtl +(.6) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +29694 6031 29694 5707 Sln +29694 4980 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(.8) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(.8) Stxtl +(.8) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +23335 4091 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(Share Answering Yes) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(Share Answering Yes) Stxtl +(Share Answering Yes) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +/Ssrgb {1.000 1.000 1.000} def +17512 1094 29159 3408 0 1 Srect +17535 1117 29136 3385 1 0 Srect +/Slw 0.864 def +/Slrgb {1.000 0.000 0.000} def +/Ssrgb {1.000 0.000 0.000} def +18144 2776 449 0 1 Sdia +18144 2776 400 1 0 Sdia +/Slrgb {0.000 0.000 1.000} def +/Ssrgb {0.000 0.000 1.000} def +21356 2776 318 0 1 Scc +21356 2776 283 1 0 Scc +/Slrgb {0.000 0.376 0.000} def +/Ssrgb {0.000 0.376 0.000} def +25612 2458 26248 3094 0 1 Srect +25647 2493 26213 3059 1 0 Srect +/Slrgb {1.000 0.498 0.000} def +/Ssrgb {1.000 0.498 0.000} def +18144 1806 447 0 1 Stri +18144 1806 377 1 0 Stri +/Slrgb {0.000 0.000 0.000} def +/Ssrgb {0.000 0.000 0.000} def +21356 1806 318 0 1 Scc +21356 1806 283 1 0 Scc +/Slrgb {0.502 0.000 0.502} def +/Ssrgb {0.502 0.000 0.502} def +25930 1806 257 Scro +18911 2589 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 535 +(US) Stxtl +(US) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +22124 2589 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 535 +(UK) Stxtl +(UK) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +26778 2589 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 535 +(France) Stxtl +(France) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +18911 1619 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 535 +(Italy) Stxtl +(Italy) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +22124 1619 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 535 +(Germany) Stxtl +(Germany) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +26778 1619 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 535 +(Sweden) Stxtl +(Sweden) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +S showpage +%%EOF diff --git a/37/replication_package/Out/Figures/Figure_8_B.eps b/37/replication_package/Out/Figures/Figure_8_B.eps new file mode 100644 index 0000000000000000000000000000000000000000..0347f2715b4badcfb231ef2c091ab09a835112d3 --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_8_B.eps @@ -0,0 +1,1012 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%% This is a Stata generated postscript file +%%BoundingBox: 0 0 396 288 +%%HiResBoundingBox: 0.000 0.000 396.000 288.000 +%%DocumentNeededResources: font Helvetica +/xratio 0.012375 def +/yratio 0.012375 def +/Sbgfill { + /y1 exch def + /x1 exch def + /y0 exch def + /x0 exch def + x0 y0 moveto + x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto + fill +} def +/Spt { + yratio mul + /yp exch def + xratio mul + /xp exch def + Slrgb setrgbcolor + xp yp .5 0 360 arc fill +} def +/Sln { + yratio mul + /y1p exch def + xratio mul + /x1p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Slw setlinewidth + Slrgb setrgbcolor + x0p y0p M x1p y1p lineto S +} def +/Scrv { + yratio mul + /y3p exch def + xratio mul + /x3p exch def + yratio mul + /y2p exch def + xratio mul + /x2p exch def + yratio mul + /y1p exch def + xratio mul + /x1p exch def + Slw setlinewidth + Slrgb setrgbcolor + x1p y1p x2p y2p x3p y3p curveto + S +} def +/Stxtl { + /sp exch def + yratio mul + /sizep exch def + dup + /anglep exch def + 0 exch sub + /angle2p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Strgb setrgbcolor + x0p y0p M anglep rotate sizep fntsize sp show stroke angle2p rotate +} def +/Stxtc { + /sp exch def + yratio mul + /sizep exch def + dup + /anglep exch def + 0 exch sub + /angle2p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Strgb setrgbcolor + x0p y0p M anglep rotate sizep fntsize sp stringwidth exch -2 div exch rm sp show stroke angle2p rotate +} def +/Stxtr { + /sp exch def + yratio mul + /sizep exch def + dup + /anglep exch def + 0 exch sub + /angle2p exch def + yratio mul + /y0p exch def + xratio mul + /x0p exch def + Strgb setrgbcolor + x0p y0p M anglep rotate sizep fntsize sp stringwidth 1 index -1 mul exch rm pop sp show stroke angle2p rotate +} def +/Srect { + /sfill exch def + /sstroke exch def + yratio mul + /y1 exch def + xratio mul + /x1 exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto closepath + sfill Sfill + sstroke Sstroke +} def +/Sellipse { + /sfill exch def + /sstroke exch def + yratio mul + /yrad exch def + xratio mul + /xrad exch def + yratio mul + /y exch def + xratio mul + /x exch def + /savematrix matrix currentmatrix def + x y translate + xrad yrad scale + 0 0 1 0 360 arc + savematrix setmatrix + sfill Sfill + sstroke Sstroke +} def +/Stri { + /sfill exch def + /sstroke exch def + xratio mul + /r exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + /xcen x0 def + y0 r add + /ytop exch def + r 2 div + y0 exch sub + /ybot exch def + r 3 sqrt 2 div mul dup + xcen exch sub + /xleft exch def + xcen add + /xright exch def + newpath xcen ytop moveto xright ybot lineto xleft ybot lineto xcen ytop lineto closepath + sfill Sfill + sstroke Sstroke +} def +/Soldtri { + /sfill exch def + xratio mul + /r exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + x0 r sub + /x1 exch def + y0 r sub + /y1 exch def + x0 r add + /x2 exch def + y0 r sub + /y2 exch def + /x3 x0 def + y0 r add + /y3 exch def + newpath x1 y1 moveto x2 y2 lineto x3 y3 lineto x1 y1 lineto closepath + sfill 1 eq { + Ssrgb setrgbcolor + gsave + fill + grestore + } if + Slw setlinewidth + Slrgb setrgbcolor + S +} def +/Sdia { + /sfill exch def + /sstroke exch def + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + x r sub + /x0 exch def + /y0 y def + /x1 x def + y r sub + /y1 exch def + x r add + /x2 exch def + /y2 y def + /x3 x def + y r add + /y3 exch def + newpath x0 y0 moveto x1 y1 lineto x2 y2 lineto x3 y3 lineto closepath + sfill Sfill + sstroke Sstroke +} def +/Scc { + /sfill exch def + /sstroke exch def + xratio mul + /r0 exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + x0 y0 r0 0 360 arc closepath + sfill Sfill + sstroke Sstroke +} def +/Spie { + /sfill exch def + /salign exch def + /a1 exch def + /a0 exch def + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + /Pie { + x y moveto x y r a0 a1 arc closepath + } def + newpath Pie + sfill Sfill + Slrgb setrgbcolor + salign 0 eq { + gsave + Slw 2 mul setlinewidth + clip + S + grestore + } if + salign 1 eq { + Slw setlinewidth + S + } if + salign 2 eq { + gsave + Slw 2 mul setlinewidth + strokepath + pathbbox + /ury exch def + /urx exch def + /lly exch def + /llx exch def + newpath llx lly moveto llx ury lineto urx ury lineto urx lly lineto closepath + Pie + eoclip + newpath Pie + S + grestore + } if + newpath +} def +/Splu { + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + x r sub + /x0 exch def + x r add + /x1 exch def + x0 y M x1 y L + y r sub + /y0 exch def + y r add + /y1 exch def + x y0 M x y1 L +} def +/Scro { + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + x r sub + /x0 exch def + y r sub + /y0 exch def + x r add + /x1 exch def + y r add + /y1 exch def + x0 y0 M x1 y1 L + x r add + /x0 exch def + y r sub + /y0 exch def + x r sub + /x1 exch def + y r add + /y1 exch def + x0 y0 M x1 y1 L +} def +/Sm { + yratio mul + /y exch def + xratio mul + /x exch def + x y M +} def +/Sl { + yratio mul + /y exch def + xratio mul + /x exch def + x y L +} def +/SPl { + yratio mul + /y exch def + xratio mul + /x exch def + x y PL +} def +/Sarr { + /sfill exch def + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + y r add + /ytop exch def + y r sub + /ybot exch def + gsave + Slrgb setrgbcolor + sfill 0 eq { + r 2 mul 3 div dup + x exch sub + /xleft exch def + x add + /xright exch def + newpath xleft y moveto x ytop lineto xright y lineto x ytop moveto x ybot lineto + Lcs + 1 setlinejoin + } { + r 2 div dup + x exch sub + /xleft exch def + x add + /xright exch def + newpath xleft y moveto x ytop lineto xright y lineto x ytop closepath moveto x ybot lineto + gsave + fill + grestore + } ifelse + Slw setlinewidth + S + grestore +} def +/Spipe { + xratio mul + /r exch def + yratio mul + /y exch def + xratio mul + /x exch def + y r sub + /y0 exch def + y r add + /y1 exch def + x y0 M x y1 L +} def +/Sv { + xratio mul + /r exch def + yratio mul + /y0 exch def + xratio mul + /x0 exch def + /xcen x0 def + y0 r add + /ytop exch def + r 2 div + y0 exch sub + /ybot exch def + r 3 sqrt 2 div mul dup + xcen exch sub + /xleft exch def + xcen add + /xright exch def + newpath xleft ytop moveto xcen ybot lineto xright ytop lineto + Slw setlinewidth + Slrgb setrgbcolor + S +} def +/Lcs { + currentlinecap + 1 setlinecap +} def +/Lcr { + setlinecap +} def +/Sbp { + newpath +} def +/Sep { + /sfill exch def + closepath + /salign exch def + Lcs + salign 0 eq { + sfill Sfill + gsave + Slw 2 mul setlinewidth + clip + Slrgb setrgbcolor + S + grestore + } if + salign 1 eq { + sfill Sfill + Slw setlinewidth + Slrgb setrgbcolor + S + } if + salign 2 eq { + gsave + Slw 2 mul setlinewidth + Slrgb setrgbcolor + S + grestore + sfill Sfill + } if + newpath + Lcr +} def +/Sbpa { + newpath +} def +/Sepa { + Slw setlinewidth + Slrgb setrgbcolor + currentlinejoin + 1 setlinejoin + S + setlinejoin + newpath +} def +/Stransrot { + /anglep exch def + yratio mul + /y exch def + xratio mul + /x exch def + x y translate + anglep rotate + x neg y neg translate +} def +/cp {currentpoint} def +/M {moveto} def +/rm {rmoveto} def +/S { + Slw 0.000 eq { + newpath + } if + Slw 0.000 ne { + stroke + } if +} def +/L {Slw setlinewidth Slrgb setrgbcolor lineto Lcs S Lcr} def +/PL {Slw setlinewidth Slrgb setrgbcolor lineto} def +/MF-Helvetica { + /newfontname exch def + /fontname exch def + /fontdict fontname findfont def + /newfont fontdict maxlength dict def + fontdict { + exch dup /FID eq {pop pop} {exch newfont 3 1 roll put} ifelse + } forall + newfont /FontName newfontname put + newfont /Encoding ISOLatin1Encoding put + newfontname newfont definefont pop +} def +/Helvetica /Helvetica-0 MF-Helvetica +/Slw 0.120 def +0.918 0.949 0.953 setrgbcolor +0 0 396.000 288.000 Sbgfill +/Sfill { + /sfill exch def + sfill 1 eq { + Ssrgb setrgbcolor + gsave + fill + grestore + } if +} def +/Sstroke { + /sstroke exch def + sstroke 1 eq { + Slw setlinewidth + Slrgb setrgbcolor + S + } if + newpath +} def +/Slrgb {1.000 1.000 1.000} def +/Strgb {1.000 1.000 1.000} def +/Ssrgb {1.000 1.000 1.000} def +/Slw 0.576 def +0 0 31999 23272 0 1 Srect +23 23 31976 23249 1 0 Srect +14310 7485 31184 22457 0 1 Srect +14333 7508 31161 22434 1 0 Srect +/Slrgb {0.000 0.000 0.000} def +/Strgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +14310 10229 31184 10229 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +14310 13019 31184 13019 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +14310 15808 31184 15808 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +14310 18598 31184 18598 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {1.000 1.000 1.000} def +14310 21388 31184 21388 Sln +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +/Slw 0.864 def +/Slrgb {0.878 0.878 0.878} def +14310 10229 14636 10229 Sln +14775 10229 15101 10229 Sln +15240 10229 15566 10229 Sln +15706 10229 16032 10229 Sln +16171 10229 16497 10229 Sln +16636 10229 16962 10229 Sln +17101 10229 17427 10229 Sln +17567 10229 17892 10229 Sln +18032 10229 18358 10229 Sln +18497 10229 18823 10229 Sln +18962 10229 19288 10229 Sln +19427 10229 19753 10229 Sln +19893 10229 20219 10229 Sln +20358 10229 20684 10229 Sln +20823 10229 21149 10229 Sln +21288 10229 21614 10229 Sln +21754 10229 22080 10229 Sln +22219 10229 22545 10229 Sln +22684 10229 23010 10229 Sln +23149 10229 23475 10229 Sln +23615 10229 23940 10229 Sln +24080 10229 24406 10229 Sln +24545 10229 24871 10229 Sln +25010 10229 25336 10229 Sln +25475 10229 25801 10229 Sln +25941 10229 26267 10229 Sln +26406 10229 26732 10229 Sln +26871 10229 27197 10229 Sln +27336 10229 27662 10229 Sln +27802 10229 28128 10229 Sln +28267 10229 28593 10229 Sln +28732 10229 29058 10229 Sln +29197 10229 29523 10229 Sln +29663 10229 29988 10229 Sln +30128 10229 30454 10229 Sln +30593 10229 30919 10229 Sln +31058 10229 31184 10229 Sln +14310 13019 14636 13019 Sln +14775 13019 15101 13019 Sln +15240 13019 15566 13019 Sln +15706 13019 16032 13019 Sln +16171 13019 16497 13019 Sln +16636 13019 16962 13019 Sln +17101 13019 17427 13019 Sln +17567 13019 17892 13019 Sln +18032 13019 18358 13019 Sln +18497 13019 18823 13019 Sln +18962 13019 19288 13019 Sln +19427 13019 19753 13019 Sln +19893 13019 20219 13019 Sln +20358 13019 20684 13019 Sln +20823 13019 21149 13019 Sln +21288 13019 21614 13019 Sln +21754 13019 22080 13019 Sln +22219 13019 22545 13019 Sln +22684 13019 23010 13019 Sln +23149 13019 23475 13019 Sln +23615 13019 23940 13019 Sln +24080 13019 24406 13019 Sln +24545 13019 24871 13019 Sln +25010 13019 25336 13019 Sln +25475 13019 25801 13019 Sln +25941 13019 26267 13019 Sln +26406 13019 26732 13019 Sln +26871 13019 27197 13019 Sln +27336 13019 27662 13019 Sln +27802 13019 28128 13019 Sln +28267 13019 28593 13019 Sln +28732 13019 29058 13019 Sln +29197 13019 29523 13019 Sln +29663 13019 29988 13019 Sln +30128 13019 30454 13019 Sln +30593 13019 30919 13019 Sln +31058 13019 31184 13019 Sln +14310 15808 14636 15808 Sln +14775 15808 15101 15808 Sln +15240 15808 15566 15808 Sln +15706 15808 16032 15808 Sln +16171 15808 16497 15808 Sln +16636 15808 16962 15808 Sln +17101 15808 17427 15808 Sln +17567 15808 17892 15808 Sln +18032 15808 18358 15808 Sln +18497 15808 18823 15808 Sln +18962 15808 19288 15808 Sln +19427 15808 19753 15808 Sln +19893 15808 20219 15808 Sln +20358 15808 20684 15808 Sln +20823 15808 21149 15808 Sln +21288 15808 21614 15808 Sln +21754 15808 22080 15808 Sln +22219 15808 22545 15808 Sln +22684 15808 23010 15808 Sln +23149 15808 23475 15808 Sln +23615 15808 23940 15808 Sln +24080 15808 24406 15808 Sln +24545 15808 24871 15808 Sln +25010 15808 25336 15808 Sln +25475 15808 25801 15808 Sln +25941 15808 26267 15808 Sln +26406 15808 26732 15808 Sln +26871 15808 27197 15808 Sln +27336 15808 27662 15808 Sln +27802 15808 28128 15808 Sln +28267 15808 28593 15808 Sln +28732 15808 29058 15808 Sln +29197 15808 29523 15808 Sln +29663 15808 29988 15808 Sln +30128 15808 30454 15808 Sln +30593 15808 30919 15808 Sln +31058 15808 31184 15808 Sln +14310 18598 14636 18598 Sln +14775 18598 15101 18598 Sln +15240 18598 15566 18598 Sln +15706 18598 16032 18598 Sln +16171 18598 16497 18598 Sln +16636 18598 16962 18598 Sln +17101 18598 17427 18598 Sln +17567 18598 17892 18598 Sln +18032 18598 18358 18598 Sln +18497 18598 18823 18598 Sln +18962 18598 19288 18598 Sln +19427 18598 19753 18598 Sln +19893 18598 20219 18598 Sln +20358 18598 20684 18598 Sln +20823 18598 21149 18598 Sln +21288 18598 21614 18598 Sln +21754 18598 22080 18598 Sln +22219 18598 22545 18598 Sln +22684 18598 23010 18598 Sln +23149 18598 23475 18598 Sln +23615 18598 23940 18598 Sln +24080 18598 24406 18598 Sln +24545 18598 24871 18598 Sln +25010 18598 25336 18598 Sln +25475 18598 25801 18598 Sln +25941 18598 26267 18598 Sln +26406 18598 26732 18598 Sln +26871 18598 27197 18598 Sln +27336 18598 27662 18598 Sln +27802 18598 28128 18598 Sln +28267 18598 28593 18598 Sln +28732 18598 29058 18598 Sln +29197 18598 29523 18598 Sln +29663 18598 29988 18598 Sln +30128 18598 30454 18598 Sln +30593 18598 30919 18598 Sln +31058 18598 31184 18598 Sln +14310 21388 14636 21388 Sln +14775 21388 15101 21388 Sln +15240 21388 15566 21388 Sln +15706 21388 16032 21388 Sln +16171 21388 16497 21388 Sln +16636 21388 16962 21388 Sln +17101 21388 17427 21388 Sln +17567 21388 17892 21388 Sln +18032 21388 18358 21388 Sln +18497 21388 18823 21388 Sln +18962 21388 19288 21388 Sln +19427 21388 19753 21388 Sln +19893 21388 20219 21388 Sln +20358 21388 20684 21388 Sln +20823 21388 21149 21388 Sln +21288 21388 21614 21388 Sln +21754 21388 22080 21388 Sln +22219 21388 22545 21388 Sln +22684 21388 23010 21388 Sln +23149 21388 23475 21388 Sln +23615 21388 23940 21388 Sln +24080 21388 24406 21388 Sln +24545 21388 24871 21388 Sln +25010 21388 25336 21388 Sln +25475 21388 25801 21388 Sln +25941 21388 26267 21388 Sln +26406 21388 26732 21388 Sln +26871 21388 27197 21388 Sln +27336 21388 27662 21388 Sln +27802 21388 28128 21388 Sln +28267 21388 28593 21388 Sln +28732 21388 29058 21388 Sln +29197 21388 29523 21388 Sln +29663 21388 29988 21388 Sln +30128 21388 30454 21388 Sln +30593 21388 30919 21388 Sln +31058 21388 31184 21388 Sln +/Slrgb {0.510 0.753 0.914} def +/Ssrgb {0.510 0.753 0.914} def +20210 9910 20846 10546 0 1 Srect +20245 9945 20811 10511 1 0 Srect +25831 12700 26467 13336 0 1 Srect +25866 12735 26432 13301 1 0 Srect +30354 15490 30990 16126 0 1 Srect +30389 15525 30955 16091 1 0 Srect +27936 18279 28572 18915 0 1 Srect +27971 18314 28537 18880 1 0 Srect +22908 21069 23544 21705 0 1 Srect +22943 21104 23509 21670 1 0 Srect +/Slrgb {0.565 0.208 0.231} def +/Ssrgb {0.565 0.208 0.231} def +15375 10228 449 0 1 Sdia +15375 10228 400 1 0 Sdia +20527 13018 449 0 1 Sdia +20527 13018 400 1 0 Sdia +26698 15808 449 0 1 Sdia +26698 15808 400 1 0 Sdia +24667 18597 449 0 1 Sdia +24667 18597 400 1 0 Sdia +17760 21387 449 0 1 Sdia +17760 21387 400 1 0 Sdia +/Slrgb {0.000 0.376 0.000} def +/Ssrgb {0.000 0.376 0.000} def +20024 10228 318 0 1 Scc +20024 10228 283 1 0 Scc +24665 13018 318 0 1 Scc +24665 13018 283 1 0 Scc +30021 15808 318 0 1 Scc +30021 15808 283 1 0 Scc +28236 18597 318 0 1 Scc +28236 18597 283 1 0 Scc +21801 21387 318 0 1 Scc +21801 21387 283 1 0 Scc +/Slrgb {0.769 0.769 0.000} def +/Ssrgb {0.769 0.769 0.000} def +16990 10228 447 0 1 Stri +16990 10228 377 1 0 Stri +23143 13018 447 0 1 Stri +23143 13018 377 1 0 Stri +28109 15808 447 0 1 Stri +28109 15808 377 1 0 Stri +25597 18597 447 0 1 Stri +25597 18597 377 1 0 Stri +19974 21387 447 0 1 Stri +19974 21387 377 1 0 Stri +/Slw 1.296 def +/Slrgb {1.000 0.498 0.000} def +/Ssrgb {1.000 0.498 0.000} def +16095 10228 364 Splu +22878 13018 364 Splu +27380 15808 364 Splu +25077 18597 364 Splu +19110 21387 364 Splu +/Slrgb {0.000 0.000 0.000} def +/Ssrgb {0.000 0.000 0.000} def +19660 10228 400 Scro +25303 13018 400 Scro +30415 15808 400 Scro +28263 18597 400 Scro +21963 21387 400 Scro +/Slrgb {0.102 0.278 0.435} def +/Ssrgb {0.102 0.278 0.435} def +19047 10228 364 Spipe +23727 13018 364 Spipe +29292 15808 364 Spipe +27074 18597 364 Spipe +21290 21387 364 Spipe +/Slw 0.576 def +/Slrgb {0.000 0.000 0.000} def +14310 7485 14310 22457 Sln +14148 9918 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(Imm. not a problem) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(Imm. not a problem) Stxtl +(Imm. not a problem) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +14148 12708 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(Imm. should get benefits soon) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(Imm. should get benefits soon) Stxtl +(Imm. should get benefits soon) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +14148 15497 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(Imm. allowed to get citiz. soon) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(Imm. allowed to get citiz. soon) Stxtl +(Imm. allowed to get citiz. soon) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +14148 18287 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(American upon citiz. or before) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(American upon citiz. or before) Stxtl +(American upon citiz. or before) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +14148 21077 0 +/Helvetica-0 findfont 889 yratio mul scalefont setfont +(Govt. should care about everyone) stringwidth pop add +xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 889 +(Govt. should care about everyone) Stxtl +(Govt. should care about everyone) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +14310 7485 31184 7485 Sln +14822 7485 14822 7162 Sln +14822 6434 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(.1) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(.1) Stxtl +(.1) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +19418 7485 19418 7162 Sln +19418 6434 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(.3) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(.3) Stxtl +(.3) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +24015 7485 24015 7162 Sln +24015 6434 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(.5) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(.5) Stxtl +(.5) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +28611 7485 28611 7162 Sln +28611 6434 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(.7) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(.7) Stxtl +(.7) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +22747 5545 0 +/Helvetica-0 findfont 808 yratio mul scalefont setfont +(Share Answering Yes) stringwidth pop add +2 div xratio div +dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 808 +(Share Answering Yes) Stxtl +(Share Answering Yes) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +/Ssrgb {1.000 1.000 1.000} def +14589 1094 30905 4863 0 1 Srect +14612 1117 30882 4840 1 0 Srect +/Slw 0.864 def +/Slrgb {0.510 0.753 0.914} def +/Ssrgb {0.510 0.753 0.914} def +14953 3913 15589 4549 0 1 Srect +14988 3948 15554 4514 1 0 Srect +/Slrgb {0.565 0.208 0.231} def +/Ssrgb {0.565 0.208 0.231} def +19843 4231 449 0 1 Sdia +19843 4231 400 1 0 Sdia +/Slrgb {0.000 0.376 0.000} def +/Ssrgb {0.000 0.376 0.000} def +26210 4231 318 0 1 Scc +26210 4231 283 1 0 Scc +/Slrgb {0.769 0.769 0.000} def +/Ssrgb {0.769 0.769 0.000} def +15271 3059 447 0 1 Stri +15271 3059 377 1 0 Stri +/Slw 1.296 def +/Slrgb {1.000 0.498 0.000} def +/Ssrgb {1.000 0.498 0.000} def +19843 3059 364 Splu +/Slrgb {0.000 0.000 0.000} def +/Ssrgb {0.000 0.000 0.000} def +26210 3059 400 Scro +/Slrgb {0.102 0.278 0.435} def +/Ssrgb {0.102 0.278 0.435} def +15271 1806 364 Spipe +16046 4052 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 512 +(Left-Wing) Stxtl +(Left-Wing) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +20619 4052 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 512 +(Right-Wing) Stxtl +(Right-Wing) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +27171 4052 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 512 +(College) Stxtl +(College) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +16046 2880 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 512 +(No College) Stxtl +(No College) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +20619 2880 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 512 +(H Imm, No college) Stxtl +(H Imm, No college) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +27171 2880 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 512 +(H Imm, College) Stxtl +(H Imm, College) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +16046 1627 2 copy +/fntsize {/Helvetica-0 findfont exch scalefont setfont } def +0.000 512 +(No H Imm) Stxtl +(No H Imm) stringwidth pop xratio div +dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy +pop pop pop pop +S showpage +%%EOF diff --git a/37/replication_package/Out/Figures/Figure_9.png b/37/replication_package/Out/Figures/Figure_9.png new file mode 100644 index 0000000000000000000000000000000000000000..300324e073801a73b181c8ef7d8511362ab5a7c9 --- /dev/null +++ b/37/replication_package/Out/Figures/Figure_9.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9010e77799b02b5adbafe6216cabd38ade2b998d77e4b6ae7de1113e2e1606e8 +size 128655 diff --git a/37/replication_package/Out/Figures_data/figure_2_l_data.csv b/37/replication_package/Out/Figures_data/figure_2_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..8e50fde660e85bbb40f89a7e8194559060e5da75 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_2_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd4087f539d8e489e474a36d37af83927ddd0ffbba4f420bbe8fc8db20fe1b46 +size 796 diff --git a/37/replication_package/Out/Figures_data/figure_2_r_data.csv b/37/replication_package/Out/Figures_data/figure_2_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..07f9873975acda7bd0c7068fce8a7115e6a9cb44 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_2_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1030d3d29f95f753e565d178fc302ad791a2d214966f90dbe7c0a1023e949d09 +size 1323 diff --git a/37/replication_package/Out/Figures_data/figure_3_a_l_data.csv b/37/replication_package/Out/Figures_data/figure_3_a_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..ead2acf37e76105abe9695c38309105ee067d800 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_3_a_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69667da753d97d3eff35c7b40d71b8574b8489d1a43c41c1c06abc60425c18b7 +size 788 diff --git a/37/replication_package/Out/Figures_data/figure_3_a_r_data.csv b/37/replication_package/Out/Figures_data/figure_3_a_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..5e6d3f8e3825567417019256f298ea90284900fb --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_3_a_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4687ee4bf802f5a63b5087f1bf9b390238a93a05257141e00d087d2c057f2ce +size 1299 diff --git a/37/replication_package/Out/Figures_data/figure_3_b_l_data.csv b/37/replication_package/Out/Figures_data/figure_3_b_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..0b8a2e28bf81f7f5e8dd96ff34035cbf1cc59469 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_3_b_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dde8e196e7d45c5029603b3a057c88bc1c47564a5e87400da2b845f43b1bcaf2 +size 789 diff --git a/37/replication_package/Out/Figures_data/figure_3_b_r_data.csv b/37/replication_package/Out/Figures_data/figure_3_b_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..25a21a00d2acdb042b185b46f95e1a9ccddfe538 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_3_b_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60b8ec421e56b23b86a5a01aa2255e1682230020a3fb3c3b017468626c3c9ba4 +size 1335 diff --git a/37/replication_package/Out/Figures_data/figure_4_a_l_data.csv b/37/replication_package/Out/Figures_data/figure_4_a_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..7cff9b38c8e6e34662d2683f64601c652d70899f --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_4_a_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bb8a6c3930f2ddf615ec577460145df533b71c43fc1b1e1d08bbb2c66ddaca5 +size 1166 diff --git a/37/replication_package/Out/Figures_data/figure_4_a_r_data.csv b/37/replication_package/Out/Figures_data/figure_4_a_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..1f0e24e5f5d60fefe5550b3c10fa2462b68eb090 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_4_a_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6db5373b60bc04518319a25f028c8bcc47462e51fda65cb8e1af9643b410a79 +size 2056 diff --git a/37/replication_package/Out/Figures_data/figure_4_b_l_data.csv b/37/replication_package/Out/Figures_data/figure_4_b_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..c2d39ea9d2c23b89e10c66815400da6b91cfd3d8 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_4_b_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e2a2cf523dc741038b9708b118b82e74cc1413458b3881e3d3e83158dd76579 +size 1106 diff --git a/37/replication_package/Out/Figures_data/figure_4_b_r_data.csv b/37/replication_package/Out/Figures_data/figure_4_b_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..731cc5bc516de70435d548af44581ceb27853e56 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_4_b_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95bb5ead4e422fe00114df0e74cff355b0451713a045c0c9aff3d97ee8ff26ed +size 2003 diff --git a/37/replication_package/Out/Figures_data/figure_5_a_l_data.csv b/37/replication_package/Out/Figures_data/figure_5_a_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..71272bb90e4923c7e47463249ba17bf96e628fe2 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_5_a_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72905b29247b82d4460e10cd9da441c660f6c9f76a9390e3232e61bac13cf37f +size 797 diff --git a/37/replication_package/Out/Figures_data/figure_5_a_r_data.csv b/37/replication_package/Out/Figures_data/figure_5_a_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..a914057c55e7d7664e51674d5434c12ce7c44d74 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_5_a_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db7eaf13651c0674400d9248ea00d0b19c537dc7110a29737ad9cf5b9da8238b +size 1296 diff --git a/37/replication_package/Out/Figures_data/figure_5_b_l_data.csv b/37/replication_package/Out/Figures_data/figure_5_b_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..59c6c4c7b63f61821548ebc84c5dc8573515adaf --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_5_b_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b97095d6730b73717268f0dffc4a45d8aec354a5295d2394b66536eee60bfe32 +size 802 diff --git a/37/replication_package/Out/Figures_data/figure_5_b_r_data.csv b/37/replication_package/Out/Figures_data/figure_5_b_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..02c357cf942d39dd559265ee46c02aa7dd651b33 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_5_b_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4356043377052e96517881be34d0d06e2e32b1029b3f8604e2634592f23313c7 +size 1298 diff --git a/37/replication_package/Out/Figures_data/figure_6_a_l_data.csv b/37/replication_package/Out/Figures_data/figure_6_a_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..06067ee3567d342206ad41c9cc791e5bfa1a24cb --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_6_a_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68c36f6af057a69c9e8c0a28e31f81bdac67cce5264e6ac604cf8ba7d8a3aefd +size 762 diff --git a/37/replication_package/Out/Figures_data/figure_6_a_r_data.csv b/37/replication_package/Out/Figures_data/figure_6_a_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..92ef0c21207c031634c2f6699ee40d1f3475c6df --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_6_a_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95993d8557189c6c0a2bb6c097b9d4d14a67ba403fe9a69cc9f327701c1ffd8a +size 1297 diff --git a/37/replication_package/Out/Figures_data/figure_6_b_l_data.csv b/37/replication_package/Out/Figures_data/figure_6_b_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..99b2153e47c11bb21530cc974d2a06994d219849 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_6_b_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a57382fc11acb2acdb1dd84ca31da357e659f8e596aff894d18868e712b719b9 +size 761 diff --git a/37/replication_package/Out/Figures_data/figure_6_b_r_data.csv b/37/replication_package/Out/Figures_data/figure_6_b_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..f6c337939027e7a818ef90aafbe130cedb8646b1 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_6_b_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0157efb894dfa858d04b6f8b77fb362d243814ddaf2b012ac60d23a1b860503 +size 1292 diff --git a/37/replication_package/Out/Figures_data/figure_7_l_data.csv b/37/replication_package/Out/Figures_data/figure_7_l_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..526f4b0d06a962ad20cc13909e613efe7061f0e0 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_7_l_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2426af609319a5974735255146cabcb85ac469b00eb78e1112214f32f22961cc +size 1091 diff --git a/37/replication_package/Out/Figures_data/figure_7_r_data.csv b/37/replication_package/Out/Figures_data/figure_7_r_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..55372f64191706fdfcf4183280c17c7b37ce8280 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_7_r_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d2e8c7e85cf06e06d1810196719086f0e32a1a4ba5b21b25c179a9e7384aa02 +size 2011 diff --git a/37/replication_package/Out/Figures_data/figure_9_data.csv b/37/replication_package/Out/Figures_data/figure_9_data.csv new file mode 100644 index 0000000000000000000000000000000000000000..767f6254c06979acc3c1b288c2fe9af5a35e1115 --- /dev/null +++ b/37/replication_package/Out/Figures_data/figure_9_data.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57c3d5d52419a944962c17b7118700c8b1a40a37f0539384d67e16af74f1e754 +size 875 diff --git a/37/replication_package/Out/Tables/corr_matrix.tex b/37/replication_package/Out/Tables/corr_matrix.tex new file mode 100644 index 0000000000000000000000000000000000000000..c9556fe0af5615a3744fe78815c8203a02670abf --- /dev/null +++ b/37/replication_package/Out/Tables/corr_matrix.tex @@ -0,0 +1,42 @@ +\begin{tabular}{lcccccccccc} +& \multicolumn{8}{l}{\textbf{Panel A: Correlation of Perceived Immigrants Characteristics with Actual Immigrants Characteristics}} \\ +& Share of & Imm. from Latin & Imm. from & Imm. from & Imm. from & Unemployment & No High & College-educated & Poverty & Muslim \\ +& Immigrants & America & Africa & Asia & Europe & Imm. & School Imm. & Imm. & Imm. & Imm. \\ +& (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) \\ \hline +\addlinespace +Local correlation& 0.203\sym{***}& 0.0859\sym{***}& 0.155\sym{***}& 0.139\sym{***}& 0.155\sym{***}& 0.585\sym{***}& 0.0718 & 0.0600 \\ + & (0.0453) & (0.0303) & (0.0566) & (0.0295) & (0.0280) & (0.147) & (0.0545) & (0.0457) \\ +\addlinespace +National correlation& -0.517\sym{***}& 0.478\sym{***}& 0.517\sym{***}& 0.376\sym{***}& 0.268\sym{***}& 1.054\sym{***}& 0.725\sym{***}& 0.324\sym{***}& 0.333\sym{***}& 0.786\sym{***}\\ + & (0.118) & (0.0146) & (0.0171) & (0.0207) & (0.0146) & (0.0743) & (0.0327) & (0.0225) & (0.0502) & (0.0236) \\ +\\ & \multicolumn{10}{l}{\textbf{Panel B: Correlation of Perceived Immigrants Characteristics with Actual Non-immigrants Characteristics}} \\ +& Unemployment & No High & College-educated & Poverty \\ +& Imm. & School Imm. & Imm. & Imm. \\ +& (1) & (2) & (3) & (4) \\ \hline +\addlinespace +Local correlation& 0.896\sym{***}& 0.110 & 0.0974\sym{**} & 0.440\sym{***}\\ + & (0.132) & (0.0858) & (0.0418) & (0.0711) \\ +\addlinespace +National correlation& 1.503\sym{***}& 0.486\sym{***}& 0.640\sym{***}& 0.0376 \\ + & (0.142) & (0.0403) & (0.0351) & (0.132) \\ +\\ & \multicolumn{10}{l}{\textbf{Panel C: Correlation of Perceived Immigrants Characteristics with Actual Immigrants - Non-immigrants Differences}} \\ +& Unemployment & No High & College-educated & Poverty \\ +& Imm. & School Imm. & Imm. & Imm. \\ +& (1) & (2) & (3) & (4) \\ \hline +\addlinespace +Local correlation& -0.468\sym{***}& 0.0354 & -0.0413 \\ + & (0.142) & (0.0660) & (0.0433) \\ +\addlinespace +National correlation& 1.287\sym{***}& 0.768\sym{***}& 0.256\sym{***}& 0.438\sym{***}\\ + & (0.106) & (0.0443) & (0.0477) & (0.0582) \\ +\\ & \multicolumn{10}{l}{\textbf{Panel D: Correlation of Perceived Non-immigrants Characteristics with Actual Non-immigrants Characteristics}} \\ +& Unemployment & No High & College-educated & Poverty \\ +& Nat. & School Nat. & Nat. & Nat. \\ +& (1) & (2) & (3) & (4) \\ \hline +\addlinespace +Local correlation& 0.782\sym{***}& 0.232\sym{***}& 0.0692\sym{*} & 0.350\sym{***}\\ + & (0.104) & (0.0821) & (0.0419) & (0.0614) \\ +\addlinespace +National correlation& 1.941\sym{***}& 0.535\sym{***}& 0.160\sym{***}& -0.462\sym{***}\\ + & (0.112) & (0.0386) & (0.0384) & (0.113) \\ +\hline \end{tabular} diff --git a/37/replication_package/Out/Tables/summary_stats_sample_by_country_final.tex b/37/replication_package/Out/Tables/summary_stats_sample_by_country_final.tex new file mode 100644 index 0000000000000000000000000000000000000000..489b4870e65ba7cf67ee3a9aa3e1986a4648172b --- /dev/null +++ b/37/replication_package/Out/Tables/summary_stats_sample_by_country_final.tex @@ -0,0 +1,19 @@ +\begin{tabular}{lcccccccccccc} +\hline \noalign{\smallskip} & \multicolumn{2}{c}{US} & \multicolumn{2}{c}{UK} & \multicolumn{2}{c}{France} & \multicolumn{2}{c}{Italy} & \multicolumn{2}{c}{Germany} & \multicolumn{2}{c}{Sweden}\\ +\hline & Sample & Pop & Sample & Pop & Sample & Pop & Sample & Pop & Sample & Pop & Sample & Pop\\ + & (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12)\\ +\noalign{\smallskip}\hline \noalign{\smallskip}Male & 0.48 & 0.49 & 0.48 & 0.48 & 0.49 & 0.49 & 0.50 & 0.50 & 0.50 & 0.49 & 0.50 & 0.50\\ +18-29 y.o. & 0.24 & 0.24 & 0.24 & 0.26 & 0.23 & 0.23 & 0.19 & 0.19 & 0.23 & 0.22 & 0.22 & 0.24\\ +30-39 y.o. & 0.19 & 0.20 & 0.18 & 0.19 & 0.19 & 0.20 & 0.22 & 0.22 & 0.17 & 0.18 & 0.19 & 0.19\\ +40-49 y.o. & 0.19 & 0.19 & 0.22 & 0.21 & 0.22 & 0.21 & 0.24 & 0.23 & 0.20 & 0.20 & 0.20 & 0.21\\ +50-59 y.o. & 0.21 & 0.20 & 0.19 & 0.18 & 0.20 & 0.20 & 0.19 & 0.19 & 0.23 & 0.23 & 0.19 & 0.18\\ +60-69 y.o. & 0.18 & 0.17 & 0.17 & 0.16 & 0.16 & 0.15 & 0.16 & 0.17 & 0.16 & 0.17 & 0.19 & 0.18\\ +Income Bracket 1 & 0.16 & 0.16 & 0.30 & 0.31 & 0.30 & 0.32 & 0.28 & 0.27 & 0.25 & 0.26 & 0.33 & 0.33\\ +Income Bracket 2 & 0.19 & 0.19 & 0.35 & 0.35 & 0.31 & 0.30 & 0.29 & 0.28 & 0.29 & 0.29 & 0.28 & 0.29\\ +Income Bracket 3 & 0.22 & 0.22 & 0.12 & 0.11 & 0.14 & 0.14 & 0.20 & 0.19 & 0.23 & 0.23 & 0.22 & 0.22\\ +Income Bracket 4 & 0.43 & 0.43 & 0.24 & 0.23 & 0.25 & 0.24 & 0.23 & 0.26 & 0.22 & 0.22 & 0.17 & 0.17\\ +Married & 0.51 & 0.49 & 0.52 & 0.41 & 0.42 & 0.46 & 0.58 & 0.46 & 0.47 & 0.46 & 0.34 & 0.33\\ +Employed & 0.60 & 0.70 & 0.68 & 0.74 & 0.64 & 0.65 & 0.65 & 0.57 & 0.65 & 0.75 & 0.72 & 0.77\\ +Unemployed & 0.08 & 0.05 & 0.04 & 0.05 & 0.10 & 0.09 & 0.11 & 0.11 & 0.04 & 0.04 & 0.04 & 0.05\\ +College & 0.51 & 0.41 & 0.37 & 0.36 & 0.50 & 0.31 & 0.36 & 0.16 & 0.27 & 0.25 & 0.43 & 0.36\\ +\noalign{\smallskip}\hline\end{tabular}\\ diff --git a/37/replication_package/Out/Tables/table_1stage.tex b/37/replication_package/Out/Tables/table_1stage.tex new file mode 100644 index 0000000000000000000000000000000000000000..f66c720681f289ab17eee36a1bf40cdbf9a77f9b --- /dev/null +++ b/37/replication_package/Out/Tables/table_1stage.tex @@ -0,0 +1,18 @@ +\begin{tabular}{lccccccc} +& All & Accurate Perception & M. East and & N. America, W. and & Muslim & Christian & Lack of Effort \\ +& Immigrants & All Immigrants & N. Africa & E. Europe & & & Reason Poor \\ +& (misp.) & & (misp.) & (misp.) & (misp.) & (misp.) & \\ +& (1) & (2) & (3) & (4) & (5) & (6) & (7) \\ \hline +\addlinespace +T: Share of Immigrants& -4.864\sym{***}& 0.227\sym{***}& -0.248 & 0.173 & 0.00857 & 0.144 & 0.000297 \\ + & (0.411) &(0.00691) & (0.313) & (0.357) & (0.419) & (0.397) &(0.00921) \\ +\addlinespace +T: Origin of Immigrants& 2.315\sym{***}& 0.00251 & -4.794\sym{***}& 1.827\sym{***}& -1.829\sym{***}& 2.456\sym{***}&-0.000234 \\ + & (0.426) &(0.00411) & (0.295) & (0.356) & (0.405) & (0.397) &(0.00925) \\ +\addlinespace +T: Hard Work & 0.709\sym{*} & -0.00420 & -0.385 & 0.378 & -0.869\sym{**} & 0.796\sym{**} & -0.0535\sym{***}\\ + & (0.409) &(0.00396) & (0.308) & (0.352) & (0.404) & (0.393) &(0.00899) \\ +\addlinespace +Observations & 19735 & 19735 & 19747 & 19728 & 19761 & 19757 & 19721 \\ +Control mean & 17.02 & 0.04 & 12.60 & -5.56 & 11.30 & -23.98 & 0.36 \\ +\hline \end{tabular} diff --git a/37/replication_package/Out/Tables/table_2stage_immigration.tex b/37/replication_package/Out/Tables/table_2stage_immigration.tex new file mode 100644 index 0000000000000000000000000000000000000000..6de73eaa9aca102682f3e349540cb37201661a15 --- /dev/null +++ b/37/replication_package/Out/Tables/table_2stage_immigration.tex @@ -0,0 +1,17 @@ +\begin{tabular}{lcccccc} +& Imm. Not & Imm. Benefits & Imm. Citizenship & American & Govt. Should care & Imm Support \\ +& A Problem & Soon & Soon & Upon Citizenship/Before & About Everyone & Index \\ +& (1) & (2) & (3) & (4) & (5) & (6) \\ \hline +\addlinespace +T: Share of Immigrants& 0.0242\sym{***}& 0.00991 & 0.0158\sym{*} & 0.00508 & -0.00395 & 0.0364\sym{**} \\ + &(0.00825) &(0.00959) &(0.00857) &(0.00936) & (0.0359) & (0.0181) \\ +\addlinespace +T: Origin of Immigrants& 0.00527 & 0.00360 & 0.000649 & 0.00448 & -0.00222 & 0.00877 \\ + &(0.00822) &(0.00961) &(0.00863) &(0.00937) & (0.0361) & (0.0182) \\ +\addlinespace +T: Hard Work & 0.0252\sym{***}& 0.0202\sym{**} & 0.0133 & 0.0171\sym{*} & 0.131\sym{***}& 0.0708\sym{***}\\ + &(0.00829) &(0.00957) &(0.00857) &(0.00934) & (0.0359) & (0.0181) \\ +\addlinespace +Observations & 19727 & 19749 & 19745 & 19742 & 19754 & 19765 \\ +Control mean & 0.25 & 0.49 & 0.71 & 0.62 & 4.53 & 0.00 \\ +\hline \end{tabular} diff --git a/37/replication_package/Out/Tables/table_2stage_redistribution.tex b/37/replication_package/Out/Tables/table_2stage_redistribution.tex new file mode 100644 index 0000000000000000000000000000000000000000..71b6c773d4efaa6835e4db950ab79d72f7f4cc24 --- /dev/null +++ b/37/replication_package/Out/Tables/table_2stage_redistribution.tex @@ -0,0 +1,20 @@ +\begin{tabular}{lcccccc} +& Tax & Tax & Social & Education & Inequality & Donation \\ +& Top 1 & Bottom 50 & Budget & Budget & Serious Problem & Above Median \\ +& (1) & (2) & (3) & (4) & (5) & (6) \\ \hline +\addlinespace +Order/Salience T& -1.948\sym{***}& 0.914\sym{***}& -0.543\sym{**} & 0.439\sym{**} & -0.0280\sym{**} & -0.0479\sym{***}\\ + & (0.416) & (0.276) & (0.238) & (0.175) & (0.0132) & (0.0138) \\ +\addlinespace +T: Share of Immigrants& -0.627 & 0.0449 & -0.479\sym{**} & 0.188 & -0.00590 & -0.0165 \\ + & (0.419) & (0.278) & (0.233) & (0.172) & (0.0133) & (0.0140) \\ +\addlinespace +T: Origin of Immigrants& -0.0662 & 0.0322 & -0.465\sym{*} & 0.164 & 0.00626 & 0.00208 \\ + & (0.425) & (0.284) & (0.239) & (0.173) & (0.0132) & (0.0140) \\ +\addlinespace +T: Hard Work & 0.0772 & -0.212 & -0.0944 & 0.333\sym{**} & 0.0158 & 0.00910 \\ + & (0.422) & (0.279) & (0.235) & (0.170) & (0.0132) & (0.0139) \\ +\addlinespace +Observations & 19765 & 19765 & 19765 & 19765 & 19763 & 19765 \\ +Control mean & 37.12 & 10.94 & 29.53 & 16.00 & 0.59 & 0.47 \\ +\hline \end{tabular} diff --git a/37/replication_package/Out/Tables/table_local_indices.tex b/37/replication_package/Out/Tables/table_local_indices.tex new file mode 100644 index 0000000000000000000000000000000000000000..1d312b790d3d2d6c07741a026a2c76390909351d --- /dev/null +++ b/37/replication_package/Out/Tables/table_local_indices.tex @@ -0,0 +1,41 @@ +\begin{tabular}{lcccc} +\\ \\ & All & Perc. Cultural Distance & Perc. Econ. Weakness & Perc. Free Riding \\ +& Immigrants (misp.) & Index & Index & Index \\ +& (1) & (2) & (3) & (4) \\ \hline +\addlinespace +Local share of immigrants& 0.203\sym{***}& & & \\ + & (0.0453) & & & \\ +\addlinespace +Actual local cultural distance index& & 0.0515\sym{***}& & \\ + & & (0.0147) & & \\ +\addlinespace +Actual local economic circumstances index& & & 0.0981\sym{***}& \\ + & & & (0.0296) & \\ +\addlinespace +Right-wing & 0.895 & 0.0663\sym{***}& 0.315\sym{***}& 0.566\sym{***}\\ + & (0.572) & (0.0233) & (0.0275) & (0.0278) \\ +\addlinespace +Female & 4.143\sym{***}& 0.0108 & -0.0650\sym{**} & 0.0170 \\ + & (0.567) & (0.0223) & (0.0266) & (0.0268) \\ +\addlinespace +Age 18-45 & 4.028\sym{***}& -0.0181 & -0.0996\sym{***}& 0.0299 \\ + & (0.566) & (0.0223) & (0.0267) & (0.0269) \\ +\addlinespace +Immigrant parent& 6.002\sym{***}& 0.0923\sym{***}& -0.112\sym{**} & -0.0828\sym{**} \\ + & (1.052) & (0.0338) & (0.0456) & (0.0416) \\ +\addlinespace +Has a university degree& -4.219\sym{***}& -0.0129 & -0.182\sym{***}& -0.236\sym{***}\\ + & (0.788) & (0.0322) & (0.0380) & (0.0383) \\ +\addlinespace +High Income & 0.0586 & 0.00759 & -0.0480 & -0.118\sym{***}\\ + & (0.799) & (0.0305) & (0.0360) & (0.0350) \\ +\addlinespace +H. Imm. Sect. No College& 3.326\sym{***}& 0.000657 & 0.116\sym{***}& 0.0642\sym{*} \\ + & (0.747) & (0.0296) & (0.0353) & (0.0367) \\ +\addlinespace +H. Imm. Sect. College& 1.766\sym{**} & -0.0300 & 0.00703 & 0.0832\sym{**} \\ + & (0.889) & (0.0348) & (0.0420) & (0.0394) \\ +\addlinespace +Observations & 5047 & 5065 & 5065 & 5065 \\ +Control mean & 17.67 & 0.00 & 0.00 & 0.00 \\ +\hline \end{tabular} diff --git a/37/replication_package/Readme.pdf b/37/replication_package/Readme.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e59e1600bdc066d4b0c551df45443dd9fe7ce62d --- /dev/null +++ b/37/replication_package/Readme.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95b4f556a7445a782f6dfea2b92785c2330434c63d3002f36498b8680ede4f48 +size 141662 diff --git a/37/replication_package/Sources/Database_EU.xlsx b/37/replication_package/Sources/Database_EU.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..342aa0929d76f06bd4da21afc43034cadcf129d2 --- /dev/null +++ b/37/replication_package/Sources/Database_EU.xlsx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e18307138ccdbfbb390094cccc8f0b85541ef6c1b583c0924ff9f0f38548caab +size 151553 diff --git a/37/replication_package/Sources/Database_US.xlsx b/37/replication_package/Sources/Database_US.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..bddb409967e98d5467b47bc34175b82d743f8cc0 --- /dev/null +++ b/37/replication_package/Sources/Database_US.xlsx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70bd5fb0ccc6d008bc91ca7236419c0e722dc437ffc3b7a0ab0370e5b54b0d9e +size 58833 diff --git a/37/replication_package/Sources/Database_local_EU.xlsx b/37/replication_package/Sources/Database_local_EU.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..2850f747ad4233b54c5f04c7eb4d3875abea4b91 --- /dev/null +++ b/37/replication_package/Sources/Database_local_EU.xlsx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d406a8c2e63913ff6596c183f36266828b055e54dbf13c231bc7a265b731b26 +size 167184 diff --git a/37/replication_package/Sources/~$Database_local_EU.xlsx b/37/replication_package/Sources/~$Database_local_EU.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..2b310b7735a9cc13dc00d3be00d0dc7ab7470c2a --- /dev/null +++ b/37/replication_package/Sources/~$Database_local_EU.xlsx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a5a2e5652675e7b0855196f0611ed0c85f26c2c92cb5c47bdcc30ed1c8a6fbe +size 165 diff --git a/37/should_reproduce.txt b/37/should_reproduce.txt new file mode 100644 index 0000000000000000000000000000000000000000..2f24497405ba6c3aef345c64f56d2fca23141a36 --- /dev/null +++ b/37/should_reproduce.txt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:932fd10e435edbaf1e1de91bf54cdb75178fe67e1503e0eaa3479e029fed4d6f +size 32