anonymous-submission-acl2025 commited on
Commit
e706ec8
·
1 Parent(s): 1bb4cbf
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. 37/paper.pdf +3 -0
  2. 37/replication_package/Data/survey_analysis.dta +3 -0
  3. 37/replication_package/Do/Figures/.Rhistory +512 -0
  4. 37/replication_package/Do/Figures/Fig10.do +339 -0
  5. 37/replication_package/Do/Figures/Fig2to7.Rmd +992 -0
  6. 37/replication_package/Do/Figures/Fig2to7_9_data.do +2056 -0
  7. 37/replication_package/Do/Figures/Fig8.do +244 -0
  8. 37/replication_package/Do/Figures/Fig9.Rmd +132 -0
  9. 37/replication_package/Do/Tables/Tab1.do +295 -0
  10. 37/replication_package/Do/Tables/Tab2_3.do +516 -0
  11. 37/replication_package/Do/Tables/Tab4to6.do +397 -0
  12. 37/replication_package/Do/misperceptions.do +316 -0
  13. 37/replication_package/Out/Figures/Figure_10.eps +849 -0
  14. 37/replication_package/Out/Figures/Figure_2.png +3 -0
  15. 37/replication_package/Out/Figures/Figure_3_A.png +3 -0
  16. 37/replication_package/Out/Figures/Figure_3_B.png +3 -0
  17. 37/replication_package/Out/Figures/Figure_4_A.png +3 -0
  18. 37/replication_package/Out/Figures/Figure_4_B.png +3 -0
  19. 37/replication_package/Out/Figures/Figure_5_A.png +3 -0
  20. 37/replication_package/Out/Figures/Figure_5_B.png +3 -0
  21. 37/replication_package/Out/Figures/Figure_6_A.png +3 -0
  22. 37/replication_package/Out/Figures/Figure_6_B.png +3 -0
  23. 37/replication_package/Out/Figures/Figure_7.png +3 -0
  24. 37/replication_package/Out/Figures/Figure_8_A.eps +984 -0
  25. 37/replication_package/Out/Figures/Figure_8_B.eps +1012 -0
  26. 37/replication_package/Out/Figures/Figure_9.png +3 -0
  27. 37/replication_package/Out/Figures_data/figure_2_l_data.csv +3 -0
  28. 37/replication_package/Out/Figures_data/figure_2_r_data.csv +3 -0
  29. 37/replication_package/Out/Figures_data/figure_3_a_l_data.csv +3 -0
  30. 37/replication_package/Out/Figures_data/figure_3_a_r_data.csv +3 -0
  31. 37/replication_package/Out/Figures_data/figure_3_b_l_data.csv +3 -0
  32. 37/replication_package/Out/Figures_data/figure_3_b_r_data.csv +3 -0
  33. 37/replication_package/Out/Figures_data/figure_4_a_l_data.csv +3 -0
  34. 37/replication_package/Out/Figures_data/figure_4_a_r_data.csv +3 -0
  35. 37/replication_package/Out/Figures_data/figure_4_b_l_data.csv +3 -0
  36. 37/replication_package/Out/Figures_data/figure_4_b_r_data.csv +3 -0
  37. 37/replication_package/Out/Figures_data/figure_5_a_l_data.csv +3 -0
  38. 37/replication_package/Out/Figures_data/figure_5_a_r_data.csv +3 -0
  39. 37/replication_package/Out/Figures_data/figure_5_b_l_data.csv +3 -0
  40. 37/replication_package/Out/Figures_data/figure_5_b_r_data.csv +3 -0
  41. 37/replication_package/Out/Figures_data/figure_6_a_l_data.csv +3 -0
  42. 37/replication_package/Out/Figures_data/figure_6_a_r_data.csv +3 -0
  43. 37/replication_package/Out/Figures_data/figure_6_b_l_data.csv +3 -0
  44. 37/replication_package/Out/Figures_data/figure_6_b_r_data.csv +3 -0
  45. 37/replication_package/Out/Figures_data/figure_7_l_data.csv +3 -0
  46. 37/replication_package/Out/Figures_data/figure_7_r_data.csv +3 -0
  47. 37/replication_package/Out/Figures_data/figure_9_data.csv +3 -0
  48. 37/replication_package/Out/Tables/corr_matrix.tex +42 -0
  49. 37/replication_package/Out/Tables/summary_stats_sample_by_country_final.tex +19 -0
  50. 37/replication_package/Out/Tables/table_1stage.tex +18 -0
37/paper.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fba35511be770b078c420809ab1085c2e5d2185dff39da6590d5dc206a9ac444
3
+ size 2562994
37/replication_package/Data/survey_analysis.dta ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fa1f18b9ada18522dad9e3611398165ef1b7a1f373b198aa75787f15618a525
3
+ size 6555473
37/replication_package/Do/Figures/.Rhistory ADDED
@@ -0,0 +1,512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ datafig_4_a_r_adj$b <- datafig_4_a_r$bY + datafig_4_a_r$bN
2
+ datafig_4_a_r_adj$lb <- datafig_4_a_r$lb_bY + datafig_4_a_r$lb_bN
3
+ datafig_4_a_r_adj$ub <- datafig_4_a_r$ub_bY + datafig_4_a_r$ub_bN
4
+ datafig_4_a_r_adj$bN <- datafig_4_a_r$bNY + datafig_4_a_r$bNN
5
+ datafig_4_a_r_adj$lbN <- datafig_4_a_r$lb_bNY + datafig_4_a_r$lb_bNN
6
+ datafig_4_a_r_adj$ubN <- datafig_4_a_r$ub_bNY + datafig_4_a_r$ub_bNN
7
+ 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")]
8
+ groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1)
9
+ datafig_4_a_r_adj$group <- groups
10
+ mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
11
+ datafig_4_a_r_adj$mylabs <- mylabs
12
+ mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
13
+ datafig_4_a_r_adj$mylabs1 <- mylabs1
14
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.'
15
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College'
16
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College'
17
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Rich'),'t'] <- 'High Income'
18
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Not Rich'),'t'] <- 'Low Income'
19
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Not College'),'t'] <- 'No College'
20
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing'
21
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing'
22
+ #Plot
23
+ RightPanel9 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){
24
+ p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) +
25
+ geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5,
26
+ shape = 18, size = 2) +
27
+ geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) +
28
+ geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15,
29
+ alpha = 0.5, size = 2) +
30
+ geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) +
31
+ facet_grid(group ~ ., space = 'free_y', scales = "free_y") +
32
+ xlim(x_lb,x_upb) +
33
+ xlab(label) +
34
+ theme_light() +
35
+ theme(
36
+ axis.line=element_blank(), #Removing the axis
37
+ panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'),
38
+ panel.grid.major.y = element_blank(),
39
+ text = element_text(family = "LM Roman 10", size = 10, colour = "black"),
40
+ axis.text = element_text(size = 10, colour = 'black'),
41
+ panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs
42
+ strip.background = element_blank(),
43
+ strip.text.y = element_blank(),
44
+ axis.title.y = element_blank(),
45
+ ### Add spacing for xlabel
46
+ axis.ticks=element_blank(), #Removing the ticks
47
+ panel.spacing.y = unit(0, "lines"),
48
+ ## Control legend
49
+ legend.position = "bottom",
50
+ legend.box = "horizontal",
51
+ legend.justification = c(0.85,0),
52
+ legend.title = element_blank(),
53
+ axis.text.x = element_text(size=9),
54
+ axis.text.y = element_text(size=9),
55
+ axis.title.x = element_text(size = 9, margin = margin(t=11)),
56
+ axis.ticks.x = element_blank()
57
+ ) +
58
+ theme(legend.text=element_text(size=9)) +
59
+ scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) +
60
+ scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18))
61
+ p2}
62
+ # Generate Figure
63
+ plot_grid(LeftPanelAdjustedData9(datafig_4_a_l_adj, "Misperception (in % points)", -25, 30 , 5, "Non-immigrants", "Immigrants"),
64
+ RightPanel9(datafig_4_a_r_adj, "Misperception (in % points)", -15, 15, "Non-immigrants", "Immigrants"),
65
+ labels=NULL, ncol=2, align='h', axis='b')
66
+ # Export
67
+ FigureExporter(plot_grid(LeftPanelAdjustedData9(datafig_4_a_l_adj, "Misperception (in % points)", -25, 30 , 5, "Non-immigrants", "Immigrants"),
68
+ RightPanel9(datafig_4_a_r_adj, "Misperception (in % points)", -15, 15, "Non-immigrants", "Immigrants"),
69
+ labels=NULL, ncol=2, align='h', axis='b'),
70
+ "Figure_4_A.png")
71
+ # Left Panel
72
+ #Adjust Data
73
+ 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")]
74
+ LeftPanelAdjustedData9 = function(data_adj, label, x_lb, x_upb, distance_ticks,
75
+ labelActual = "Natives", labelMean = "Immigrants"){
76
+ p <- ggplot(data_adj, aes(x=t)) +
77
+ ## Plot segment joining and points
78
+ 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)) +
79
+ geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) +
80
+ geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) +
81
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
82
+ coord_flip()
83
+ ## Add theme, labels, and modify scale
84
+ myshapes <- c("my_b" = "15", "my_d" = "18")
85
+ p1 <- p +
86
+ scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) +
87
+ theme_light() +
88
+ theme(
89
+ ## Control grid
90
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
91
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
92
+ ## Control legend
93
+ legend.position = "bottom",
94
+ legend.box = "horizontal",
95
+ legend.justification = c(0.4,0),
96
+ legend.title = element_blank(),
97
+ text = element_text(family = "LM Roman 10", color='black', size=10),
98
+ axis.text = element_text(colour = 'black'),
99
+ axis.text.x = element_text(size=9),
100
+ axis.text.y = element_text(size=9),
101
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
102
+ axis.ticks.x = element_blank()
103
+ ) +
104
+ theme(legend.text=element_text(size=9))+
105
+ scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) +
106
+ scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) +
107
+ xlab("") +
108
+ ylab(label)
109
+ p1}
110
+ # Rigth Panel
111
+ #Adjust Data
112
+ ## Load and Clean Data
113
+ datafig_4_b_r[is.na(datafig_4_b_r)]<-0
114
+ datafig_4_b_r_adj = datafig_4_b_r
115
+ datafig_4_b_r_adj$b <- datafig_4_b_r$bY + datafig_4_b_r$bN
116
+ datafig_4_b_r_adj$lb <- datafig_4_b_r$lb_bY + datafig_4_b_r$lb_bN
117
+ datafig_4_b_r_adj$ub <- datafig_4_b_r$ub_bY + datafig_4_b_r$ub_bN
118
+ datafig_4_b_r_adj$bN <- datafig_4_b_r$bNY + datafig_4_b_r$bNN
119
+ datafig_4_b_r_adj$lbN <- datafig_4_b_r$lb_bNY + datafig_4_b_r$lb_bNN
120
+ datafig_4_b_r_adj$ubN <- datafig_4_b_r$ub_bNY + datafig_4_b_r$ub_bNN
121
+ 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")]
122
+ groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1)
123
+ datafig_4_b_r_adj$group <- groups
124
+ mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
125
+ datafig_4_b_r_adj$mylabs <- mylabs
126
+ mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
127
+ datafig_4_b_r_adj$mylabs1 <- mylabs1
128
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.'
129
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College'
130
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College'
131
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Rich'),'t'] <- 'High Income'
132
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Not Rich'),'t'] <- 'Low Income'
133
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Not College'),'t'] <- 'No College'
134
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing'
135
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing'
136
+ #Plot
137
+ RightPanel9 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){
138
+ p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) +
139
+ geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5,
140
+ shape = 18, size = 2) +
141
+ geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) +
142
+ geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15,
143
+ alpha = 0.5, size = 2) +
144
+ geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) +
145
+ facet_grid(group ~ ., space = 'free_y', scales = "free_y") +
146
+ xlim(x_lb,x_upb) +
147
+ xlab(label) +
148
+ theme_light() +
149
+ theme(
150
+ axis.line=element_blank(), #Removing the axis
151
+ panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'),
152
+ panel.grid.major.y = element_blank(),
153
+ text = element_text(family = "LM Roman 10", size = 10, colour = "black"),
154
+ axis.text = element_text(size = 10, colour = 'black'),
155
+ panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs
156
+ strip.background = element_blank(),
157
+ strip.text.y = element_blank(),
158
+ axis.title.y = element_blank(),
159
+ ### Add spacing for xlabel
160
+ axis.ticks=element_blank(), #Removing the ticks
161
+ panel.spacing.y = unit(0, "lines"),
162
+ ## Control legend
163
+ legend.position = "bottom",
164
+ legend.box = "horizontal",
165
+ legend.justification = c(0.85,0),
166
+ legend.title = element_blank(),
167
+ axis.text.x = element_text(size=9),
168
+ axis.text.y = element_text(size=9),
169
+ axis.title.x = element_text(size = 9, margin = margin(t=11)),
170
+ axis.ticks.x = element_blank()
171
+ ) +
172
+ theme(legend.text=element_text(size=9)) +
173
+ scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) +
174
+ scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18))
175
+ p2}
176
+ # Generate Figure
177
+ plot_grid(LeftPanelAdjustedData9(datafig_4_b_l_adj, "Misperception (in % points)", 5, 35 , 5, "Non-immigrants", "Immigrants"),
178
+ RightPanel9(datafig_4_b_r_adj, "Misperception (in % points)", 0, 35, "Non-immigrants", "Immigrants"),
179
+ labels=NULL, ncol=2, align='h', axis='b')
180
+ # Export
181
+ FigureExporter(plot_grid(LeftPanelAdjustedData9(datafig_4_b_l_adj, "Misperception (in % points)", 5, 35 , 5, "Non-immigrants", "Immigrants"),
182
+ RightPanel9(datafig_4_b_r_adj, "Misperception (in % points)", 0, 35, "Non-immigrants", "Immigrants"),
183
+ labels=NULL, ncol=2, align='h', axis='b'),
184
+ "Figure_4_B.png")
185
+ # Data adjustment for Left Panel: no rescaling needed
186
+ datafig_5_a_l_adj = DataAdjustNoResc(datafig_5_a_l)
187
+ # Generate Figure
188
+ plot_grid(LeftPanelAdjustedData(datafig_5_a_l_adj, "Share of Respondents", 0.1, .5 , .1,
189
+ "Alesina et al. (2018)", "Q on Imm."),
190
+ RightPanelPercentage(datafig_5_a_r, "Share of Respondents", 0.2, 0.6, 0.1),
191
+ labels=NULL, ncol=2, align='h', axis='b')
192
+ # Export
193
+ FigureExporter(plot_grid(LeftPanelAdjustedData(datafig_5_a_l_adj, "Share of Respondents", 0.1, .5 , .1,
194
+ "Alesina et al. (2018)", "Q on Imm."),
195
+ RightPanelPercentage(datafig_5_a_r, "Share of Respondents", 0.2, 0.6, 0.1),
196
+ labels=NULL, ncol=2, align='h', axis='b'), "Figure_5_A.png")
197
+ # Data Adjustment
198
+ datafig_5_b_l_adj = DataAdjustNoResc(datafig_5_b_l)
199
+ # Generate Figure
200
+ plot_grid(LeftPanelAdjustedData(datafig_5_b_l_adj, "Share of Respondents", 0.15, .8 , .1,
201
+ "Alesina et al. (2018)", "Q on Imm."),
202
+ RightPanelPercentage(datafig_5_b_r, "Share of Respondents", 0.50, 0.8, 0.05),
203
+ labels=NULL, ncol=2, align='h', axis='b')
204
+ # Export
205
+ FigureExporter(plot_grid(LeftPanelAdjustedData(datafig_5_b_l_adj, "Share of Respondents", 0.15, .8 , .1,
206
+ "Alesina et al. (2018)", "Q on Imm."),
207
+ RightPanelPercentage(datafig_5_b_r, "Share of Respondents", 0.50, 0.8, 0.05),
208
+ labels=NULL, ncol=2, align='h', axis='b'), "Figure_5_B.png")
209
+ # Left Panel
210
+ ##Data Adjustment (do not consider m_real as missing)
211
+ datafig_6_a_l_adj = datafig_6_a_l[datafig_6_a_l$t %in% c("Sweden", "Germany", "Italy",
212
+ "France", "UK", "US"), !names(datafig_6_a_l) %in% c("n","m_real")]
213
+ datafig_6_a_l_adj$m_perc <- datafig_6_a_l_adj$m_perc
214
+ datafig_6_a_l_adj <- transform(datafig_6_a_l_adj,
215
+ lbound = lb_perc,
216
+ ubound = ub_perc)
217
+ ##Graph
218
+ LeftPanel_NoActual = function(data_adj, label, xlb, xupb, distance_ticks){
219
+ p <- ggplot(data_adj, aes(x=t)) +
220
+ ## Plot segment joining and points
221
+ geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) +
222
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
223
+ coord_flip()
224
+ ## Add theme, labels, and modify scale
225
+ myshapes <- c("my_b" = "15", "my_d" = "18")
226
+ p1 <- p +
227
+ scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0),
228
+ limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) +
229
+ theme_light() +
230
+ theme(
231
+ ## Control grid
232
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
233
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
234
+ ## Control legend
235
+ legend.position = "none",
236
+ legend.box = "horizontal",
237
+ legend.justification = c(0.5,0),
238
+ legend.title = element_blank(),
239
+ text = element_text(family = "LM Roman 10", color='black', size=10),
240
+ axis.text = element_text(colour = 'black'),
241
+ axis.text.x = element_text(size=9),
242
+ axis.text.y = element_text(size=9),
243
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
244
+ axis.ticks.x = element_blank()) +
245
+ theme(legend.text=element_text(size=9))+
246
+ scale_colour_manual(name = "", labels = 'Perceived (mean)', values =rgb(0.7,0.2,0.1,1)) +
247
+ scale_shape_manual(name = "", labels = c('Perceived (mean)'), values = 15) +
248
+ xlab("") +
249
+ ylab(label)
250
+ p1}
251
+ # Generate Figure
252
+ plot_grid(LeftPanel_NoActual(datafig_6_a_l_adj, "Share of Respondents", 0.05, 0.3, 0.05) ,
253
+ RightPanelPercentage(datafig_6_a_r, "Share of Respondents", 0.05, 0.25, 0.05),
254
+ labels=NULL, ncol=2, align='h', axis='b')
255
+ # Export
256
+ FigureExporter(plot_grid(LeftPanel_NoActual(datafig_6_a_l_adj, "Share of Respondents", 0.05, 0.3, 0.05) ,
257
+ RightPanelPercentage(datafig_6_a_r, "Share of Respondents", 0.05, 0.25, 0.05),
258
+ labels=NULL, ncol=2, align='h', axis='b'), "Figure_6_A.png")
259
+ # Left Panel
260
+ ##Data Adjustment (do not consider m_real as missing)
261
+ datafig_6_b_l_adj = datafig_6_b_l[datafig_6_b_l$t %in% c("Sweden", "Germany", "Italy",
262
+ "France", "UK", "US"), !names(datafig_6_b_l) %in% c("n","m_real")]
263
+ datafig_6_b_l_adj$m_perc <- datafig_6_b_l_adj$m_perc
264
+ datafig_6_b_l_adj <- transform(datafig_6_b_l_adj,
265
+ lbound = lb_perc,
266
+ ubound = ub_perc)
267
+ ##Graph
268
+ LeftPanel_NoActual = function(data_adj, label, xlb, xupb, distance_ticks){
269
+ p <- ggplot(data_adj, aes(x=t)) +
270
+ ## Plot segment joining and points
271
+ geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) +
272
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
273
+ coord_flip()
274
+ ## Add theme, labels, and modify scale
275
+ myshapes <- c("my_b" = "15", "my_d" = "18")
276
+ p1 <- p +
277
+ scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0),
278
+ limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) +
279
+ theme_light() +
280
+ theme(
281
+ ## Control grid
282
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
283
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
284
+ ## Control legend
285
+ legend.position = "none",
286
+ legend.box = "horizontal",
287
+ legend.justification = c(0.5,0),
288
+ legend.title = element_blank(),
289
+ text = element_text(family = "LM Roman 10", color='black', size=11),
290
+ axis.text = element_text(colour = 'black'),
291
+ axis.text.x = element_text(size=9),
292
+ axis.text.y = element_text(size=9),
293
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
294
+ axis.ticks.x = element_blank(),
295
+ ) +
296
+ theme(legend.text=element_text(size=9))+
297
+ scale_colour_manual(name = "", labels = 'Perceived (mean)', values =rgb(0.7,0.2,0.1,1)) +
298
+ scale_shape_manual(name = "", labels = c('Perceived (mean)'), values = 15) +
299
+ xlab("") +
300
+ ylab(label)
301
+ p1}
302
+ # Generate Figure
303
+ plot_grid(LeftPanel_NoActual(datafig_6_b_l_adj, "Share of Respondents", 0, 0.4, 0.1) ,
304
+ RightPanelPercentage(datafig_6_b_r, "Share of Respondents", 0.1, 0.4, 0.05),
305
+ labels=NULL, ncol=2, align='h', axis='b')
306
+ # Export
307
+ FigureExporter(plot_grid(LeftPanel_NoActual(datafig_6_b_l_adj, "Share of Respondents", 0, 0.4, 0.1) ,
308
+ RightPanelPercentage(datafig_6_b_r, "Share of Respondents", 0.1, 0.4, 0.05),
309
+ labels=NULL, ncol=2, align='h', axis='b'), "Figure_6_B.png")
310
+ # Left Panel
311
+ #Adjust Data
312
+ 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")]
313
+ LeftPanelAdjustedData12 = function(data_adj, label, x_lb, x_upb, distance_ticks,
314
+ labelActual = "Natives", labelMean = "Immigrants"){
315
+ p <- ggplot(data_adj, aes(x=t)) +
316
+ ## Plot segment joining and points
317
+ 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)) +
318
+ geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) +
319
+ geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) +
320
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
321
+ coord_flip()
322
+ ## Add theme, labels, and modify scale
323
+ myshapes <- c("my_b" = "15", "my_d" = "18")
324
+ p1 <- p +
325
+ scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) +
326
+ theme_light() +
327
+ theme(
328
+ ## Control grid
329
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
330
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
331
+ ## Control legend
332
+ legend.position = "bottom",
333
+ legend.box = "horizontal",
334
+ legend.justification = c(0.3,0),
335
+ legend.title = element_blank(),
336
+ text = element_text(family = "LM Roman 10", color='black', size=10),
337
+ axis.text = element_text(colour = 'black'),
338
+ axis.text.x = element_text(size=9),
339
+ axis.text.y = element_text(size=9),
340
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
341
+ axis.ticks.x = element_blank()
342
+ ) +
343
+ theme(legend.text=element_text(size=9))+
344
+ scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) +
345
+ scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) +
346
+ xlab("") +
347
+ ylab(label)
348
+ p1}
349
+ # Rigth Panel
350
+ #Adjust Data
351
+ ## Load and clean data
352
+ datafig_7_r[is.na(datafig_7_r)]<-0
353
+ datafig_7_r_adj = datafig_7_r
354
+ datafig_7_r_adj$b <- datafig_7_r$bY + datafig_7_r$bN
355
+ datafig_7_r_adj$lb <- datafig_7_r$lb_bY + datafig_7_r$lb_bN
356
+ datafig_7_r_adj$ub <- datafig_7_r$ub_bY + datafig_7_r$ub_bN
357
+ datafig_7_r_adj$bN <- datafig_7_r$bNY + datafig_7_r$bNN
358
+ datafig_7_r_adj$lbN <- datafig_7_r$lb_bNY + datafig_7_r$lb_bNN
359
+ datafig_7_r_adj$ubN <- datafig_7_r$ub_bNY + datafig_7_r$ub_bNN
360
+ datafig_7_r_adj<- datafig_7_r_adj[which(datafig_7_r_adj$b!=0), c("t","b", "lb", "ub", "bN", "lbN", "ubN")]
361
+ groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1)
362
+ datafig_7_r_adj$group <- groups
363
+ mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
364
+ datafig_7_r_adj$mylabs <- mylabs
365
+ mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
366
+ datafig_7_r_adj$mylabs1 <- mylabs1
367
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.'
368
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College'
369
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College'
370
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Rich'),'t'] <- 'High Income'
371
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Not Rich'),'t'] <- 'Low Income'
372
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Not College'),'t'] <- 'No College'
373
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing'
374
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing'
375
+ #Plot
376
+ RightPanel12 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){
377
+ p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) +
378
+ geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5,
379
+ shape = 18, size = 2) +
380
+ geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) +
381
+ geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15,
382
+ alpha = 0.5, size = 2) +
383
+ geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) +
384
+ facet_grid(group ~ ., space = 'free_y', scales = "free_y") +
385
+ xlim(x_lb,x_upb) +
386
+ xlab(label) +
387
+ theme_light() +
388
+ theme(
389
+ axis.line=element_blank(), #Removing the axis
390
+ panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'),
391
+ panel.grid.major.y = element_blank(),
392
+ text = element_text(family = "LM Roman 10", size = 10, colour = "black"),
393
+ axis.text = element_text(size = 9, colour = 'black'),
394
+ panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs
395
+ strip.background = element_blank(),
396
+ axis.text.y = element_text(size=9),
397
+ axis.title.y = element_blank(),
398
+ ### Add spacing for xlabel
399
+ axis.title.x = element_text(size = 9, margin = margin(t=13)),
400
+ axis.ticks=element_blank(), #Removing the ticks
401
+ panel.spacing.y = unit(0, "lines"),
402
+ ## Control legend
403
+ legend.position = "bottom",
404
+ legend.box = "horizontal",
405
+ legend.justification = c(0.65,0),
406
+ #panel.border = element_blank(),
407
+ legend.title = element_blank()
408
+ ) +
409
+ theme(legend.text=element_text(size=9)) +
410
+ scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) +
411
+ scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18))
412
+ p2}
413
+ # Generate Figure
414
+ plot_grid(LeftPanelAdjustedData12(datafig_7_l_adj, "Misperception (in % points)", -10, 30 , 10, "Non-immigrants", "Immigrants"),
415
+ RightPanel12(datafig_7_r_adj, "Misperception (in % points)", 0, 20, "Non-immigrants", "Immigrants"),
416
+ labels=NULL, ncol=2, align='h', axis='b')
417
+ # Export
418
+ FigureExporter(plot_grid(LeftPanelAdjustedData12(datafig_7_l_adj, "Misperception (in % points)", -10, 30 , 10, "Non-immigrants", "Immigrants"),
419
+ RightPanel12(datafig_7_r_adj, "Misperception (in % points)", 0, 20, "Non-immigrants", "Immigrants"),
420
+ labels=NULL, ncol=2, align='h', axis='b'),
421
+ "Figure_7.png")
422
+ knitr::opts_chunk$set(echo = F, warning = F, message = F)
423
+ # Importing Packages
424
+ rm(list=ls())
425
+ gc()
426
+ library(tidyverse)
427
+ library(extrafont)
428
+ library(gtable)
429
+ library(ggplot2)
430
+ library(gridExtra)
431
+ library(grid)
432
+ library(cowplot)
433
+ library(grDevices)
434
+ loadfonts()
435
+ # SPECIFY DIRECTORY OF THE REPLICATION PACKAGE
436
+ setwd("C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing_v2")
437
+ # IMPORTING DATASET
438
+ datafig_second_gen = read_csv('Out/Figures_data/figure_9_data.csv', show_col_types = FALSE)
439
+ # Function to Export Figures: SPECIFY DIRECTORY OF THE REPLICATION PACKAGE
440
+ FigureExporter = function(Figure, Name, WhereFolderDraft = "C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing_v2"){
441
+ figure_name <- Name
442
+ figures_dir <- file.path(WhereFolderDraft, 'Out/Figures')
443
+ fig_path <- file.path(figures_dir, figure_name)
444
+ png(fig_path, width = 4800, height=2700, res = 720, type = c("cairo-png"))
445
+ Figure1 = Figure
446
+ print(Figure1)
447
+ }
448
+ #Data Adjustment for cleaning (Left Panel) Function - Without Rescaling
449
+ DataAdjustNoResc = function(data){
450
+ data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")]
451
+ data$m_perc <- data$m_perc
452
+ data$m_real <- data$m_real
453
+ data <- transform(data,
454
+ lbound = lb_perc,
455
+ ubound = ub_perc)
456
+ diff <- data %>%
457
+ mutate(Max = max(m_perc, m_real),
458
+ Min = min(m_perc, m_real),
459
+ Diff = Max / Min - 1) %>%
460
+ arrange(desc(Diff))
461
+ ## Create difference between perception and real
462
+ data$diff <- (data$m_perc - data$m_real)/data$m_real
463
+ data_adj = data
464
+ data_adj
465
+ }
466
+ # Data adjustment: rescaling not needed
467
+ datafig_second_gen_adj = DataAdjustNoResc(datafig_second_gen)
468
+ # Function to generate the graph
469
+ Left_10_B = function(xlb, xupb, distance_ticks){
470
+ data = datafig_second_gen_adj
471
+ p <- ggplot(data, aes(x=t)) +
472
+ ## Plot segment joining and points
473
+ geom_segment(aes(x=t, xend=t, y=m_real, yend=m_perc), size = 0.4, color="black") +
474
+ geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) +
475
+ geom_point(aes(x=t, y=m_real_2, colour= 'Act. 1 & 2 Gen.', shape = 'Act. 1 & 2 Gen.'), size=4) +
476
+ geom_point(aes(x=t, y=m_real, colour='Act. 1 Gen.', shape = 'Act. 1 Gen.'), size=4) +
477
+ geom_point(aes(x=t, y=m_perc, colour='Perceived (mean)', shape = 'Perceived (mean)'), size=3) +
478
+ coord_flip()
479
+ ## Add theme, labels, and modify scale
480
+ myshapes <- c("my_b" = "15", "my_d" = "18")
481
+ p1 <- p +
482
+ scale_y_continuous(limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) +
483
+ theme_light() +
484
+ theme(
485
+ ## Control grid
486
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
487
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
488
+ ## Control legend
489
+ legend.position = "bottom",
490
+ legend.box = "horizontal",
491
+ legend.justification = c(0.5,0),
492
+ legend.title = element_blank(),
493
+ text = element_text(family = "LM Roman 10", color='black', size=11),
494
+ axis.text = element_text(colour = 'black'),
495
+ axis.text.x = element_text(size=9),
496
+ axis.text.y = element_text(size=9),
497
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
498
+ axis.ticks.x = element_blank()
499
+ ) +
500
+ scale_colour_manual(name = "", labels = c( "Act. 1 & 2 Gen.", 'Act. 1 Gen.','Perceived (mean)'),
501
+ values = c("Act. 1 & 2 Gen." = "#1A476F", 'Act. 1 Gen.' = "#0080FF",
502
+ 'Perceived (mean)' = rgb(0.7,0.2,0.1,1))) +
503
+ scale_shape_manual(name = "", labels = c("Act. 1 & 2 Gen.",'Act. 1 Gen.', 'Perceived (mean)'),
504
+ values = c( "Act. 1 & 2 Gen." = 20, 'Act. 1 Gen.' = 18, 'Perceived (mean)' = 15)) +
505
+ xlab("") +
506
+ ylab("Share of Immigrants") +
507
+ guides(col = guide_legend(nrow=2,byrow=TRUE))
508
+ p1}
509
+ # Generate Figure
510
+ plot_grid(Left_10_B(0, 40, 5), labels=NULL, ncol=2, align='h', axis='b')
511
+ # Export
512
+ FigureExporter(plot_grid(Left_10_B(0, 40, 5), labels=NULL, ncol=2, align='h', axis='b'), "Figure_9.png")
37/replication_package/Do/Figures/Fig10.do ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **********
2
+ * Immigration and Redistribution
3
+ * Alesina, Miano, Stantcheva
4
+ * RESTUD
5
+
6
+ * Figure 10
7
+ **********
8
+
9
+ clear all
10
+
11
+ * Specify directory of the replication package
12
+ global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"
13
+ cd "$dir"
14
+
15
+ * Declare output sub-directory
16
+
17
+ global outdir "Out/Figures"
18
+
19
+ * Load the data
20
+
21
+ use "Data/survey_analysis.dta", clear
22
+
23
+ * Countries included in the analysis
24
+ global countries "US UK DE FR IT SE"
25
+
26
+
27
+ * Generate flags - To ensure answers quality
28
+ gen flag_1=0
29
+ gen flag_2=0
30
+
31
+ bysort country treatment_recod: egen min_duration = pctile(duration), p(2)
32
+ bysort country treatment_recod: egen max_duration = pctile(duration), p(98)
33
+
34
+ replace flag_1=1 if duration<min_duration
35
+ replace flag_2=1 if duration>max_duration
36
+
37
+ * Drop respondents that have spent too little or too much time (bottom/top 2%)
38
+
39
+ keep if flag_1==0 & flag_2==0
40
+
41
+ *Drop variable used to exclude inattentive respondents
42
+ drop flag_1 flag_2 min_duration max_duration
43
+
44
+ * Add data on actual natives and immigrants statistics and generate misperceptions *
45
+
46
+ do "Do/misperceptions.do"
47
+
48
+ * Gen additional variables entering the indices *
49
+
50
+ * 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)
51
+ gen moh_more=(Moh_transfers<3 & Moh_tax>2)
52
+ replace moh_more=1 if Moh_transfers==3 & Moh_tax>3
53
+ replace moh_more=. if Moh_tax==. | Moh_transfers==.
54
+ la var moh_more "Mohammad receives more transfers and/or pay less taxes than John"
55
+ label val moh_more binary
56
+
57
+ * Transfers
58
+ gen imm_tra_more=(transfers_imm==10 |transfers_imm==11 |transfers_imm==12 |transfers_imm==13)
59
+ la var imm_tra_more "Immigrants receive more government transfers than natives"
60
+ replace imm_tra_more=. if transfers_imm==.
61
+ label val imm_tra_more binary
62
+
63
+ * Immigration is not a problem
64
+ gen imm_not_problem=(q_imm_problem==16 | q_imm_problem==17)
65
+ replace imm_not_problem=. if q_imm_problem==.
66
+ la var imm_not_problem "Immigration is not a problem"
67
+ label val imm_not_problem binary
68
+
69
+ * When should immigrants be entitled to get benefits?
70
+ gen imm_benefits_soon=(q_imm_benefits==1 | q_imm_benefits==2 | q_imm_benefits==4)
71
+ replace imm_benefits_soon=. if q_imm_benefits==.
72
+ la var imm_benefits_soon "Immigrants should get benefits in less than 3 years"
73
+ label val imm_benefits_soon binary
74
+
75
+ * When should immigrants be allowed to apply for citizenship?
76
+ gen imm_citizenship_soon=(q_imm_citizenship==1 | q_imm_citizenship==2)
77
+ replace imm_citizenship_soon=. if q_imm_citizenship==.
78
+ la var imm_citizenship_soon "Immigrants should get citizenship in 2 or 5 years"
79
+ label val imm_citizenship_soon binary
80
+
81
+ * When would you consider an immigrant "Truly American"?
82
+ gen trully_american_cit=(q_imm_american==7 | q_imm_american==1 | q_imm_american==4)
83
+ replace trully_american_cit=. if q_imm_american==.
84
+ la var trully_american_cit "Consider American at citizenship or sooner"
85
+ label val trully_american_cit binary
86
+
87
+ *Budget allocation
88
+ winsor2 budget_safetynet budget_health budget_education, s(_w) c(5 95) by(country)
89
+ la var budget_safetynet_w "% of the budget assigned to Income Support Program (winsorized)"
90
+ la var budget_health_w "% of the budget assigned to Public Spending on Health (winsorized)"
91
+ la var budget_education_w "% of the budget assigned to Spending on Schooling (winsorized)"
92
+
93
+ gen budget_social_w = budget_health_w + budget_safetynet_w
94
+ la var budget_social_w "% of the budget assigned to Income Support Program and Health (winsorized)"
95
+
96
+ * Inequality is not a problem
97
+ gen ineq_no_problem=(q_inequality_problem==1)
98
+ replace ineq_no_problem=. if q_inequality_problem==.
99
+ la var ineq_no_problem "Inequality is not a problem"
100
+ label val ineq_no_problem binary
101
+
102
+ * Total donation above 50th percentile within country
103
+ gen total_donation_d=0
104
+ foreach x in $countries {
105
+ su total_donation if country=="`x'", d
106
+ replace total_donation_d=1 if total_donation>r(p50) & country=="`x'"
107
+ }
108
+ replace total_donation_d=. if total_donation==.
109
+
110
+ la var total_donation_d "Donated more than the median of the country of reference"
111
+ label val total_donation_d binary
112
+
113
+
114
+ *** Keep only control group ***
115
+
116
+ keep if control==1
117
+
118
+
119
+ ****************
120
+ * Gen controls *
121
+ ****************
122
+
123
+
124
+ * Gen Left-right variables *
125
+ * Based on vote or voting intensions
126
+ gen left=(party_voted==4 | party_voted==5)
127
+ replace left=. if party_voted==. | party_voted==6 | party_voted==0
128
+ gen right=(party_voted==1 | party_voted==2)
129
+ replace right=. if party_voted==. | party_voted==6 | party_voted==0
130
+ gen center=(party_voted==3)
131
+ replace center=. if party_voted==. | party_voted==6 | party_voted==0
132
+
133
+ label var left "Left-wing"
134
+ label var right "Right-wing"
135
+ label var center "Center"
136
+
137
+ foreach i in left right center{
138
+ label val `i' binary
139
+ }
140
+
141
+
142
+ * Young
143
+ gen young=(age<45)
144
+ label var young "Young"
145
+ label val young binary
146
+
147
+ * Gender
148
+ gen male=(sex==1)
149
+ label var male "Male"
150
+ label val male binary
151
+
152
+ * Children dummy
153
+ gen children=(number_children>1)
154
+ replace children=. if number_children==.
155
+ label var children "Has children"
156
+ label val children binary
157
+
158
+ * Immigrant parent
159
+ gen immigrant_parent=(q_parent_same==2)
160
+ replace immigrant_parent=. if q_parent_same==.
161
+ label var immigrant_parent "At least one of the parents is an immigrant"
162
+ label val immigrant_parent binary
163
+
164
+ * Top income
165
+ gen top_income=0
166
+ foreach x in $countries{
167
+ su household_income if country=="`x'", d
168
+ replace top_income=1 if household_income>r(p75) & country=="`x'"
169
+ }
170
+ label var top_income "High Income"
171
+ label val top_income binary
172
+
173
+
174
+
175
+ * Redistribution index
176
+
177
+ foreach var in tax_top1 tax_bottom50 budget_social_w budget_education_w ineq_no_problem total_donation_d{
178
+
179
+ su `var'
180
+ local `var'mc: display %5.3f `r(mean)'
181
+ su `var'
182
+ local `var'sdc: display %5.3f `r(sd)'
183
+ gen `var'_ind=(`var'-``var'mc')/``var'sdc'
184
+ replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==.
185
+ }
186
+
187
+ 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
188
+
189
+ foreach var in tax_top1 tax_bottom50 budget_social_w budget_education_w ineq_no_problem total_donation_d{
190
+ drop `var'_ind
191
+ }
192
+
193
+ *** Gen Immigration support index
194
+
195
+ foreach var in imm_not_problem imm_benefits_soon imm_citizenship_soon ///
196
+ trully_american_cit q_govt_imm {
197
+ su `var'
198
+ local `var'mc: display %5.3f `r(mean)'
199
+ su `var'
200
+ local `var'sdc: display %5.3f `r(sd)'
201
+ gen `var'_ind=(`var'-``var'mc')/``var'sdc'
202
+ replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==.
203
+ }
204
+
205
+ gen index_imm_support=(imm_benefits_soon_ind + imm_citizenship_soon_ind ///
206
+ +trully_american_cit_ind + q_govt_imm_ind +imm_not_problem_ind)/5
207
+
208
+
209
+ drop imm_not_problem_ind imm_benefits_soon_ind imm_citizenship_soon_ind ///
210
+ trully_american_cit_ind q_govt_imm_ind
211
+
212
+ ******************************
213
+ * Perception indices *****
214
+ ******************************
215
+ *** Gen indices ***
216
+
217
+ foreach var in mis_share_mu mis_share_ch mis_share_LA mis_share_AS mis_share_AF mis_share_E mis_share_NA ///
218
+ mis_unemp_imm mis_loweduc_imm mis_higheduc_imm mis_poverty_imm ///
219
+ effort_poor moh_more imm_tra_more{
220
+
221
+ su `var'
222
+ local `var'mc: display %5.3f `r(mean)'
223
+ su `var'
224
+ local `var'sdc: display %5.3f `r(sd)'
225
+ gen `var'_ind=(`var'-``var'mc')/``var'sdc'
226
+ replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==.
227
+ }
228
+
229
+ 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
230
+
231
+ gen econ_index = (mis_unemp_imm_ind + mis_loweduc_imm_ind - mis_higheduc_imm_ind +mis_poverty_imm_ind)/4
232
+
233
+ gen free_riding_index = (effort_poor_ind + moh_more_ind + imm_tra_more_ind)/3
234
+
235
+ foreach var in mis_share_mu mis_share_ch mis_share_LA mis_share_AS mis_share_AF mis_share_E mis_share_NA ///
236
+ mis_unemp_imm mis_loweduc_imm mis_higheduc_imm mis_poverty_imm ///
237
+ effort_poor moh_more imm_tra_more{
238
+
239
+ drop `var'_ind
240
+
241
+ }
242
+
243
+
244
+ label var culture_index "Perc. cultural distance index"
245
+ label var econ_index "Perc. economic weakness index"
246
+ label var free_riding_index "Perc. free-riding index"
247
+
248
+
249
+ ********************************************
250
+ * Declare variables to be used as controls *
251
+ ********************************************
252
+
253
+ global controls right left male young immigrant_parent children university_degree top_income sector_dummy
254
+
255
+
256
+ **************************
257
+ * Correlation Graph with support for immigration and redistribution
258
+ *************************
259
+
260
+ global X mis_share_foreign culture_index econ_index free_riding_index
261
+
262
+ preserve
263
+
264
+ ** Standardize vars **
265
+
266
+ foreach var in red_index index_imm_support $X $controls{
267
+ su `var'
268
+ local `var'mc: display %5.3f `r(mean)'
269
+ local `var'sdc: display %5.3f `r(sd)'
270
+ replace `var'=(`var'-``var'mc')/``var'sdc'
271
+ }
272
+
273
+ * Regressions (All together) - Immigration
274
+ eststo: xi: reg index_imm_support $X $controls i.country, robust
275
+ foreach var in $X{
276
+ local b`var'_imm= _b[`var']
277
+ local se`var'_imm = _se[`var']
278
+ local ub_b`var'_imm= _b[`var'] + 1.96*_se[`var']
279
+ local lb_b`var'_imm= _b[`var'] - 1.96*_se[`var']
280
+ }
281
+
282
+ * Regressions (All together) - Redistribution
283
+
284
+
285
+ eststo: xi: reg red_index $X $controls i.country, robust
286
+ foreach var in $X{
287
+ local b`var'_red= _b[`var']
288
+ local se`var'_red = _se[`var']
289
+ local ub_b`var'_red= _b[`var'] + 1.96*_se[`var']
290
+ local lb_b`var'_red= _b[`var'] - 1.96*_se[`var']
291
+ }
292
+
293
+ * Make Graph
294
+
295
+ clear
296
+ set obs 17
297
+ egen t = seq()
298
+ label define quintile 15 "Perc. free-riding index" 11 "Perc. economic weakness index" 7 "Perc. cultural distance index" 3 "All Immigrants (misp.)"
299
+ label values t quintile
300
+
301
+ gen bY = .
302
+ gen ub_bY = .
303
+ gen lb_bY = .
304
+ gen bN = .
305
+ gen ub_bN = .
306
+ gen lb_bN = .
307
+ gen n=_n
308
+
309
+
310
+ local q = 3
311
+ foreach var in $X {
312
+ replace bY=`b`var'_imm' if n==`q'+1
313
+ replace ub_bY=`ub_b`var'_imm' if n==`q'+1
314
+ replace lb_bY=`lb_b`var'_imm' if n==`q'+1
315
+ local q = `q' + 4
316
+ }
317
+
318
+ local q = 3
319
+ foreach var in $X {
320
+ replace bN=`b`var'_red' if n==`q'-1
321
+ replace ub_bN=`ub_b`var'_red' if n==`q'-1
322
+ replace lb_bN=`lb_b`var'_red' if n==`q'-1
323
+ local q = `q' + 4
324
+ }
325
+
326
+ twoway (rspike lb_bY ub_bY t, hor lcolor(blue*.2) lpattern(solid) lwidth(vthick)) ///
327
+ (scatter t bY, mcolor(blue*0.7) lcolor(blue*0.7) lpattern(solid) msymbol(S) msize(large)) ///
328
+ (rspike lb_bN ub_bN t, hor lcolor(red*.2) lpattern(solid) lwidth(vthick)) ///
329
+ (scatter t bN, mcolor(red*1.2) lcolor(red*1.2) lpattern(solid) msymbol(D) msize(large)), ///
330
+ ytitle("") xlabel(-0.4[0.1]0.15, labsize(medlarge)) ylabel(3 7 11 15, value labsize(medlarge) angle(0) glcolor(gs16) noticks) ///
331
+ xtitle("Correlation", size(medlarge)) ///
332
+ legend(order(2 4) row(2) lab(2 "Support for Immigration") lab(4 "Support for Redistribution")) ///
333
+ yline(5, lcolor(gs8) lpattern("-")) yline(9, lcolor(gs8) lpattern("-")) ///
334
+ yline(13, lcolor(gs8) lpattern("-")) ///
335
+ xline(0, lcolor(black) lw(vthin)) ///
336
+ graphregion(color(white)) plotregion(color(white))
337
+ graph export "$outdir/Figure_10.eps", as(eps) replace
338
+
339
+ restore
37/replication_package/Do/Figures/Fig2to7.Rmd ADDED
@@ -0,0 +1,992 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Figures 2 to 7"
3
+ output: pdf_document
4
+ ---
5
+
6
+ ```{r setup, include=FALSE}
7
+ knitr::opts_chunk$set(echo = F, warning = F, message = F)
8
+ ```
9
+
10
+ ```{r, include = F, echo = F}
11
+ # Importing Packages
12
+ rm(list=ls())
13
+ gc()
14
+ library(tidyverse)
15
+ library(extrafont)
16
+ library(gtable)
17
+ library(ggplot2)
18
+ library(gridExtra)
19
+ library(grid)
20
+ library(cowplot)
21
+ library(grDevices)
22
+ loadfonts()
23
+ ```
24
+
25
+ ```{r}
26
+ # SPECIFY DIRECTORY OF THE REPLICATION PACKAGE
27
+ setwd("C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing")
28
+
29
+ # IMPORTING DATASETS
30
+ datafig_2_l = read_csv('Out/Figures_data/figure_2_l_data.csv', show_col_types = FALSE)
31
+ datafig_2_r = read_csv('Out/Figures_data/figure_2_r_data.csv', show_col_types = FALSE)
32
+ datafig_3_a_l = read_csv('Out/Figures_data/figure_3_a_l_data.csv', show_col_types = FALSE)
33
+ datafig_3_a_r = read_csv('Out/Figures_data/figure_3_a_r_data.csv', show_col_types = FALSE)
34
+ datafig_3_b_l = read_csv('Out/Figures_data/figure_3_b_l_data.csv', show_col_types = FALSE)
35
+ datafig_3_b_r = read_csv('Out/Figures_data/figure_3_b_r_data.csv', show_col_types = FALSE)
36
+ datafig_4_a_l = read_csv('Out/Figures_data/figure_4_a_l_data.csv', show_col_types = FALSE)
37
+ datafig_4_a_r = read_csv('Out/Figures_data/figure_4_a_r_data.csv', show_col_types = FALSE)
38
+ datafig_4_b_l = read_csv('Out/Figures_data/figure_4_b_l_data.csv', show_col_types = FALSE)
39
+ datafig_4_b_r = read_csv('Out/Figures_data/figure_4_b_r_data.csv', show_col_types = FALSE)
40
+ datafig_5_a_l = read_csv('Out/Figures_data/figure_5_a_l_data.csv', show_col_types = FALSE)
41
+ datafig_5_a_r = read_csv('Out/Figures_data/figure_5_a_r_data.csv', show_col_types = FALSE)
42
+ datafig_5_b_l = read_csv('Out/Figures_data/figure_5_b_l_data.csv', show_col_types = FALSE)
43
+ datafig_5_b_r = read_csv('Out/Figures_data/figure_5_b_r_data.csv', show_col_types = FALSE)
44
+ datafig_6_a_l = read_csv('Out/Figures_data/figure_6_a_l_data.csv', show_col_types = FALSE)
45
+ datafig_6_a_r = read_csv('Out/Figures_data/figure_6_a_r_data.csv', show_col_types = FALSE)
46
+ datafig_6_b_l = read_csv('Out/Figures_data/figure_6_b_l_data.csv', show_col_types = FALSE)
47
+ datafig_6_b_r = read_csv('Out/Figures_data/figure_6_b_r_data.csv', show_col_types = FALSE)
48
+ datafig_7_l = read_csv('Out/Figures_data/figure_7_l_data.csv', show_col_types = FALSE)
49
+ datafig_7_r = read_csv('Out/Figures_data/figure_7_r_data.csv', show_col_types = FALSE)
50
+
51
+ # Standardize the dataset labels of Figure 2
52
+ datafig_2_r$t = datafig_3_a_r$t
53
+ ```
54
+
55
+ ```{r}
56
+ # Function to Export Figures: # SPECIFY DIRECTORY OF THE REPLICATION PACKAGE
57
+
58
+ FigureExporter = function(Figure, Name, WhereFolderDraft = "C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"){
59
+ figure_name <- Name
60
+ figures_dir <- file.path(WhereFolderDraft, 'Out/Figures')
61
+ fig_path <- file.path(figures_dir, figure_name)
62
+ png(fig_path, width = 4800, height=2700, res = 720, type = c("cairo-png"))
63
+ Figure1 = Figure
64
+ print(Figure1)
65
+ }
66
+ ```
67
+
68
+
69
+ ```{r}
70
+ # Data Adjustment for Cleaning (Left Panel) Function
71
+
72
+ DataAdjust = function(data){
73
+ data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")]
74
+ data$m_perc <- data$m_perc/100
75
+ data$m_real <- data$m_real/100
76
+ data <- transform(data,
77
+ lbound = lb_perc/100,
78
+ ubound = ub_perc/100
79
+ )
80
+
81
+ diff <- data %>%
82
+ mutate(Max = max(m_perc, m_real),
83
+ Min = min(m_perc, m_real),
84
+ Diff = Max / Min - 1) %>%
85
+ arrange(desc(Diff))
86
+
87
+ # Create difference between perception and real
88
+ data$diff <- (data$m_perc - data$m_real)/data$m_real
89
+ data_adj = data
90
+ data_adj
91
+ }
92
+ ```
93
+
94
+
95
+ ```{r}
96
+ # Data Adjustment for Cleaning (Left Panel) Function - Without Rescaling
97
+
98
+ DataAdjustNoResc = function(data){
99
+ data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")]
100
+ data$m_perc <- data$m_perc
101
+ data$m_real <- data$m_real
102
+ data <- transform(data,
103
+ lbound = lb_perc,
104
+ ubound = ub_perc)
105
+
106
+ diff <- data %>%
107
+ mutate(Max = max(m_perc, m_real),
108
+ Min = min(m_perc, m_real),
109
+ Diff = Max / Min - 1) %>%
110
+ arrange(desc(Diff))
111
+
112
+ # Create difference between perception and real
113
+ data$diff <- (data$m_perc - data$m_real)/data$m_real
114
+ data_adj = data
115
+ data_adj
116
+ }
117
+ ```
118
+
119
+
120
+ ```{r}
121
+ # Left Panel Function (from Cleaned Dataset)
122
+
123
+ LeftPanelAdjustedData = function(data_adj, label, x_lb, x_upb, distance_ticks,
124
+ labelActual = "Actual", labelMean = "Perceived (mean)"){
125
+ p <- ggplot(data_adj, aes(x=t)) +
126
+ ## Plot segment joining and points
127
+ geom_segment(aes(x=t, xend=t, y=m_real, yend=m_perc), size = 0.4, color="black") +
128
+ 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)) +
129
+ geom_point(aes(x=t, y=m_real, colour='Actual', shape = "Actual"), size=4) +
130
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
131
+ coord_flip()
132
+
133
+ ## Add theme, labels, and modify scale
134
+ myshapes <- c("my_b" = "15", "my_d" = "18")
135
+ p1 <- p +
136
+ scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0),
137
+ limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) +
138
+ theme_light() +
139
+ theme(
140
+ ## Control grid
141
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
142
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
143
+
144
+ ## Control legend
145
+ legend.position = "bottom",
146
+ legend.box = "horizontal",
147
+ legend.justification = c(0.5,0),
148
+ legend.title = element_blank(),
149
+ text = element_text(family = "LM Roman 10", color='black', size=10),
150
+ axis.text = element_text(colour = 'black'),
151
+ axis.text.x = element_text(size=9),
152
+ axis.text.y = element_text(size=9),
153
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
154
+ axis.ticks.x = element_blank()
155
+ ) +
156
+ theme(legend.text=element_text(size=8))+
157
+ scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) +
158
+ scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) +
159
+ xlab("") +
160
+ ylab(label)
161
+ p1}
162
+ ```
163
+
164
+ ```{r}
165
+ # Left Panel Function (from Initial Dataset)
166
+
167
+ LeftPanel = function(data, label, x_lb, x_upb, distance_ticks,
168
+ labelActual = "Actual", labelMean = "Perceived (mean)"){
169
+
170
+ #Cleaning Data
171
+ data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")]
172
+ data$m_perc <- data$m_perc/100
173
+ data$m_real <- data$m_real/100
174
+ data <- transform(data,
175
+ lbound = lb_perc/100,
176
+ ubound = ub_perc/100
177
+ )
178
+
179
+ diff <- data %>%
180
+ mutate(Max = max(m_perc, m_real),
181
+ Min = min(m_perc, m_real),
182
+ Diff = Max / Min - 1) %>%
183
+ arrange(desc(Diff))
184
+
185
+ ## Create difference between perception and real
186
+ data$diff <- (data$m_perc - data$m_real)/data$m_real
187
+
188
+ #Plot
189
+
190
+ p <- ggplot(data, aes(x=t)) +
191
+ ## Plot segment joining and points
192
+ geom_segment(aes(x=t, xend=t, y=m_real, yend=m_perc), size = 0.4, color="black") +
193
+ geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) +
194
+ geom_point(aes(x=t, y=m_real, colour='Actual', shape = "Actual"), size=4) +
195
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
196
+ coord_flip()
197
+
198
+ ## Add theme, labels, and modify scale
199
+ myshapes <- c("my_b" = "15", "my_d" = "18")
200
+ p1 <- p +
201
+ scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0),
202
+ limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) +
203
+ theme_light() +
204
+ theme(
205
+ ## Control grid
206
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
207
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
208
+
209
+ ## Control legend
210
+ legend.position = "bottom",
211
+ legend.box = "horizontal",
212
+ legend.justification = c(0.5,0),
213
+ legend.title = element_blank(),
214
+ text = element_text(family = "LM Roman 10", color='black', size=11),
215
+ axis.text = element_text(colour = 'black'),
216
+ axis.text.x = element_text(size=9),
217
+ axis.text.y = element_text(size=9),
218
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
219
+ axis.ticks.x = element_blank()
220
+ ) +
221
+ theme(legend.text=element_text(size=9))+
222
+ scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) +
223
+ scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) +
224
+ xlab("") +
225
+ ylab(label)
226
+ p1}
227
+ ```
228
+
229
+ ```{r}
230
+ # Right Panel Function
231
+
232
+ RightPanel = function(data, label, x_lb, x_upb){
233
+
234
+ ## Load and clean data
235
+ data[is.na(data)]<-0
236
+ data$b <- data$bY + data$bN
237
+ data$lb <- data$lb_bY + data$lb_bN
238
+ data$ub <- data$ub_bY + data$ub_bN
239
+ data <- data[which(data$b!=0),c("t","b", "lb", "ub")]
240
+
241
+ groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1)
242
+ data$group <- groups
243
+
244
+ mylabs <- c(0,1,1,0,1,0,0,1,0,1,0,1,1,0,0)
245
+ data$mylabs <- mylabs
246
+
247
+ data[which(data$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.'
248
+ data[which(data$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College'
249
+ data[which(data$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College'
250
+ data[which(data$t=='Rich'),'t'] <- 'High Income'
251
+ data[which(data$t=='Not Rich'),'t'] <- 'Low Income'
252
+ data[which(data$t=='Not College'),'t'] <- 'No College'
253
+ data[which(data$t=='Right-Wing'),'t'] <- 'Right-Wing'
254
+ data[which(data$t=='Left-Wing'),'t'] <- 'Left-Wing'
255
+
256
+ #Plot
257
+ p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) +
258
+ geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t, colour = factor(mylabs), alpha = 0.05), size = 2) +
259
+ geom_point(aes(x=b,y=t, colour=factor(mylabs), shape=factor(mylabs), size = factor(mylabs))) +
260
+ facet_grid(group ~ ., space = 'free_y', scales = "free_y") +
261
+ xlim(x_lb,x_upb) +
262
+ xlab(label) +
263
+ theme_light() +
264
+ theme(
265
+ legend.position = 'none', axis.line=element_blank(), #Removing the axis
266
+ panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'),
267
+ panel.grid.major.y = element_blank(),
268
+ text = element_text(family = "LM Roman 10", size = 11, colour = "black"),
269
+ axis.text = element_text(size = 11, colour = 'black'),
270
+ panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs
271
+ strip.background = element_blank(),
272
+ strip.text.y = element_blank(),
273
+ axis.text.y = element_text(size=9),
274
+ axis.title.y = element_blank(),
275
+ ### Add spacing for xlabel
276
+ axis.title.x = element_text(size = 9, margin = margin(t = 13)),
277
+ axis.ticks=element_blank(), #Removing the ticks
278
+ panel.spacing.y = unit(0, "lines")
279
+ ) +
280
+ theme(legend.text=element_text(size=9))+
281
+ scale_colour_manual(values = c(rgb(0.7,0.2,0.1,1),'#F6891B'))+
282
+ scale_shape_manual(values=c(18,15))+
283
+ scale_size_manual(values=c(4,3))
284
+ p2}
285
+ ```
286
+
287
+
288
+
289
+ ```{r}
290
+ # Right Panel Function, with Percentages on the X-Axis
291
+
292
+ RightPanelPercentage = function(data, label, x_lb, x_upb, distance_ticks){
293
+
294
+ ## Load and Clean Data
295
+ data[is.na(data)]<-0
296
+ data$b <- data$bY + data$bN
297
+ data$lb <- data$lb_bY + data$lb_bN
298
+ data$ub <- data$ub_bY + data$ub_bN
299
+ data <- data[which(data$b!=0),c("t","b", "lb", "ub")]
300
+
301
+ groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1)
302
+ data$group <- groups
303
+
304
+ mylabs <- c(0,1,1,0,1,0,0,1,0,1,0,1,1,0,0)
305
+ data$mylabs <- mylabs
306
+
307
+ data[which(data$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.'
308
+ data[which(data$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College'
309
+ data[which(data$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College'
310
+ data[which(data$t=='Rich'),'t'] <- 'High Income'
311
+ data[which(data$t=='Not Rich'),'t'] <- 'Low Income'
312
+ data[which(data$t=='Not College'),'t'] <- 'No College'
313
+
314
+ #Create loop to add "%" sign to any break value
315
+ m = rep(NA, length(seq(x_lb, x_upb, by = distance_ticks)))
316
+ for (i in seq(from = 1, to = length(seq(x_lb, x_upb, by = distance_ticks)))){
317
+ m[i] = paste(round(100*seq(x_lb, x_upb, by = distance_ticks)[i]),"%", sep="")}
318
+
319
+ #Plot
320
+ p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) +
321
+ geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t, colour = factor(mylabs), alpha = 0.05), size = 2) +
322
+ geom_point(aes(x=b,y=t, colour=factor(mylabs), shape=factor(mylabs), size = factor(mylabs))) +
323
+ facet_grid(group ~ ., space = 'free_y', scales = "free_y") +
324
+ scale_x_continuous(breaks = seq(x_lb, x_upb, by = distance_ticks), labels = m) +
325
+ xlab(label) +
326
+ theme_light() +
327
+ theme(
328
+ legend.position = 'none', axis.line=element_blank(), #Removing the axis
329
+ panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'),
330
+ panel.grid.major.y = element_blank(),
331
+ text = element_text(family = "LM Roman 10", size = 11, colour = "black"),
332
+ axis.text = element_text(size = 10, colour = 'black'),
333
+ panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs
334
+ strip.background = element_blank(),
335
+ strip.text.y = element_blank(),
336
+ axis.text.x = element_text(size=9),
337
+ axis.text.y = element_text(size=9),
338
+ axis.title.y = element_blank(),
339
+ ### Add spacing for xlabel
340
+ axis.title.x = element_text(size = 9, margin = margin(t = 13)),
341
+ axis.ticks=element_blank(), #Removing the ticks
342
+ panel.spacing.y = unit(0, "lines")
343
+ ) +
344
+ theme(legend.text=element_text(size=9))+
345
+ scale_colour_manual(values = c(rgb(0.7,0.2,0.1,1),'#F6891B'))+
346
+ scale_shape_manual(values=c(18,15))+
347
+ scale_size_manual(values=c(4,3))
348
+ p2}
349
+ ```
350
+
351
+
352
+
353
+
354
+ ```{r}
355
+ ###Final Figure Function: creates the Final Figure, assemblying Panels
356
+
357
+ FinalPlot = function(DataLeft, LabelLeft, LowerLeft, UpperLeft, TicksLeft,
358
+ DataRight, LabelRight, LowerRight, UpperRight){
359
+ #Plot
360
+ p1 <- LeftPanel(DataLeft, LabelLeft, LowerLeft, UpperLeft, TicksLeft)
361
+ p2 <- RightPanel(DataRight, LabelRight, LowerRight, UpperRight)
362
+ Final_Plot <- plot_grid(p1,p2, labels=NULL, ncol=2, align='h', axis='b')
363
+ plot(Final_Plot)
364
+ }
365
+ ```
366
+
367
+ ```{r}
368
+ lay <- rbind(c(0,0,0,0,1,1,1,1), c(0,0,0,0,1,1,1,1))
369
+ ```
370
+
371
+
372
+ #Figure 2
373
+
374
+ ```{r}
375
+ # Generate Figure
376
+ FinalPlot(datafig_2_l, "Share of Immigrants", 0, .40 , .1, datafig_2_r, "Misperception (in % points)", 0, 30)
377
+
378
+ # Export
379
+ FigureExporter(FinalPlot(datafig_2_l, "Share of Immigrants", 0, .40 , .1, datafig_2_r, "Misperception (in % points)", 0, 30), "Figure_2.png")
380
+ ```
381
+
382
+
383
+ #Figure 3 Panel A
384
+
385
+ ```{r}
386
+ # Generate Figure
387
+ FinalPlot(datafig_3_a_l, "Share of Muslim Immigrants", 0, .55 , .1, datafig_3_a_r, "Misperception (in % points)", 0, 20)
388
+
389
+ # Export
390
+ 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")
391
+ ```
392
+
393
+ \newpage
394
+
395
+
396
+ #Figure 3 Panel B
397
+
398
+ ```{r}
399
+ # Generate Figure
400
+ FinalPlot(datafig_3_b_l, "Share of Christian Immigrants", 0, .65 , .1, datafig_3_b_r, "Misperception (in % points)", -30, 0)
401
+
402
+ # Export
403
+ 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")
404
+ ```
405
+
406
+
407
+ #Figure 4 Panel A
408
+
409
+ ```{r}
410
+ # Left Panel
411
+
412
+ #Adjust Data
413
+ 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")]
414
+
415
+ LeftPanelAdjustedData9 = function(data_adj, label, x_lb, x_upb, distance_ticks,
416
+ labelActual = "Natives", labelMean = "Immigrants"){
417
+ p <- ggplot(data_adj, aes(x=t)) +
418
+ ## Plot segment joining and points
419
+ 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)) +
420
+ geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) +
421
+ geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) +
422
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
423
+ coord_flip()
424
+
425
+ ## Add theme, labels, and modify scale
426
+ myshapes <- c("my_b" = "15", "my_d" = "18")
427
+ p1 <- p +
428
+ scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) +
429
+ theme_light() +
430
+ theme(
431
+ ## Control grid
432
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
433
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
434
+
435
+ ## Control legend
436
+ legend.position = "bottom",
437
+ legend.box = "horizontal",
438
+ legend.justification = c(0.4,0),
439
+ legend.title = element_blank(),
440
+ text = element_text(family = "LM Roman 10", color='black', size=10),
441
+ axis.text = element_text(colour = 'black'),
442
+ axis.text.x = element_text(size=9),
443
+ axis.text.y = element_text(size=9),
444
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
445
+ axis.ticks.x = element_blank()
446
+ ) +
447
+ theme(legend.text=element_text(size=9))+
448
+ scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) +
449
+ scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) +
450
+ xlab("") +
451
+ ylab(label)
452
+ p1}
453
+ ```
454
+
455
+ ```{r}
456
+ # Rigth Panel
457
+
458
+ #Adjust Data
459
+ ## Load and Clean Data
460
+ datafig_4_a_r[is.na(datafig_4_a_r)]<-0
461
+ datafig_4_a_r_adj = datafig_4_a_r
462
+ datafig_4_a_r_adj$b <- datafig_4_a_r$bY + datafig_4_a_r$bN
463
+ datafig_4_a_r_adj$lb <- datafig_4_a_r$lb_bY + datafig_4_a_r$lb_bN
464
+ datafig_4_a_r_adj$ub <- datafig_4_a_r$ub_bY + datafig_4_a_r$ub_bN
465
+ datafig_4_a_r_adj$bN <- datafig_4_a_r$bNY + datafig_4_a_r$bNN
466
+ datafig_4_a_r_adj$lbN <- datafig_4_a_r$lb_bNY + datafig_4_a_r$lb_bNN
467
+ datafig_4_a_r_adj$ubN <- datafig_4_a_r$ub_bNY + datafig_4_a_r$ub_bNN
468
+ 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")]
469
+
470
+ groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1)
471
+ datafig_4_a_r_adj$group <- groups
472
+
473
+ mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
474
+ datafig_4_a_r_adj$mylabs <- mylabs
475
+
476
+ mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
477
+ datafig_4_a_r_adj$mylabs1 <- mylabs1
478
+
479
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.'
480
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College'
481
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College'
482
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Rich'),'t'] <- 'High Income'
483
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Not Rich'),'t'] <- 'Low Income'
484
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Not College'),'t'] <- 'No College'
485
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing'
486
+ datafig_4_a_r_adj[which(datafig_4_a_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing'
487
+
488
+ #Plot
489
+ RightPanel9 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){
490
+ p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) +
491
+ geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5,
492
+ shape = 18, size = 2) +
493
+ geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) +
494
+ geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15,
495
+ alpha = 0.5, size = 2) +
496
+ geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) +
497
+ facet_grid(group ~ ., space = 'free_y', scales = "free_y") +
498
+ xlim(x_lb,x_upb) +
499
+ xlab(label) +
500
+ theme_light() +
501
+ theme(
502
+ axis.line=element_blank(), #Removing the axis
503
+ panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'),
504
+ panel.grid.major.y = element_blank(),
505
+ text = element_text(family = "LM Roman 10", size = 10, colour = "black"),
506
+ axis.text = element_text(size = 10, colour = 'black'),
507
+ panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs
508
+ strip.background = element_blank(),
509
+ strip.text.y = element_blank(),
510
+ axis.title.y = element_blank(),
511
+ ### Add spacing for xlabel
512
+ axis.ticks=element_blank(), #Removing the ticks
513
+ panel.spacing.y = unit(0, "lines"),
514
+
515
+ ## Control legend
516
+ legend.position = "bottom",
517
+ legend.box = "horizontal",
518
+ legend.justification = c(0.85,0),
519
+ legend.title = element_blank(),
520
+ axis.text.x = element_text(size=9),
521
+ axis.text.y = element_text(size=9),
522
+ axis.title.x = element_text(size = 9, margin = margin(t=11)),
523
+ axis.ticks.x = element_blank()
524
+ ) +
525
+ theme(legend.text=element_text(size=9)) +
526
+ scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) +
527
+ scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18))
528
+ p2}
529
+ ```
530
+
531
+ ```{r}
532
+ # Generate Figure
533
+ plot_grid(LeftPanelAdjustedData9(datafig_4_a_l_adj, "Misperception (in % points)", -25, 30 , 5, "Non-immigrants", "Immigrants"),
534
+ RightPanel9(datafig_4_a_r_adj, "Misperception (in % points)", -15, 15, "Non-immigrants", "Immigrants"),
535
+ labels=NULL, ncol=2, align='h', axis='b')
536
+
537
+ # Export
538
+ FigureExporter(plot_grid(LeftPanelAdjustedData9(datafig_4_a_l_adj, "Misperception (in % points)", -25, 30 , 5, "Non-immigrants", "Immigrants"),
539
+ RightPanel9(datafig_4_a_r_adj, "Misperception (in % points)", -15, 15, "Non-immigrants", "Immigrants"),
540
+ labels=NULL, ncol=2, align='h', axis='b'),
541
+ "Figure_4_A.png")
542
+ ```
543
+
544
+
545
+ #Figure 4 Panel B
546
+
547
+ ```{r}
548
+ # Left Panel
549
+
550
+ #Adjust Data
551
+ 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")]
552
+
553
+ LeftPanelAdjustedData9 = function(data_adj, label, x_lb, x_upb, distance_ticks,
554
+ labelActual = "Natives", labelMean = "Immigrants"){
555
+ p <- ggplot(data_adj, aes(x=t)) +
556
+ ## Plot segment joining and points
557
+ 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)) +
558
+ geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) +
559
+ geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) +
560
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
561
+ coord_flip()
562
+
563
+ ## Add theme, labels, and modify scale
564
+ myshapes <- c("my_b" = "15", "my_d" = "18")
565
+ p1 <- p +
566
+ scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) +
567
+ theme_light() +
568
+ theme(
569
+ ## Control grid
570
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
571
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
572
+
573
+ ## Control legend
574
+ legend.position = "bottom",
575
+ legend.box = "horizontal",
576
+ legend.justification = c(0.4,0),
577
+ legend.title = element_blank(),
578
+ text = element_text(family = "LM Roman 10", color='black', size=10),
579
+ axis.text = element_text(colour = 'black'),
580
+ axis.text.x = element_text(size=9),
581
+ axis.text.y = element_text(size=9),
582
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
583
+ axis.ticks.x = element_blank()
584
+ ) +
585
+ theme(legend.text=element_text(size=9))+
586
+ scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) +
587
+ scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) +
588
+ xlab("") +
589
+ ylab(label)
590
+ p1}
591
+ ```
592
+
593
+ ```{r}
594
+ # Rigth Panel
595
+
596
+ #Adjust Data
597
+ ## Load and Clean Data
598
+ datafig_4_b_r[is.na(datafig_4_b_r)]<-0
599
+ datafig_4_b_r_adj = datafig_4_b_r
600
+ datafig_4_b_r_adj$b <- datafig_4_b_r$bY + datafig_4_b_r$bN
601
+ datafig_4_b_r_adj$lb <- datafig_4_b_r$lb_bY + datafig_4_b_r$lb_bN
602
+ datafig_4_b_r_adj$ub <- datafig_4_b_r$ub_bY + datafig_4_b_r$ub_bN
603
+ datafig_4_b_r_adj$bN <- datafig_4_b_r$bNY + datafig_4_b_r$bNN
604
+ datafig_4_b_r_adj$lbN <- datafig_4_b_r$lb_bNY + datafig_4_b_r$lb_bNN
605
+ datafig_4_b_r_adj$ubN <- datafig_4_b_r$ub_bNY + datafig_4_b_r$ub_bNN
606
+ 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")]
607
+
608
+ groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1)
609
+ datafig_4_b_r_adj$group <- groups
610
+
611
+ mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
612
+ datafig_4_b_r_adj$mylabs <- mylabs
613
+
614
+ mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
615
+ datafig_4_b_r_adj$mylabs1 <- mylabs1
616
+
617
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.'
618
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College'
619
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College'
620
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Rich'),'t'] <- 'High Income'
621
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Not Rich'),'t'] <- 'Low Income'
622
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Not College'),'t'] <- 'No College'
623
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing'
624
+ datafig_4_b_r_adj[which(datafig_4_b_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing'
625
+
626
+ #Plot
627
+ RightPanel9 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){
628
+ p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) +
629
+ geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5,
630
+ shape = 18, size = 2) +
631
+ geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) +
632
+ geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15,
633
+ alpha = 0.5, size = 2) +
634
+ geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) +
635
+ facet_grid(group ~ ., space = 'free_y', scales = "free_y") +
636
+ xlim(x_lb,x_upb) +
637
+ xlab(label) +
638
+ theme_light() +
639
+ theme(
640
+ axis.line=element_blank(), #Removing the axis
641
+ panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'),
642
+ panel.grid.major.y = element_blank(),
643
+ text = element_text(family = "LM Roman 10", size = 10, colour = "black"),
644
+ axis.text = element_text(size = 10, colour = 'black'),
645
+ panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs
646
+ strip.background = element_blank(),
647
+ strip.text.y = element_blank(),
648
+ axis.title.y = element_blank(),
649
+ ### Add spacing for xlabel
650
+ axis.ticks=element_blank(), #Removing the ticks
651
+ panel.spacing.y = unit(0, "lines"),
652
+
653
+ ## Control legend
654
+ legend.position = "bottom",
655
+ legend.box = "horizontal",
656
+ legend.justification = c(0.85,0),
657
+ legend.title = element_blank(),
658
+ axis.text.x = element_text(size=9),
659
+ axis.text.y = element_text(size=9),
660
+ axis.title.x = element_text(size = 9, margin = margin(t=11)),
661
+ axis.ticks.x = element_blank()
662
+ ) +
663
+ theme(legend.text=element_text(size=9)) +
664
+ scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) +
665
+ scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18))
666
+ p2}
667
+ ```
668
+
669
+ ```{r}
670
+ # Generate Figure
671
+ plot_grid(LeftPanelAdjustedData9(datafig_4_b_l_adj, "Misperception (in % points)", 5, 35 , 5, "Non-immigrants", "Immigrants"),
672
+ RightPanel9(datafig_4_b_r_adj, "Misperception (in % points)", 0, 35, "Non-immigrants", "Immigrants"),
673
+ labels=NULL, ncol=2, align='h', axis='b')
674
+
675
+ # Export
676
+ FigureExporter(plot_grid(LeftPanelAdjustedData9(datafig_4_b_l_adj, "Misperception (in % points)", 5, 35 , 5, "Non-immigrants", "Immigrants"),
677
+ RightPanel9(datafig_4_b_r_adj, "Misperception (in % points)", 0, 35, "Non-immigrants", "Immigrants"),
678
+ labels=NULL, ncol=2, align='h', axis='b'),
679
+ "Figure_4_B.png")
680
+ ```
681
+
682
+ \newpage
683
+
684
+
685
+ #Figure 5 Panel A
686
+
687
+ ```{r}
688
+ # Data adjustment for Left Panel: no rescaling needed
689
+ datafig_5_a_l_adj = DataAdjustNoResc(datafig_5_a_l)
690
+
691
+ # Generate Figure
692
+ plot_grid(LeftPanelAdjustedData(datafig_5_a_l_adj, "Share of Respondents", 0.1, .5 , .1,
693
+ "Alesina et al. (2018)", "Q on Imm."),
694
+ RightPanelPercentage(datafig_5_a_r, "Share of Respondents", 0.2, 0.6, 0.1),
695
+ labels=NULL, ncol=2, align='h', axis='b')
696
+
697
+ # Export
698
+ FigureExporter(plot_grid(LeftPanelAdjustedData(datafig_5_a_l_adj, "Share of Respondents", 0.1, .5 , .1,
699
+ "Alesina et al. (2018)", "Q on Imm."),
700
+ RightPanelPercentage(datafig_5_a_r, "Share of Respondents", 0.2, 0.6, 0.1),
701
+ labels=NULL, ncol=2, align='h', axis='b'), "Figure_5_A.png")
702
+ ```
703
+
704
+
705
+ #Figure 5 Panel B
706
+
707
+ ```{r}
708
+ # Data Adjustment
709
+ datafig_5_b_l_adj = DataAdjustNoResc(datafig_5_b_l)
710
+
711
+ # Generate Figure
712
+ plot_grid(LeftPanelAdjustedData(datafig_5_b_l_adj, "Share of Respondents", 0.15, .8 , .1,
713
+ "Alesina et al. (2018)", "Q on Imm."),
714
+ RightPanelPercentage(datafig_5_b_r, "Share of Respondents", 0.50, 0.8, 0.05),
715
+ labels=NULL, ncol=2, align='h', axis='b')
716
+
717
+ # Export
718
+ FigureExporter(plot_grid(LeftPanelAdjustedData(datafig_5_b_l_adj, "Share of Respondents", 0.15, .8 , .1,
719
+ "Alesina et al. (2018)", "Q on Imm."),
720
+ RightPanelPercentage(datafig_5_b_r, "Share of Respondents", 0.50, 0.8, 0.05),
721
+ labels=NULL, ncol=2, align='h', axis='b'), "Figure_5_B.png")
722
+ ```
723
+
724
+
725
+ #Figure 6 Panel A
726
+
727
+ ```{r}
728
+ # Left Panel
729
+
730
+ ##Data Adjustment (do not consider m_real as missing)
731
+ datafig_6_a_l_adj = datafig_6_a_l[datafig_6_a_l$t %in% c("Sweden", "Germany", "Italy",
732
+ "France", "UK", "US"), !names(datafig_6_a_l) %in% c("n","m_real")]
733
+ datafig_6_a_l_adj$m_perc <- datafig_6_a_l_adj$m_perc
734
+ datafig_6_a_l_adj <- transform(datafig_6_a_l_adj,
735
+ lbound = lb_perc,
736
+ ubound = ub_perc)
737
+
738
+ ##Graph
739
+ LeftPanel_NoActual = function(data_adj, label, xlb, xupb, distance_ticks){
740
+ p <- ggplot(data_adj, aes(x=t)) +
741
+ ## Plot segment joining and points
742
+ geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) +
743
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
744
+ coord_flip()
745
+
746
+ ## Add theme, labels, and modify scale
747
+ myshapes <- c("my_b" = "15", "my_d" = "18")
748
+ p1 <- p +
749
+ scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0),
750
+ limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) +
751
+ theme_light() +
752
+ theme(
753
+ ## Control grid
754
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
755
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
756
+
757
+ ## Control legend
758
+ legend.position = "none",
759
+ legend.box = "horizontal",
760
+ legend.justification = c(0.5,0),
761
+ legend.title = element_blank(),
762
+ text = element_text(family = "LM Roman 10", color='black', size=10),
763
+ axis.text = element_text(colour = 'black'),
764
+ axis.text.x = element_text(size=9),
765
+ axis.text.y = element_text(size=9),
766
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
767
+ axis.ticks.x = element_blank()) +
768
+ theme(legend.text=element_text(size=9))+
769
+ scale_colour_manual(name = "", labels = 'Perceived (mean)', values =rgb(0.7,0.2,0.1,1)) +
770
+ scale_shape_manual(name = "", labels = c('Perceived (mean)'), values = 15) +
771
+ xlab("") +
772
+ ylab(label)
773
+
774
+ p1}
775
+ ```
776
+
777
+
778
+ ```{r}
779
+ # Generate Figure
780
+ plot_grid(LeftPanel_NoActual(datafig_6_a_l_adj, "Share of Respondents", 0.05, 0.3, 0.05) ,
781
+ RightPanelPercentage(datafig_6_a_r, "Share of Respondents", 0.05, 0.25, 0.05),
782
+ labels=NULL, ncol=2, align='h', axis='b')
783
+
784
+ # Export
785
+ FigureExporter(plot_grid(LeftPanel_NoActual(datafig_6_a_l_adj, "Share of Respondents", 0.05, 0.3, 0.05) ,
786
+ RightPanelPercentage(datafig_6_a_r, "Share of Respondents", 0.05, 0.25, 0.05),
787
+ labels=NULL, ncol=2, align='h', axis='b'), "Figure_6_A.png")
788
+ ```
789
+
790
+
791
+ #Figure 6 Panel B
792
+
793
+ ```{r}
794
+ # Left Panel
795
+
796
+ ##Data Adjustment (do not consider m_real as missing)
797
+ datafig_6_b_l_adj = datafig_6_b_l[datafig_6_b_l$t %in% c("Sweden", "Germany", "Italy",
798
+ "France", "UK", "US"), !names(datafig_6_b_l) %in% c("n","m_real")]
799
+ datafig_6_b_l_adj$m_perc <- datafig_6_b_l_adj$m_perc
800
+ datafig_6_b_l_adj <- transform(datafig_6_b_l_adj,
801
+ lbound = lb_perc,
802
+ ubound = ub_perc)
803
+
804
+ ##Graph
805
+ LeftPanel_NoActual = function(data_adj, label, xlb, xupb, distance_ticks){
806
+ p <- ggplot(data_adj, aes(x=t)) +
807
+ ## Plot segment joining and points
808
+ geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) +
809
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
810
+ coord_flip()
811
+
812
+ ## Add theme, labels, and modify scale
813
+ myshapes <- c("my_b" = "15", "my_d" = "18")
814
+ p1 <- p +
815
+ scale_y_continuous(labels = scales::percent_format(accuracy = 5L), expand = c(0.02, 0),
816
+ limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) +
817
+ theme_light() +
818
+ theme(
819
+ ## Control grid
820
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
821
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
822
+
823
+ ## Control legend
824
+ legend.position = "none",
825
+ legend.box = "horizontal",
826
+ legend.justification = c(0.5,0),
827
+ legend.title = element_blank(),
828
+ text = element_text(family = "LM Roman 10", color='black', size=11),
829
+ axis.text = element_text(colour = 'black'),
830
+ axis.text.x = element_text(size=9),
831
+ axis.text.y = element_text(size=9),
832
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
833
+ axis.ticks.x = element_blank(),
834
+ ) +
835
+ theme(legend.text=element_text(size=9))+
836
+ scale_colour_manual(name = "", labels = 'Perceived (mean)', values =rgb(0.7,0.2,0.1,1)) +
837
+ scale_shape_manual(name = "", labels = c('Perceived (mean)'), values = 15) +
838
+ xlab("") +
839
+ ylab(label)
840
+
841
+ p1}
842
+ ```
843
+
844
+ ```{r}
845
+ # Generate Figure
846
+ plot_grid(LeftPanel_NoActual(datafig_6_b_l_adj, "Share of Respondents", 0, 0.4, 0.1) ,
847
+ RightPanelPercentage(datafig_6_b_r, "Share of Respondents", 0.1, 0.4, 0.05),
848
+ labels=NULL, ncol=2, align='h', axis='b')
849
+
850
+ # Export
851
+ FigureExporter(plot_grid(LeftPanel_NoActual(datafig_6_b_l_adj, "Share of Respondents", 0, 0.4, 0.1) ,
852
+ RightPanelPercentage(datafig_6_b_r, "Share of Respondents", 0.1, 0.4, 0.05),
853
+ labels=NULL, ncol=2, align='h', axis='b'), "Figure_6_B.png")
854
+ ```
855
+
856
+ \newpage
857
+
858
+
859
+ #Figure 7
860
+
861
+ ```{r}
862
+ # Left Panel
863
+
864
+ #Adjust Data
865
+ 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")]
866
+
867
+ LeftPanelAdjustedData12 = function(data_adj, label, x_lb, x_upb, distance_ticks,
868
+ labelActual = "Natives", labelMean = "Immigrants"){
869
+ p <- ggplot(data_adj, aes(x=t)) +
870
+ ## Plot segment joining and points
871
+ 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)) +
872
+ geom_segment(aes(x=t, xend=t, y=lb_nat, yend=ub_nat), size = 2, color = "#0080FF", alpha = 0.3) +
873
+ geom_point(aes(x=t, y=m_nat, colour='Actual', shape = "Actual"), size=4) +
874
+ geom_point(aes(x=t, y=m_perc, colour="Mean", shape = "Mean"), size=3) +
875
+ coord_flip()
876
+
877
+ ## Add theme, labels, and modify scale
878
+ myshapes <- c("my_b" = "15", "my_d" = "18")
879
+ p1 <- p +
880
+ scale_y_continuous(limits = c(x_lb, x_upb), breaks = seq(x_lb, x_upb, by = distance_ticks)) +
881
+ theme_light() +
882
+ theme(
883
+ ## Control grid
884
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
885
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
886
+
887
+ ## Control legend
888
+ legend.position = "bottom",
889
+ legend.box = "horizontal",
890
+ legend.justification = c(0.3,0),
891
+ legend.title = element_blank(),
892
+ text = element_text(family = "LM Roman 10", color='black', size=10),
893
+ axis.text = element_text(colour = 'black'),
894
+ axis.text.x = element_text(size=9),
895
+ axis.text.y = element_text(size=9),
896
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
897
+ axis.ticks.x = element_blank()
898
+ ) +
899
+ theme(legend.text=element_text(size=9))+
900
+ scale_colour_manual(name = "", labels = c(labelActual,labelMean), values = c(Actual="#0080FF", Mean=rgb(0.7,0.2,0.1,1))) +
901
+ scale_shape_manual(name = "", labels = c(labelActual,labelMean), values = c(18,15)) +
902
+ xlab("") +
903
+ ylab(label)
904
+ p1}
905
+ ```
906
+
907
+ ```{r}
908
+ # Rigth Panel
909
+
910
+ #Adjust Data
911
+ ## Load and clean data
912
+ datafig_7_r[is.na(datafig_7_r)]<-0
913
+ datafig_7_r_adj = datafig_7_r
914
+ datafig_7_r_adj$b <- datafig_7_r$bY + datafig_7_r$bN
915
+ datafig_7_r_adj$lb <- datafig_7_r$lb_bY + datafig_7_r$lb_bN
916
+ datafig_7_r_adj$ub <- datafig_7_r$ub_bY + datafig_7_r$ub_bN
917
+ datafig_7_r_adj$bN <- datafig_7_r$bNY + datafig_7_r$bNN
918
+ datafig_7_r_adj$lbN <- datafig_7_r$lb_bNY + datafig_7_r$lb_bNN
919
+ datafig_7_r_adj$ubN <- datafig_7_r$ub_bNY + datafig_7_r$ub_bNN
920
+ datafig_7_r_adj<- datafig_7_r_adj[which(datafig_7_r_adj$b!=0), c("t","b", "lb", "ub", "bN", "lbN", "ubN")]
921
+
922
+ groups <- c(7,7,6,6,5,5,4,4,3,3,2,2,1,1,1)
923
+ datafig_7_r_adj$group <- groups
924
+
925
+ mylabs <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
926
+ datafig_7_r_adj$mylabs <- mylabs
927
+
928
+ mylabs1 <- c(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
929
+ datafig_7_r_adj$mylabs1 <- mylabs1
930
+
931
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='No H. Sect.'),'t'] <- 'Not High Imm. Sect.'
932
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='H.Sect.&L.Ed'),'t'] <- 'H. Sect. & No College'
933
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='H.Sect.&H.Ed'),'t'] <- 'H. Sect. & College'
934
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Rich'),'t'] <- 'High Income'
935
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Not Rich'),'t'] <- 'Low Income'
936
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Not College'),'t'] <- 'No College'
937
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Right-Wing'),'t'] <- 'Right-Wing'
938
+ datafig_7_r_adj[which(datafig_7_r_adj$t=='Left-Wing'),'t'] <- 'Left-Wing'
939
+
940
+ #Plot
941
+ RightPanel12 = function(data, label, x_lb, x_upb, labelActual = "Natives", labelMean = "Immigrants"){
942
+ p2 <- ggplot(data = data, aes(x=factor(b),y=t, group = group)) +
943
+ geom_segment(data=data, aes(x=lb, xend=ub, y=t, yend=t), colour = "#4CA64D", alpha = 0.5,
944
+ shape = 18, size = 2) +
945
+ geom_point(aes(x=b,y=t, colour=factor(mylabs), shape = factor(mylabs)), size = 3) +
946
+ geom_segment(data=data, aes(x=lbN, xend=ubN, y=t, yend=t), colour = '#0000D5', shape = 15,
947
+ alpha = 0.5, size = 2) +
948
+ geom_point(aes(x=bN,y=t, colour=factor(mylabs1), shape=factor(mylabs1)), size = 4) +
949
+ facet_grid(group ~ ., space = 'free_y', scales = "free_y") +
950
+ xlim(x_lb,x_upb) +
951
+ xlab(label) +
952
+ theme_light() +
953
+ theme(
954
+ axis.line=element_blank(), #Removing the axis
955
+ panel.grid.major.x = element_line(linetype = 'dashed', color = 'darkgray'),
956
+ panel.grid.major.y = element_blank(),
957
+ text = element_text(family = "LM Roman 10", size = 10, colour = "black"),
958
+ axis.text = element_text(size = 9, colour = 'black'),
959
+ panel.border = element_rect(color = "darkgray", fill = NA, size = 0.3), #horizontal line between graphs
960
+ strip.background = element_blank(),
961
+ axis.text.y = element_text(size=9),
962
+ axis.title.y = element_blank(),
963
+ ### Add spacing for xlabel
964
+ axis.title.x = element_text(size = 9, margin = margin(t=13)),
965
+ axis.ticks=element_blank(), #Removing the ticks
966
+ panel.spacing.y = unit(0, "lines"),
967
+
968
+ ## Control legend
969
+ legend.position = "bottom",
970
+ legend.box = "horizontal",
971
+ legend.justification = c(0.65,0),
972
+ #panel.border = element_blank(),
973
+ legend.title = element_blank()
974
+ ) +
975
+ theme(legend.text=element_text(size=9)) +
976
+ scale_colour_manual(name= "", labels = c(labelMean,labelActual), values = c("#4CA64D",'#0000D5')) +
977
+ scale_shape_manual(name= "", labels = c(labelMean,labelActual), values = c(15, 18))
978
+ p2}
979
+ ```
980
+
981
+ ```{r}
982
+ # Generate Figure
983
+ plot_grid(LeftPanelAdjustedData12(datafig_7_l_adj, "Misperception (in % points)", -10, 30 , 10, "Non-immigrants", "Immigrants"),
984
+ RightPanel12(datafig_7_r_adj, "Misperception (in % points)", 0, 20, "Non-immigrants", "Immigrants"),
985
+ labels=NULL, ncol=2, align='h', axis='b')
986
+
987
+ # Export
988
+ FigureExporter(plot_grid(LeftPanelAdjustedData12(datafig_7_l_adj, "Misperception (in % points)", -10, 30 , 10, "Non-immigrants", "Immigrants"),
989
+ RightPanel12(datafig_7_r_adj, "Misperception (in % points)", 0, 20, "Non-immigrants", "Immigrants"),
990
+ labels=NULL, ncol=2, align='h', axis='b'),
991
+ "Figure_7.png")
992
+ ```
37/replication_package/Do/Figures/Fig2to7_9_data.do ADDED
@@ -0,0 +1,2056 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **********
2
+ * Immigration and Redistribution
3
+ * Alesina, Miano, Stantcheva
4
+ * RESTUD
5
+
6
+ * 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
7
+ **********
8
+
9
+ clear all
10
+
11
+ * Specify directory of the replication package
12
+ global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"
13
+ cd "$dir"
14
+
15
+ * Declare output sub-directory
16
+
17
+ global outdir "Out/Figures_data"
18
+
19
+ * Load the data
20
+
21
+ use "Data/survey_analysis.dta", clear
22
+
23
+ * Countries included in the analysis
24
+ global countries "US UK DE FR IT SE"
25
+
26
+
27
+ * Generate flags - To ensure answers quality
28
+ gen flag_1=0
29
+ gen flag_2=0
30
+
31
+ * Keep only those with flag 1 and flag 2 equal to zero
32
+
33
+ bysort country treatment_recod: egen min_duration = pctile(duration), p(2)
34
+ bysort country treatment_recod: egen max_duration = pctile(duration), p(98)
35
+
36
+ replace flag_1=1 if duration<min_duration
37
+ replace flag_2=1 if duration>max_duration
38
+
39
+ * Drop respondents in bottom and top 2% of distribution of time spent on the survey
40
+ keep if flag_1==0 & flag_2==0
41
+
42
+ *Drop variable used to exclude inattentive respondents
43
+ drop flag_1 flag_2 min_duration max_duration
44
+
45
+ * Add data on actual natives and immigrants statistics and generate misperceptions *
46
+
47
+ do "Do/misperceptions.do"
48
+
49
+ * Gen variables to be plotted *
50
+
51
+ * 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)
52
+ gen moh_more=(Moh_transfers<3 & Moh_tax>2)
53
+ replace moh_more=1 if Moh_transfers==3 & Moh_tax>3
54
+ replace moh_more=. if Moh_tax==. | Moh_transfers==.
55
+ la var moh_more "Mohammad receives more transfers and/or pays less taxes than John"
56
+ label val moh_more binary
57
+
58
+ * Transfers
59
+ gen imm_tra_twice_more=(transfers_imm==11 |transfers_imm==12 |transfers_imm==13)
60
+ la var imm_tra_twice_more "Immigrants receive tiwice as many transfers as natives or more"
61
+ replace imm_tra_twice_more=. if transfers_imm==.
62
+ label val imm_tra_twice_more binary
63
+
64
+ ****************
65
+ * Gen additional controls *
66
+ ****************
67
+
68
+ * Immigrant parent
69
+ gen immigrant_parent=(q_parent_same==2)
70
+ replace immigrant_parent=. if q_parent_same==.
71
+ label var immigrant_parent "Immigrant parent"
72
+ label val immigrant_parent binary
73
+
74
+
75
+ * Gen Left-right variables *
76
+ * Based on vote or voting intentions
77
+ gen left=(party_voted==4 | party_voted==5)
78
+ replace left=. if party_voted==. | party_voted==6 | party_voted==0
79
+ gen right=(party_voted==1 | party_voted==2)
80
+ replace right=. if party_voted==. | party_voted==6 | party_voted==0
81
+ gen center=(party_voted==3)
82
+ replace center=. if party_voted==. | party_voted==6 | party_voted==0
83
+
84
+ label var left "Left-wing"
85
+ label var right "Right-wing"
86
+ label var center "Center"
87
+
88
+ foreach i in left right center{
89
+ label val `i' binary
90
+ }
91
+
92
+ * Young
93
+ gen young=(age<45)
94
+ label var young "Age 18 to 45"
95
+ label val young binary
96
+
97
+ * Gender
98
+ gen male=(sex==1)
99
+ label var male "Male"
100
+ label val male binary
101
+
102
+ * Top income
103
+ gen top_income=0
104
+ foreach x in $countries{
105
+ su household_income if country=="`x'", d
106
+ replace top_income=1 if household_income>r(p75) & country=="`x'"
107
+ }
108
+ label var top_income "High Income"
109
+ label val top_income binary
110
+
111
+ * Sector dummy
112
+ label var sector_dummy "High intensity sector"
113
+
114
+
115
+ * Gen variables for high immigration sectors, with low/high educ
116
+ gen sector_dummy_h=sector_dummy*university_degree
117
+ gen sector_dummy_l=sector_dummy*(1-university_degree)
118
+
119
+
120
+ **********************
121
+ * Keep only control group *
122
+
123
+ keep if control==1
124
+
125
+ *********************
126
+
127
+ * Gen group variables
128
+
129
+ gen var_1= left
130
+ gen var_2= male
131
+ gen var_3= young
132
+ gen var_4= immigrant_parent
133
+ gen var_5= top_income
134
+ gen var_6= university_degree
135
+ gen var_7= sector_dummy_h
136
+ gen var_8= sector_dummy_l
137
+
138
+
139
+ ************************
140
+ * Figure 2 - Share of immigrants
141
+ ************************
142
+
143
+ * Misperception by group
144
+
145
+ **** Share of immigrants *
146
+ global vars mis_share_foreign
147
+ foreach var in $vars{
148
+ forvalues q=2(1)8 {
149
+ ci means `var' if var_`q'==1, level(95)
150
+ local bY_`q' = r(mean)
151
+ local ub_bY_`q' = r(ub)
152
+ local lb_bY_`q' = r(lb)
153
+ }
154
+ forvalues q=2(1)8 {
155
+ ci means `var' if var_`q'==0, level(95)
156
+ local bN_`q' = r(mean)
157
+ local ub_bN_`q' = r(ub)
158
+ local lb_bN_`q' = r(lb)
159
+ }
160
+ ci means `var' if var_1==1 & center!=1, level(95)
161
+ local bY_1 = r(mean)
162
+ local ub_bY_1 = r(ub)
163
+ local lb_bY_1 = r(lb)
164
+ ci means `var' if var_1==0 & center!=1, level(95)
165
+ local bN_1 = r(mean)
166
+ local ub_bN_1 = r(ub)
167
+ local lb_bN_1 = r(lb)
168
+
169
+ ci means `var' if sector_dummy==0 , level(95)
170
+ local bN_7 = r(mean)
171
+ local ub_bN_7 = r(ub)
172
+ local lb_bN_7 = r(lb)
173
+ local bN_8 = r(mean)
174
+ local ub_bN_8 = r(ub)
175
+ local lb_bN_8 = r(lb)
176
+ }
177
+ preserve
178
+ clear
179
+ set obs 46
180
+ egen t = seq()
181
+ 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."
182
+ label values t quintile
183
+ replace t=t/3
184
+
185
+ gen bY = .
186
+ gen ub_bY = .
187
+ gen lb_bY = .
188
+ gen bN = .
189
+ gen ub_bN = .
190
+ gen lb_bN = .
191
+ gen n=_n
192
+
193
+
194
+ local q = 3
195
+ forvalues i=1(1)6 {
196
+ replace bY=`bY_`i'' if n==`q'
197
+ replace ub_bY=`ub_bY_`i'' if n==`q'
198
+ replace lb_bY=`lb_bY_`i'' if n==`q'
199
+ local q = `q' + 6
200
+ }
201
+
202
+ local q = 6
203
+ forvalues i=1(1)6 {
204
+ replace bN=`bN_`i'' if n==`q'
205
+ replace ub_bN=`ub_bN_`i'' if n==`q'
206
+ replace lb_bN=`lb_bN_`i'' if n==`q'
207
+ local q = `q' + 6
208
+ }
209
+
210
+
211
+ replace bY=`bY_8' if n==39
212
+ replace ub_bY=`ub_bY_8' if n==39
213
+ replace lb_bY=`lb_bY_8' if n==39
214
+
215
+ replace bN=`bY_7' if n==42
216
+ replace ub_bN=`ub_bY_7' if n==42
217
+ replace lb_bN=`lb_bY_7' if n==42
218
+
219
+ replace bN=`bN_7' if n==45
220
+ replace ub_bN=`ub_bN_7' if n==45
221
+ replace lb_bN=`lb_bN_7' if n==45
222
+
223
+ export delimited "$outdir/figure_2_r_data.csv", replace
224
+
225
+ restore
226
+
227
+
228
+ *** Perceptions by country ***
229
+
230
+ gen var_perc = perc_share_foreign
231
+
232
+ gen var_real = share_foreign
233
+
234
+
235
+ *** Means of variables ***
236
+ foreach x in US UK IT FR SE DE {
237
+ ci means var_perc if country=="`x'", level(95)
238
+ *storing mean and confidence interval for perceived data
239
+ local m_perc`x' = r(mean)
240
+ local lb_perc`x' = r(lb)
241
+ local ub_perc`x' = r(ub)
242
+ ci means var_real if country=="`x'", level(95)
243
+ local m_real`x' = r(mean)
244
+ qui su var_perc if country=="`x'", detail
245
+ local md_perc`x' = r(p50)
246
+ local p25`x' = r(p25)
247
+ local p75`x' = r(p75)
248
+ }
249
+
250
+
251
+ preserve
252
+ clear
253
+ set obs 31
254
+ egen t = seq()
255
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
256
+ label values t var
257
+ replace t=t/5
258
+
259
+ gen m_perc = .
260
+ gen md_perc = .
261
+ gen lb_perc = .
262
+ gen ub_perc = .
263
+ gen m_real = .
264
+ gen p25 = .
265
+ gen p75 = .
266
+
267
+ gen n=_n
268
+
269
+ local q = 5
270
+ foreach x in SE DE IT FR UK US {
271
+ replace m_perc=`m_perc`x'' if n==`q'
272
+ replace md_perc=`md_perc`x'' if n==`q'
273
+ replace lb_perc=`lb_perc`x'' if n==`q'
274
+ replace ub_perc=`ub_perc`x'' if n==`q'
275
+ replace m_real=`m_real`x'' if n==`q'
276
+ replace p25=`p25`x'' if n==`q'
277
+ replace p75=`p75`x'' if n==`q'
278
+ local q = `q' + 5
279
+ }
280
+
281
+ export delimited "$outdir/figure_2_l_data.csv", replace
282
+
283
+ restore
284
+
285
+ drop var_perc var_real
286
+
287
+ ************************
288
+ * Figure 3, Panel A -- Share of Muslim immigrants
289
+ ************************
290
+
291
+ **** Share of muslim
292
+ global vars mis_share_mu
293
+ foreach var in $vars{
294
+ forvalues q=2(1)8 {
295
+ ci means `var' if var_`q'==1, level(95)
296
+ local bY_`q' = r(mean)
297
+ local ub_bY_`q' = r(ub)
298
+ local lb_bY_`q' = r(lb)
299
+ }
300
+ forvalues q=2(1)8 {
301
+ ci means `var' if var_`q'==0, level(95)
302
+ local bN_`q' = r(mean)
303
+ local ub_bN_`q' = r(ub)
304
+ local lb_bN_`q' = r(lb)
305
+ }
306
+ ci means `var' if var_1==1 & center!=1, level(95)
307
+ local bY_1 = r(mean)
308
+ local ub_bY_1 = r(ub)
309
+ local lb_bY_1 = r(lb)
310
+ ci means `var' if var_1==0 & center!=1, level(95)
311
+ local bN_1 = r(mean)
312
+ local ub_bN_1 = r(ub)
313
+ local lb_bN_1 = r(lb)
314
+
315
+ ci means `var' if sector_dummy==0 , level(95)
316
+ local bN_7 = r(mean)
317
+ local ub_bN_7 = r(ub)
318
+ local lb_bN_7 = r(lb)
319
+ local bN_8 = r(mean)
320
+ local ub_bN_8 = r(ub)
321
+ local lb_bN_8 = r(lb)
322
+ }
323
+ preserve
324
+ clear
325
+ set obs 46
326
+ egen t = seq()
327
+ 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."
328
+ label values t quintile
329
+ replace t=t/3
330
+
331
+ gen bY = .
332
+ gen ub_bY = .
333
+ gen lb_bY = .
334
+ gen bN = .
335
+ gen ub_bN = .
336
+ gen lb_bN = .
337
+ gen n=_n
338
+
339
+
340
+ local q = 3
341
+ forvalues i=1(1)6 {
342
+ replace bY=`bY_`i'' if n==`q'
343
+ replace ub_bY=`ub_bY_`i'' if n==`q'
344
+ replace lb_bY=`lb_bY_`i'' if n==`q'
345
+ local q = `q' + 6
346
+ }
347
+
348
+ local q = 6
349
+ forvalues i=1(1)6 {
350
+ replace bN=`bN_`i'' if n==`q'
351
+ replace ub_bN=`ub_bN_`i'' if n==`q'
352
+ replace lb_bN=`lb_bN_`i'' if n==`q'
353
+ local q = `q' + 6
354
+ }
355
+
356
+
357
+ replace bY=`bY_8' if n==39
358
+ replace ub_bY=`ub_bY_8' if n==39
359
+ replace lb_bY=`lb_bY_8' if n==39
360
+
361
+ replace bN=`bY_7' if n==42
362
+ replace ub_bN=`ub_bY_7' if n==42
363
+ replace lb_bN=`lb_bY_7' if n==42
364
+
365
+ replace bN=`bN_7' if n==45
366
+ replace ub_bN=`ub_bN_7' if n==45
367
+ replace lb_bN=`lb_bN_7' if n==45
368
+
369
+ export delimited "$outdir/figure_3_a_r_data.csv", replace
370
+
371
+ restore
372
+
373
+ ** By Country **
374
+
375
+ gen var_perc = perc_share_mu
376
+
377
+ gen var_real = share_muslim
378
+
379
+ *** Means of variables ***
380
+ foreach x in US UK IT FR SE DE {
381
+ ci means var_perc if country=="`x'", level(95)
382
+ *storing mean and confidence interval for perceived data
383
+ local m_perc`x' = r(mean)
384
+ local lb_perc`x' = r(lb)
385
+ local ub_perc`x' = r(ub)
386
+ ci means var_real if country=="`x'", level(95)
387
+ local m_real`x' = r(mean)
388
+ qui su var_perc if country=="`x'", detail
389
+ local md_perc`x' = r(p50)
390
+ local p25`x' = r(p25)
391
+ local p75`x' = r(p75)
392
+ }
393
+
394
+
395
+ preserve
396
+ clear
397
+ set obs 31
398
+ egen t = seq()
399
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
400
+ label values t var
401
+ replace t=t/5
402
+
403
+ gen m_perc = .
404
+ gen md_perc = .
405
+ gen lb_perc = .
406
+ gen ub_perc = .
407
+ gen m_real = .
408
+ gen p25 = .
409
+ gen p75 = .
410
+
411
+ gen n=_n
412
+
413
+ local q = 5
414
+ foreach x in SE DE IT FR UK US {
415
+ replace m_perc=`m_perc`x'' if n==`q'
416
+ replace md_perc=`md_perc`x'' if n==`q'
417
+ replace lb_perc=`lb_perc`x'' if n==`q'
418
+ replace ub_perc=`ub_perc`x'' if n==`q'
419
+ replace m_real=`m_real`x'' if n==`q'
420
+ replace p25=`p25`x'' if n==`q'
421
+ replace p75=`p75`x'' if n==`q'
422
+ local q = `q' + 5
423
+ }
424
+
425
+ export delimited "$outdir/figure_3_a_l_data.csv", replace
426
+
427
+ restore
428
+
429
+ drop var_perc var_real
430
+
431
+
432
+ ************************
433
+ * Figure 3, Panel B -- Share of Christian immigrants
434
+ ************************
435
+
436
+
437
+ * Misperception by group
438
+
439
+ **** Share of christian *
440
+ global vars mis_share_ch
441
+ foreach var in $vars{
442
+ forvalues q=2(1)8 {
443
+ ci means `var' if var_`q'==1, level(95)
444
+ local bY_`q' = r(mean)
445
+ local ub_bY_`q' = r(ub)
446
+ local lb_bY_`q' = r(lb)
447
+ }
448
+ forvalues q=2(1)8 {
449
+ ci means `var' if var_`q'==0, level(95)
450
+ local bN_`q' = r(mean)
451
+ local ub_bN_`q' = r(ub)
452
+ local lb_bN_`q' = r(lb)
453
+ }
454
+ ci means `var' if var_1==1 & center!=1, level(95)
455
+ local bY_1 = r(mean)
456
+ local ub_bY_1 = r(ub)
457
+ local lb_bY_1 = r(lb)
458
+ ci means `var' if var_1==0 & center!=1, level(95)
459
+ local bN_1 = r(mean)
460
+ local ub_bN_1 = r(ub)
461
+ local lb_bN_1 = r(lb)
462
+
463
+ ci means `var' if sector_dummy==0 , level(95)
464
+ local bN_7 = r(mean)
465
+ local ub_bN_7 = r(ub)
466
+ local lb_bN_7 = r(lb)
467
+ local bN_8 = r(mean)
468
+ local ub_bN_8 = r(ub)
469
+ local lb_bN_8 = r(lb)
470
+ }
471
+ preserve
472
+ clear
473
+ set obs 46
474
+ egen t = seq()
475
+ 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."
476
+ label values t quintile
477
+ replace t=t/3
478
+
479
+ gen bY = .
480
+ gen ub_bY = .
481
+ gen lb_bY = .
482
+ gen bN = .
483
+ gen ub_bN = .
484
+ gen lb_bN = .
485
+ gen n=_n
486
+
487
+
488
+ local q = 3
489
+ forvalues i=1(1)6 {
490
+ replace bY=`bY_`i'' if n==`q'
491
+ replace ub_bY=`ub_bY_`i'' if n==`q'
492
+ replace lb_bY=`lb_bY_`i'' if n==`q'
493
+ local q = `q' + 6
494
+ }
495
+
496
+ local q = 6
497
+ forvalues i=1(1)6 {
498
+ replace bN=`bN_`i'' if n==`q'
499
+ replace ub_bN=`ub_bN_`i'' if n==`q'
500
+ replace lb_bN=`lb_bN_`i'' if n==`q'
501
+ local q = `q' + 6
502
+ }
503
+
504
+
505
+ replace bY=`bY_8' if n==39
506
+ replace ub_bY=`ub_bY_8' if n==39
507
+ replace lb_bY=`lb_bY_8' if n==39
508
+
509
+ replace bN=`bY_7' if n==42
510
+ replace ub_bN=`ub_bY_7' if n==42
511
+ replace lb_bN=`lb_bY_7' if n==42
512
+
513
+ replace bN=`bN_7' if n==45
514
+ replace ub_bN=`ub_bN_7' if n==45
515
+ replace lb_bN=`lb_bN_7' if n==45
516
+
517
+ export delimited "$outdir/figure_3_b_r_data.csv", replace
518
+
519
+ restore
520
+
521
+
522
+
523
+ *** By country
524
+
525
+ gen var_perc = perc_share_ch
526
+
527
+ gen var_real = share_christian
528
+
529
+
530
+ *** Means of variables ***
531
+ foreach x in US UK IT FR SE DE {
532
+ ci means var_perc if country=="`x'", level(95)
533
+ *storing mean and confidence interval for perceived data
534
+ local m_perc`x' = r(mean)
535
+ local lb_perc`x' = r(lb)
536
+ local ub_perc`x' = r(ub)
537
+ ci means var_real if country=="`x'", level(95)
538
+ local m_real`x' = r(mean)
539
+ qui su var_perc if country=="`x'", detail
540
+ local md_perc`x' = r(p50)
541
+ local p25`x' = r(p25)
542
+ local p75`x' = r(p75)
543
+ }
544
+
545
+
546
+ preserve
547
+ clear
548
+ set obs 31
549
+ egen t = seq()
550
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
551
+ label values t var
552
+ replace t=t/5
553
+
554
+ gen m_perc = .
555
+ gen md_perc = .
556
+ gen lb_perc = .
557
+ gen ub_perc = .
558
+ gen m_real = .
559
+ gen p25 = .
560
+ gen p75 = .
561
+
562
+ gen n=_n
563
+
564
+ local q = 5
565
+ foreach x in SE DE IT FR UK US {
566
+ replace m_perc=`m_perc`x'' if n==`q'
567
+ replace md_perc=`md_perc`x'' if n==`q'
568
+ replace lb_perc=`lb_perc`x'' if n==`q'
569
+ replace ub_perc=`ub_perc`x'' if n==`q'
570
+ replace m_real=`m_real`x'' if n==`q'
571
+ replace p25=`p25`x'' if n==`q'
572
+ replace p75=`p75`x'' if n==`q'
573
+ local q = `q' + 5
574
+ }
575
+
576
+ export delimited "$outdir/figure_3_b_l_data.csv", replace
577
+
578
+ restore
579
+
580
+ drop var_perc var_real
581
+
582
+ *************************
583
+ * Figure 4, Immigrants' and natives' economic circumstances
584
+ * Panel A -- Share of High Educated
585
+ ***********************
586
+
587
+
588
+ * By group *
589
+
590
+ global vars mis_higheduc_imm
591
+ foreach var in $vars{
592
+ forvalues q=2(1)8 {
593
+ ci means `var' if var_`q'==1, level(95)
594
+ local bY_`q' = r(mean)
595
+ local ub_bY_`q' = r(ub)
596
+ local lb_bY_`q' = r(lb)
597
+ qui su `var' if var_`q'==1, detail
598
+ local b2Y_`q' = r(p50)
599
+ local ub2_bY_`q' = r(p75)
600
+ local lb2_bY_`q' = r(p25)
601
+ }
602
+ forvalues q=2(1)8 {
603
+ ci means `var' if var_`q'==0, level(95)
604
+ local bN_`q' = r(mean)
605
+ local ub_bN_`q' = r(ub)
606
+ local lb_bN_`q' = r(lb)
607
+ qui su `var' if var_`q'==0, detail
608
+ local b2N_`q' = r(p50)
609
+ local ub2_bN_`q' = r(p75)
610
+ local lb2_bN_`q' = r(p25)
611
+ }
612
+ ci means `var' if var_1==1 & center!=1, level(95)
613
+ local bY_1 = r(mean)
614
+ local ub_bY_1 = r(ub)
615
+ local lb_bY_1 = r(lb)
616
+ qui su `var' if var_1==1 & center!=1, detail
617
+ local b2Y_1 = r(p50)
618
+ local ub2_bY_1 = r(p75)
619
+ local lb2_bY_1 = r(p25)
620
+ ci means `var' if var_1==0 & center!=1, level(95)
621
+ local bN_1 = r(mean)
622
+ local ub_bN_1 = r(ub)
623
+ local lb_bN_1 = r(lb)
624
+ qui su `var' if var_1==0 & center!=1, detail
625
+ local b2N_1 = r(p50)
626
+ local ub2_bN_1 = r(p75)
627
+ local lb2_bN_1 = r(p25)
628
+
629
+ ci means `var' if sector_dummy==0 , level(95)
630
+ local bN_7 = r(mean)
631
+ local ub_bN_7 = r(ub)
632
+ local lb_bN_7 = r(lb)
633
+ local bN_8 = r(mean)
634
+ local ub_bN_8 = r(ub)
635
+ local lb_bN_8 = r(lb)
636
+ qui su `var' if sector_dummy==0 , detail
637
+ local b2N_7 = r(p50)
638
+ local b2N_8 = r(p50)
639
+ local ub2_bN_7 = r(p75)
640
+ local lb2_bN_7 = r(p25)
641
+ local ub2_bN_8 = r(p75)
642
+ local lb2_bN_8 = r(p25)
643
+ }
644
+
645
+ global vars mis_higheduc_nat
646
+ foreach var in $vars{
647
+ forvalues q=2(1)8 {
648
+ ci means `var' if var_`q'==1, level(95)
649
+ local bNY_`q' = r(mean)
650
+ local ub_bNY_`q' = r(ub)
651
+ local lb_bNY_`q' = r(lb)
652
+ qui su `var' if var_`q'==1, detail
653
+ local b2NY_`q' = r(p50)
654
+ local ub2_bNY_`q' = r(p75)
655
+ local lb2_bNY_`q' = r(p25)
656
+ }
657
+ forvalues q=2(1)8 {
658
+ ci means `var' if var_`q'==0, level(95)
659
+ local bNN_`q' = r(mean)
660
+ local ub_bNN_`q' = r(ub)
661
+ local lb_bNN_`q' = r(lb)
662
+ qui su `var' if var_`q'==0, detail
663
+ local b2NN_`q' = r(p50)
664
+ local ub2_bNN_`q' = r(p75)
665
+ local lb2_bNN_`q' = r(p25)
666
+ }
667
+ ci means `var' if var_1==1 & center!=1, level(95)
668
+ local bNY_1 = r(mean)
669
+ local ub_bNY_1 = r(ub)
670
+ local lb_bNY_1 = r(lb)
671
+ qui su `var' if var_1==1 & center!=1, detail
672
+ local b2NY_1 = r(p50)
673
+ local ub2_bNY_1 = r(p75)
674
+ local lb2_bNY_1 = r(p25)
675
+ ci means `var' if var_1==0 & center!=1, level(95)
676
+ local bNN_1 = r(mean)
677
+ local ub_bNN_1 = r(ub)
678
+ local lb_bNN_1 = r(lb)
679
+ qui su `var' if var_1==0 & center!=1, detail
680
+ local b2NN_1 = r(p50)
681
+ local ub2_bNN_1 = r(p75)
682
+ local lb2_bNN_1 = r(p25)
683
+
684
+ ci means `var' if sector_dummy==0 , level(95)
685
+ local bNN_7 = r(mean)
686
+ local ub_bNN_7 = r(ub)
687
+ local lb_bNN_7 = r(lb)
688
+ local bNN_8 = r(mean)
689
+ local ub_bNN_8 = r(ub)
690
+ local lb_bNN_8 = r(lb)
691
+ qui su `var' if sector_dummy==0 , detail
692
+ local b2NN_7 = r(p50)
693
+ local b2NN_8 = r(p50)
694
+ local ub2_bNN_7 = r(p75)
695
+ local lb2_bNN_7 = r(p25)
696
+ local ub2_bNN_8 = r(p75)
697
+ local lb2_bNN_8 = r(p25)
698
+ }
699
+ preserve
700
+ clear
701
+ set obs 46
702
+ egen t = seq()
703
+ 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."
704
+ label values t quintile
705
+ replace t=t/3
706
+
707
+ gen bY = .
708
+ gen bNY = .
709
+ gen ub_bY = .
710
+ gen lb_bY = .
711
+ gen ub_bNY = .
712
+ gen lb_bNY = .
713
+ gen bN = .
714
+ gen bNN = .
715
+ gen ub_bN = .
716
+ gen lb_bN = .
717
+ gen ub_bNN = .
718
+ gen lb_bNN = .
719
+ gen n=_n
720
+
721
+
722
+ local q = 3
723
+ forvalues i=1(1)6 {
724
+ replace bY=`bY_`i'' if n==`q'
725
+ replace ub_bY=`ub_bY_`i'' if n==`q'
726
+ replace lb_bY=`lb_bY_`i'' if n==`q'
727
+ local q = `q' + 6
728
+ }
729
+
730
+ local q = 3
731
+ forvalues i=1(1)6 {
732
+ replace bNY=`bNY_`i'' if n==`q'
733
+ replace ub_bNY=`ub_bNY_`i'' if n==`q'
734
+ replace lb_bNY=`lb_bNY_`i'' if n==`q'
735
+ local q = `q' + 6
736
+ }
737
+
738
+ local q = 6
739
+ forvalues i=1(1)6 {
740
+ replace bN=`bN_`i'' if n==`q'
741
+ replace ub_bN=`ub_bN_`i'' if n==`q'
742
+ replace lb_bN=`lb_bN_`i'' if n==`q'
743
+ local q = `q' + 6
744
+ }
745
+
746
+ local q = 6
747
+ forvalues i=1(1)6 {
748
+ replace bNN=`bNN_`i'' if n==`q'
749
+ replace ub_bNN=`ub_bNN_`i'' if n==`q'
750
+ replace lb_bNN=`lb_bNN_`i'' if n==`q'
751
+ local q = `q' + 6
752
+ }
753
+
754
+
755
+ replace bY=`bY_8' if n==39
756
+ replace ub_bY=`ub_bY_8' if n==39
757
+ replace lb_bY=`lb_bY_8' if n==39
758
+
759
+ replace bN=`bY_7' if n==42
760
+ replace ub_bN=`ub_bY_7' if n==42
761
+ replace lb_bN=`lb_bY_7' if n==42
762
+
763
+ replace bN=`bN_7' if n==45
764
+ replace ub_bN=`ub_bN_7' if n==45
765
+ replace lb_bN=`lb_bN_7' if n==45
766
+
767
+ replace bNY=`bNY_8' if n==39
768
+ replace ub_bNY=`ub_bNY_8' if n==39
769
+ replace lb_bNY=`lb_bNY_8' if n==39
770
+
771
+ replace bNN=`bNY_7' if n==42
772
+ replace ub_bNN=`ub_bNY_7' if n==42
773
+ replace lb_bNN=`lb_bNY_7' if n==42
774
+
775
+ replace bNN=`bNN_7' if n==45
776
+ replace ub_bNN=`ub_bNN_7' if n==45
777
+ replace lb_bNN=`lb_bNN_7' if n==45
778
+
779
+ export delimited "$outdir/figure_4_a_r_data.csv", replace
780
+
781
+ restore
782
+
783
+
784
+ *** Perceptions by country ***
785
+
786
+ gen var_perc = mis_higheduc_imm
787
+
788
+ gen var_nat = mis_higheduc_nat
789
+
790
+
791
+ *** Means of variables ***
792
+ foreach x in US UK IT FR SE DE {
793
+ ci means var_perc if country=="`x'", level(95)
794
+ *storing mean and confidence interval for perceived data
795
+ local m_perc`x' = r(mean)
796
+ local lb_perc`x' = r(lb)
797
+ local ub_perc`x' = r(ub)
798
+ ci means var_nat if country=="`x'", level(95)
799
+ local m_nat`x' = r(mean)
800
+ local lb_nat`x' = r(lb)
801
+ local ub_nat`x' = r(ub)
802
+ qui su var_perc if country=="`x'", detail
803
+ local md_perc`x' = r(p50)
804
+ local p25`x' = r(p25)
805
+ local p75`x' = r(p75)
806
+ }
807
+
808
+
809
+ preserve
810
+ clear
811
+ set obs 31
812
+ egen t = seq()
813
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
814
+ label values t var
815
+ replace t=t/5
816
+
817
+ gen m_perc = .
818
+ gen md_perc = .
819
+ gen lb_perc = .
820
+ gen ub_perc = .
821
+ gen m_nat = .
822
+ gen lb_nat = .
823
+ gen ub_nat = .
824
+ gen p25 = .
825
+ gen p75 = .
826
+
827
+ gen n=_n
828
+
829
+ local q = 5
830
+ foreach x in SE DE IT FR UK US {
831
+ replace m_perc=`m_perc`x'' if n==`q'
832
+ replace md_perc=`md_perc`x'' if n==`q'
833
+ replace lb_perc=`lb_perc`x'' if n==`q'
834
+ replace ub_perc=`ub_perc`x'' if n==`q'
835
+ replace m_nat=`m_nat`x'' if n==`q'
836
+ replace lb_nat=`lb_nat`x'' if n==`q'
837
+ replace ub_nat=`ub_nat`x'' if n==`q'
838
+ replace p25=`p25`x'' if n==`q'
839
+ replace p75=`p75`x'' if n==`q'
840
+ local q = `q' + 5
841
+ }
842
+
843
+ export delimited "$outdir/figure_4_a_l_data.csv", replace
844
+
845
+ restore
846
+
847
+ drop var_perc var_nat
848
+
849
+
850
+ *************************
851
+ * Figure 4, Panel B -- Unemployment
852
+ ***********************
853
+
854
+
855
+
856
+ global vars mis_unemp_imm
857
+ foreach var in $vars{
858
+ forvalues q=2(1)8 {
859
+ ci means `var' if var_`q'==1, level(95)
860
+ local bY_`q' = r(mean)
861
+ local ub_bY_`q' = r(ub)
862
+ local lb_bY_`q' = r(lb)
863
+ qui su `var' if var_`q'==1, detail
864
+ local b2Y_`q' = r(p50)
865
+ local ub2_bY_`q' = r(p75)
866
+ local lb2_bY_`q' = r(p25)
867
+ }
868
+ forvalues q=2(1)8 {
869
+ ci means `var' if var_`q'==0, level(95)
870
+ local bN_`q' = r(mean)
871
+ local ub_bN_`q' = r(ub)
872
+ local lb_bN_`q' = r(lb)
873
+ qui su `var' if var_`q'==0, detail
874
+ local b2N_`q' = r(p50)
875
+ local ub2_bN_`q' = r(p75)
876
+ local lb2_bN_`q' = r(p25)
877
+ }
878
+ ci means `var' if var_1==1 & center!=1, level(95)
879
+ local bY_1 = r(mean)
880
+ local ub_bY_1 = r(ub)
881
+ local lb_bY_1 = r(lb)
882
+ qui su `var' if var_1==1 & center!=1, detail
883
+ local b2Y_1 = r(p50)
884
+ local ub2_bY_1 = r(p75)
885
+ local lb2_bY_1 = r(p25)
886
+ ci means `var' if var_1==0 & center!=1, level(95)
887
+ local bN_1 = r(mean)
888
+ local ub_bN_1 = r(ub)
889
+ local lb_bN_1 = r(lb)
890
+ qui su `var' if var_1==0 & center!=1, detail
891
+ local b2N_1 = r(p50)
892
+ local ub2_bN_1 = r(p75)
893
+ local lb2_bN_1 = r(p25)
894
+
895
+ ci means `var' if sector_dummy==0 , level(95)
896
+ local bN_7 = r(mean)
897
+ local ub_bN_7 = r(ub)
898
+ local lb_bN_7 = r(lb)
899
+ local bN_8 = r(mean)
900
+ local ub_bN_8 = r(ub)
901
+ local lb_bN_8 = r(lb)
902
+ qui su `var' if sector_dummy==0 , detail
903
+ local b2N_7 = r(p50)
904
+ local b2N_8 = r(p50)
905
+ local ub2_bN_7 = r(p75)
906
+ local lb2_bN_7 = r(p25)
907
+ local ub2_bN_8 = r(p75)
908
+ local lb2_bN_8 = r(p25)
909
+ }
910
+
911
+ global vars mis_unemp_nat
912
+ foreach var in $vars{
913
+ forvalues q=2(1)8 {
914
+ ci means `var' if var_`q'==1, level(95)
915
+ local bNY_`q' = r(mean)
916
+ local ub_bNY_`q' = r(ub)
917
+ local lb_bNY_`q' = r(lb)
918
+ qui su `var' if var_`q'==1, detail
919
+ local b2NY_`q' = r(p50)
920
+ local ub2_bNY_`q' = r(p75)
921
+ local lb2_bNY_`q' = r(p25)
922
+ }
923
+ forvalues q=2(1)8 {
924
+ ci means `var' if var_`q'==0, level(95)
925
+ local bNN_`q' = r(mean)
926
+ local ub_bNN_`q' = r(ub)
927
+ local lb_bNN_`q' = r(lb)
928
+ qui su `var' if var_`q'==0, detail
929
+ local b2NN_`q' = r(p50)
930
+ local ub2_bNN_`q' = r(p75)
931
+ local lb2_bNN_`q' = r(p25)
932
+ }
933
+ ci means `var' if var_1==1 & center!=1, level(95)
934
+ local bNY_1 = r(mean)
935
+ local ub_bNY_1 = r(ub)
936
+ local lb_bNY_1 = r(lb)
937
+ qui su `var' if var_1==1 & center!=1, detail
938
+ local b2NY_1 = r(p50)
939
+ local ub2_bNY_1 = r(p75)
940
+ local lb2_bNY_1 = r(p25)
941
+ ci means `var' if var_1==0 & center!=1, level(95)
942
+ local bNN_1 = r(mean)
943
+ local ub_bNN_1 = r(ub)
944
+ local lb_bNN_1 = r(lb)
945
+ qui su `var' if var_1==0 & center!=1, detail
946
+ local b2NN_1 = r(p50)
947
+ local ub2_bNN_1 = r(p75)
948
+ local lb2_bNN_1 = r(p25)
949
+
950
+ ci means `var' if sector_dummy==0 , level(95)
951
+ local bNN_7 = r(mean)
952
+ local ub_bNN_7 = r(ub)
953
+ local lb_bNN_7 = r(lb)
954
+ local bNN_8 = r(mean)
955
+ local ub_bNN_8 = r(ub)
956
+ local lb_bNN_8 = r(lb)
957
+ qui su `var' if sector_dummy==0 , detail
958
+ local b2NN_7 = r(p50)
959
+ local b2NN_8 = r(p50)
960
+ local ub2_bNN_7 = r(p75)
961
+ local lb2_bNN_7 = r(p25)
962
+ local ub2_bNN_8 = r(p75)
963
+ local lb2_bNN_8 = r(p25)
964
+ }
965
+ preserve
966
+ clear
967
+ set obs 46
968
+ egen t = seq()
969
+ 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."
970
+ label values t quintile
971
+ replace t=t/3
972
+
973
+ gen bY = .
974
+ gen bNY = .
975
+ gen ub_bY = .
976
+ gen lb_bY = .
977
+ gen ub_bNY = .
978
+ gen lb_bNY = .
979
+ gen bN = .
980
+ gen bNN = .
981
+ gen ub_bN = .
982
+ gen lb_bN = .
983
+ gen ub_bNN = .
984
+ gen lb_bNN = .
985
+ gen n=_n
986
+
987
+
988
+ local q = 3
989
+ forvalues i=1(1)6 {
990
+ replace bY=`bY_`i'' if n==`q'
991
+ replace ub_bY=`ub_bY_`i'' if n==`q'
992
+ replace lb_bY=`lb_bY_`i'' if n==`q'
993
+ local q = `q' + 6
994
+ }
995
+
996
+ local q = 3
997
+ forvalues i=1(1)6 {
998
+ replace bNY=`bNY_`i'' if n==`q'
999
+ replace ub_bNY=`ub_bNY_`i'' if n==`q'
1000
+ replace lb_bNY=`lb_bNY_`i'' if n==`q'
1001
+ local q = `q' + 6
1002
+ }
1003
+
1004
+ local q = 6
1005
+ forvalues i=1(1)6 {
1006
+ replace bN=`bN_`i'' if n==`q'
1007
+ replace ub_bN=`ub_bN_`i'' if n==`q'
1008
+ replace lb_bN=`lb_bN_`i'' if n==`q'
1009
+ local q = `q' + 6
1010
+ }
1011
+
1012
+ local q = 6
1013
+ forvalues i=1(1)6 {
1014
+ replace bNN=`bNN_`i'' if n==`q'
1015
+ replace ub_bNN=`ub_bNN_`i'' if n==`q'
1016
+ replace lb_bNN=`lb_bNN_`i'' if n==`q'
1017
+ local q = `q' + 6
1018
+ }
1019
+
1020
+
1021
+ replace bY=`bY_8' if n==39
1022
+ replace ub_bY=`ub_bY_8' if n==39
1023
+ replace lb_bY=`lb_bY_8' if n==39
1024
+
1025
+ replace bN=`bY_7' if n==42
1026
+ replace ub_bN=`ub_bY_7' if n==42
1027
+ replace lb_bN=`lb_bY_7' if n==42
1028
+
1029
+ replace bN=`bN_7' if n==45
1030
+ replace ub_bN=`ub_bN_7' if n==45
1031
+ replace lb_bN=`lb_bN_7' if n==45
1032
+
1033
+ replace bNY=`bNY_8' if n==39
1034
+ replace ub_bNY=`ub_bNY_8' if n==39
1035
+ replace lb_bNY=`lb_bNY_8' if n==39
1036
+
1037
+ replace bNN=`bNY_7' if n==42
1038
+ replace ub_bNN=`ub_bNY_7' if n==42
1039
+ replace lb_bNN=`lb_bNY_7' if n==42
1040
+
1041
+ replace bNN=`bNN_7' if n==45
1042
+ replace ub_bNN=`ub_bNN_7' if n==45
1043
+ replace lb_bNN=`lb_bNN_7' if n==45
1044
+
1045
+ export delimited "$outdir/figure_4_b_r_data.csv", replace
1046
+
1047
+ restore
1048
+
1049
+ *** Perceptions by country ***
1050
+
1051
+ gen var_perc = mis_unemp_imm
1052
+
1053
+ gen var_nat = mis_unemp_nat
1054
+
1055
+
1056
+ *** Means of variables ***
1057
+ foreach x in US UK IT FR SE DE {
1058
+ ci means var_perc if country=="`x'", level(95)
1059
+ *storing mean and confidence interval for perceived data
1060
+ local m_perc`x' = r(mean)
1061
+ local lb_perc`x' = r(lb)
1062
+ local ub_perc`x' = r(ub)
1063
+ ci means var_nat if country=="`x'", level(95)
1064
+ local m_nat`x' = r(mean)
1065
+ local lb_nat`x' = r(lb)
1066
+ local ub_nat`x' = r(ub)
1067
+ qui su var_perc if country=="`x'", detail
1068
+ local md_perc`x' = r(p50)
1069
+ local p25`x' = r(p25)
1070
+ local p75`x' = r(p75)
1071
+ }
1072
+
1073
+
1074
+ preserve
1075
+ clear
1076
+ set obs 31
1077
+ egen t = seq()
1078
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
1079
+ label values t var
1080
+ replace t=t/5
1081
+
1082
+ gen m_perc = .
1083
+ gen md_perc = .
1084
+ gen lb_perc = .
1085
+ gen ub_perc = .
1086
+ gen m_nat = .
1087
+ gen lb_nat = .
1088
+ gen ub_nat = .
1089
+ gen p25 = .
1090
+ gen p75 = .
1091
+
1092
+ gen n=_n
1093
+
1094
+ local q = 5
1095
+ foreach x in SE DE IT FR UK US {
1096
+ replace m_perc=`m_perc`x'' if n==`q'
1097
+ replace md_perc=`md_perc`x'' if n==`q'
1098
+ replace lb_perc=`lb_perc`x'' if n==`q'
1099
+ replace ub_perc=`ub_perc`x'' if n==`q'
1100
+ replace m_nat=`m_nat`x'' if n==`q'
1101
+ replace lb_nat=`lb_nat`x'' if n==`q'
1102
+ replace ub_nat=`ub_nat`x'' if n==`q'
1103
+ replace p25=`p25`x'' if n==`q'
1104
+ replace p75=`p75`x'' if n==`q'
1105
+ local q = `q' + 5
1106
+ }
1107
+
1108
+ export delimited "$outdir/figure_4_b_l_data.csv", replace
1109
+
1110
+ restore
1111
+
1112
+ drop var_perc var_nat
1113
+
1114
+ ************************
1115
+ * Figure 5, Immigrants' Work Effort
1116
+ * Panel A -- Effort - Poor
1117
+ ************************
1118
+
1119
+ * By group *
1120
+
1121
+ * Lack of Effort reason poor *
1122
+ global vars effort_poor
1123
+ foreach var in $vars{
1124
+ forvalues q=2(1)8 {
1125
+ ci means `var' if var_`q'==1, level(95)
1126
+ local bY_`q' = r(mean)
1127
+ local ub_bY_`q' = r(ub)
1128
+ local lb_bY_`q' = r(lb)
1129
+ }
1130
+ forvalues q=2(1)8 {
1131
+ ci means `var' if var_`q'==0, level(95)
1132
+ local bN_`q' = r(mean)
1133
+ local ub_bN_`q' = r(ub)
1134
+ local lb_bN_`q' = r(lb)
1135
+ }
1136
+ ci means `var' if var_1==1 & center!=1, level(95)
1137
+ local bY_1 = r(mean)
1138
+ local ub_bY_1 = r(ub)
1139
+ local lb_bY_1 = r(lb)
1140
+ ci means `var' if var_1==0 & center!=1, level(95)
1141
+ local bN_1 = r(mean)
1142
+ local ub_bN_1 = r(ub)
1143
+ local lb_bN_1 = r(lb)
1144
+
1145
+ ci means `var' if sector_dummy==0 , level(95)
1146
+ local bN_7 = r(mean)
1147
+ local ub_bN_7 = r(ub)
1148
+ local lb_bN_7 = r(lb)
1149
+ local bN_8 = r(mean)
1150
+ local ub_bN_8 = r(ub)
1151
+ local lb_bN_8 = r(lb)
1152
+ }
1153
+ preserve
1154
+ clear
1155
+ set obs 46
1156
+ egen t = seq()
1157
+ 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."
1158
+ label values t quintile
1159
+ replace t=t/3
1160
+
1161
+ gen bY = .
1162
+ gen ub_bY = .
1163
+ gen lb_bY = .
1164
+ gen bN = .
1165
+ gen ub_bN = .
1166
+ gen lb_bN = .
1167
+ gen n=_n
1168
+
1169
+
1170
+ local q = 3
1171
+ forvalues i=1(1)6 {
1172
+ replace bY=`bY_`i'' if n==`q'
1173
+ replace ub_bY=`ub_bY_`i'' if n==`q'
1174
+ replace lb_bY=`lb_bY_`i'' if n==`q'
1175
+ local q = `q' + 6
1176
+ }
1177
+
1178
+ local q = 6
1179
+ forvalues i=1(1)6 {
1180
+ replace bN=`bN_`i'' if n==`q'
1181
+ replace ub_bN=`ub_bN_`i'' if n==`q'
1182
+ replace lb_bN=`lb_bN_`i'' if n==`q'
1183
+ local q = `q' + 6
1184
+ }
1185
+
1186
+
1187
+ replace bY=`bY_8' if n==39
1188
+ replace ub_bY=`ub_bY_8' if n==39
1189
+ replace lb_bY=`lb_bY_8' if n==39
1190
+
1191
+ replace bN=`bY_7' if n==42
1192
+ replace ub_bN=`ub_bY_7' if n==42
1193
+ replace lb_bN=`lb_bY_7' if n==42
1194
+
1195
+ replace bN=`bN_7' if n==45
1196
+ replace ub_bN=`ub_bN_7' if n==45
1197
+ replace lb_bN=`lb_bN_7' if n==45
1198
+
1199
+ export delimited "$outdir/figure_5_a_r_data.csv", replace
1200
+
1201
+
1202
+ restore
1203
+
1204
+ * By country *
1205
+
1206
+ gen var_perc = effort_poor
1207
+
1208
+
1209
+ *** Means of variables ***
1210
+ foreach x in US UK IT FR SE DE {
1211
+ ci means var_perc if country=="`x'", level(95)
1212
+ *storing mean and confidence interval for perceived data
1213
+ local m_perc`x' = r(mean)
1214
+ local lb_perc`x' = r(lb)
1215
+ local ub_perc`x' = r(ub)
1216
+ *ci means var_real if country=="`x'", level(95)
1217
+ *local m_real`x' = r(mean)
1218
+ qui su var_perc if country=="`x'", detail
1219
+ local md_perc`x' = r(p50)
1220
+ local p25`x' = r(p25)
1221
+ local p75`x' = r(p75)
1222
+ }
1223
+
1224
+
1225
+ preserve
1226
+ clear
1227
+ set obs 31
1228
+ egen t = seq()
1229
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
1230
+ label values t var
1231
+ replace t=t/5
1232
+
1233
+ gen m_perc = .
1234
+ gen md_perc = .
1235
+ gen lb_perc = .
1236
+ gen ub_perc = .
1237
+ gen m_real = .
1238
+ gen p25 = .
1239
+ gen p75 = .
1240
+
1241
+ gen n=_n
1242
+
1243
+ local q = 5
1244
+ foreach x in SE DE IT FR UK US {
1245
+ replace m_perc=`m_perc`x'' if n==`q'
1246
+ replace md_perc=`md_perc`x'' if n==`q'
1247
+ replace lb_perc=`lb_perc`x'' if n==`q'
1248
+ replace ub_perc=`ub_perc`x'' if n==`q'
1249
+ *replace m_real=`m_real`x'' if n==`q'
1250
+ replace p25=`p25`x'' if n==`q'
1251
+ replace p75=`p75`x'' if n==`q'
1252
+ local q = `q' + 5
1253
+ }
1254
+
1255
+ * Add averages from Alesina, Stantcheva and Teso (2018)
1256
+ replace m_real=0.458694398 if n==30
1257
+ replace m_real=0.366271406 if n==25
1258
+ replace m_real=0.234680578 if n==20
1259
+ replace m_real=0.137414962 if n==15
1260
+ replace m_real=0.323788553 if n==5
1261
+
1262
+ export delimited "$outdir/figure_5_a_l_data.csv", replace
1263
+
1264
+ restore
1265
+
1266
+ drop var_perc
1267
+
1268
+ *************************
1269
+ * Figure 5, Panel B -- Effort - Rich
1270
+ *********************
1271
+
1272
+ * By group
1273
+
1274
+ **** Effort reason rich *
1275
+ global vars effort_rich
1276
+ foreach var in $vars{
1277
+ forvalues q=2(1)8 {
1278
+ ci means `var' if var_`q'==1, level(95)
1279
+ local bY_`q' = r(mean)
1280
+ local ub_bY_`q' = r(ub)
1281
+ local lb_bY_`q' = r(lb)
1282
+ }
1283
+ forvalues q=2(1)8 {
1284
+ ci means `var' if var_`q'==0, level(95)
1285
+ local bN_`q' = r(mean)
1286
+ local ub_bN_`q' = r(ub)
1287
+ local lb_bN_`q' = r(lb)
1288
+ }
1289
+ ci means `var' if var_1==1 & center!=1, level(95)
1290
+ local bY_1 = r(mean)
1291
+ local ub_bY_1 = r(ub)
1292
+ local lb_bY_1 = r(lb)
1293
+ ci means `var' if var_1==0 & center!=1, level(95)
1294
+ local bN_1 = r(mean)
1295
+ local ub_bN_1 = r(ub)
1296
+ local lb_bN_1 = r(lb)
1297
+
1298
+ ci means `var' if sector_dummy==0 , level(95)
1299
+ local bN_7 = r(mean)
1300
+ local ub_bN_7 = r(ub)
1301
+ local lb_bN_7 = r(lb)
1302
+ local bN_8 = r(mean)
1303
+ local ub_bN_8 = r(ub)
1304
+ local lb_bN_8 = r(lb)
1305
+ }
1306
+ preserve
1307
+ clear
1308
+ set obs 46
1309
+ egen t = seq()
1310
+ 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."
1311
+ label values t quintile
1312
+ replace t=t/3
1313
+
1314
+ gen bY = .
1315
+ gen ub_bY = .
1316
+ gen lb_bY = .
1317
+ gen bN = .
1318
+ gen ub_bN = .
1319
+ gen lb_bN = .
1320
+ gen n=_n
1321
+
1322
+
1323
+ local q = 3
1324
+ forvalues i=1(1)6 {
1325
+ replace bY=`bY_`i'' if n==`q'
1326
+ replace ub_bY=`ub_bY_`i'' if n==`q'
1327
+ replace lb_bY=`lb_bY_`i'' if n==`q'
1328
+ local q = `q' + 6
1329
+ }
1330
+
1331
+ local q = 6
1332
+ forvalues i=1(1)6 {
1333
+ replace bN=`bN_`i'' if n==`q'
1334
+ replace ub_bN=`ub_bN_`i'' if n==`q'
1335
+ replace lb_bN=`lb_bN_`i'' if n==`q'
1336
+ local q = `q' + 6
1337
+ }
1338
+
1339
+
1340
+ replace bY=`bY_8' if n==39
1341
+ replace ub_bY=`ub_bY_8' if n==39
1342
+ replace lb_bY=`lb_bY_8' if n==39
1343
+
1344
+ replace bN=`bY_7' if n==42
1345
+ replace ub_bN=`ub_bY_7' if n==42
1346
+ replace lb_bN=`lb_bY_7' if n==42
1347
+
1348
+ replace bN=`bN_7' if n==45
1349
+ replace ub_bN=`ub_bN_7' if n==45
1350
+ replace lb_bN=`lb_bN_7' if n==45
1351
+
1352
+ export delimited "$outdir/figure_5_b_r_data.csv", replace
1353
+
1354
+ restore
1355
+
1356
+
1357
+ * By country
1358
+
1359
+ gen var_perc = effort_rich
1360
+
1361
+ *** Means of variables ***
1362
+ foreach x in US UK IT FR SE DE {
1363
+ ci means var_perc if country=="`x'", level(95)
1364
+ *storing mean and confidence interval for perceived data
1365
+ local m_perc`x' = r(mean)
1366
+ local lb_perc`x' = r(lb)
1367
+ local ub_perc`x' = r(ub)
1368
+ *ci means var_real if country=="`x'", level(95)
1369
+ *local m_real`x' = r(mean)
1370
+ qui su var_perc if country=="`x'", detail
1371
+ local md_perc`x' = r(p50)
1372
+ local p25`x' = r(p25)
1373
+ local p75`x' = r(p75)
1374
+ }
1375
+
1376
+
1377
+ preserve
1378
+ clear
1379
+ set obs 31
1380
+ egen t = seq()
1381
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
1382
+ label values t var
1383
+ replace t=t/5
1384
+
1385
+ gen m_perc = .
1386
+ gen md_perc = .
1387
+ gen lb_perc = .
1388
+ gen ub_perc = .
1389
+ gen m_real = .
1390
+ gen p25 = .
1391
+ gen p75 = .
1392
+
1393
+ gen n=_n
1394
+
1395
+ local q = 5
1396
+ foreach x in SE DE IT FR UK US {
1397
+ replace m_perc=`m_perc`x'' if n==`q'
1398
+ replace md_perc=`md_perc`x'' if n==`q'
1399
+ replace lb_perc=`lb_perc`x'' if n==`q'
1400
+ replace ub_perc=`ub_perc`x'' if n==`q'
1401
+ *replace m_real=`m_real`x'' if n==`q'
1402
+ replace p25=`p25`x'' if n==`q'
1403
+ replace p75=`p75`x'' if n==`q'
1404
+ local q = `q' + 5
1405
+ }
1406
+
1407
+ *US
1408
+ replace m_real=0.391681105 if n==30
1409
+ *UK
1410
+ replace m_real=0.312252969 if n==25
1411
+ *FR
1412
+ replace m_real=0.305084735 if n==20
1413
+ *IT
1414
+ replace m_real=0.16870749 if n==15
1415
+ *SE
1416
+ replace m_real=0.383259922 if n==5
1417
+
1418
+
1419
+ export delimited "$outdir/figure_5_b_l_data.csv", replace
1420
+ restore
1421
+
1422
+ drop var_perc
1423
+
1424
+
1425
+ ************************
1426
+ * Figure 6, Are Immigrants The Beneficiaries of Redistribution?
1427
+ * Panel A -- An immigtant gets twice as much as a native
1428
+ ************************
1429
+
1430
+ **** Immigrants get twice as much as natives or more *
1431
+
1432
+ * By group
1433
+
1434
+ global vars imm_tra_twice_more
1435
+ foreach var in $vars{
1436
+ forvalues q=2(1)8 {
1437
+ ci means `var' if var_`q'==1, level(95)
1438
+ local bY_`q' = r(mean)
1439
+ local ub_bY_`q' = r(ub)
1440
+ local lb_bY_`q' = r(lb)
1441
+ }
1442
+ forvalues q=2(1)8 {
1443
+ ci means `var' if var_`q'==0, level(95)
1444
+ local bN_`q' = r(mean)
1445
+ local ub_bN_`q' = r(ub)
1446
+ local lb_bN_`q' = r(lb)
1447
+ }
1448
+ ci means `var' if var_1==1 & center!=1, level(95)
1449
+ local bY_1 = r(mean)
1450
+ local ub_bY_1 = r(ub)
1451
+ local lb_bY_1 = r(lb)
1452
+ ci means `var' if var_1==0 & center!=1, level(95)
1453
+ local bN_1 = r(mean)
1454
+ local ub_bN_1 = r(ub)
1455
+ local lb_bN_1 = r(lb)
1456
+
1457
+ ci means `var' if sector_dummy==0 , level(95)
1458
+ local bN_7 = r(mean)
1459
+ local ub_bN_7 = r(ub)
1460
+ local lb_bN_7 = r(lb)
1461
+ local bN_8 = r(mean)
1462
+ local ub_bN_8 = r(ub)
1463
+ local lb_bN_8 = r(lb)
1464
+ }
1465
+ preserve
1466
+ clear
1467
+ set obs 46
1468
+ egen t = seq()
1469
+ 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."
1470
+ label values t quintile
1471
+ replace t=t/3
1472
+
1473
+ gen bY = .
1474
+ gen ub_bY = .
1475
+ gen lb_bY = .
1476
+ gen bN = .
1477
+ gen ub_bN = .
1478
+ gen lb_bN = .
1479
+ gen n=_n
1480
+
1481
+
1482
+ local q = 3
1483
+ forvalues i=1(1)6 {
1484
+ replace bY=`bY_`i'' if n==`q'
1485
+ replace ub_bY=`ub_bY_`i'' if n==`q'
1486
+ replace lb_bY=`lb_bY_`i'' if n==`q'
1487
+ local q = `q' + 6
1488
+ }
1489
+
1490
+ local q = 6
1491
+ forvalues i=1(1)6 {
1492
+ replace bN=`bN_`i'' if n==`q'
1493
+ replace ub_bN=`ub_bN_`i'' if n==`q'
1494
+ replace lb_bN=`lb_bN_`i'' if n==`q'
1495
+ local q = `q' + 6
1496
+ }
1497
+
1498
+
1499
+ replace bY=`bY_8' if n==39
1500
+ replace ub_bY=`ub_bY_8' if n==39
1501
+ replace lb_bY=`lb_bY_8' if n==39
1502
+
1503
+ replace bN=`bY_7' if n==42
1504
+ replace ub_bN=`ub_bY_7' if n==42
1505
+ replace lb_bN=`lb_bY_7' if n==42
1506
+
1507
+ replace bN=`bN_7' if n==45
1508
+ replace ub_bN=`ub_bN_7' if n==45
1509
+ replace lb_bN=`lb_bN_7' if n==45
1510
+
1511
+ export delimited "$outdir/figure_6_a_r_data.csv", replace
1512
+
1513
+ restore
1514
+
1515
+ * By country
1516
+
1517
+ gen var_perc = imm_tra_twice_more
1518
+
1519
+ *** Means of variables ***
1520
+ foreach x in US UK IT FR SE DE {
1521
+ ci means var_perc if country=="`x'", level(95)
1522
+ *storing mean and confidence interval for perceived data
1523
+ local m_perc`x' = r(mean)
1524
+ local lb_perc`x' = r(lb)
1525
+ local ub_perc`x' = r(ub)
1526
+ *ci means var_real if country=="`x'", level(95)
1527
+ *local m_real`x' = r(mean)
1528
+ qui su var_perc if country=="`x'", detail
1529
+ local md_perc`x' = r(p50)
1530
+ local p25`x' = r(p25)
1531
+ local p75`x' = r(p75)
1532
+ }
1533
+
1534
+
1535
+ preserve
1536
+ clear
1537
+ set obs 31
1538
+ egen t = seq()
1539
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
1540
+ label values t var
1541
+ replace t=t/5
1542
+
1543
+ gen m_perc = .
1544
+ gen md_perc = .
1545
+ gen lb_perc = .
1546
+ gen ub_perc = .
1547
+ gen m_real = .
1548
+ gen p25 = .
1549
+ gen p75 = .
1550
+
1551
+ gen n=_n
1552
+
1553
+ local q = 5
1554
+ foreach x in SE DE IT FR UK US {
1555
+ replace m_perc=`m_perc`x'' if n==`q'
1556
+ replace md_perc=`md_perc`x'' if n==`q'
1557
+ replace lb_perc=`lb_perc`x'' if n==`q'
1558
+ replace ub_perc=`ub_perc`x'' if n==`q'
1559
+ *replace m_real=`m_real`x'' if n==`q'
1560
+ replace p25=`p25`x'' if n==`q'
1561
+ replace p75=`p75`x'' if n==`q'
1562
+ local q = `q' + 5
1563
+ }
1564
+
1565
+ export delimited "$outdir/figure_6_a_l_data.csv", replace
1566
+
1567
+ restore
1568
+
1569
+ drop var_perc
1570
+
1571
+
1572
+ ************************
1573
+ * Figure 6, Panel B -- Conditional Transfers (Mohammad vs. John)
1574
+ ************************
1575
+
1576
+ **** Mohammad question *
1577
+
1578
+ * By group
1579
+
1580
+ global vars moh_more
1581
+ foreach var in $vars{
1582
+ forvalues q=2(1)8 {
1583
+ ci means `var' if var_`q'==1, level(95)
1584
+ local bY_`q' = r(mean)
1585
+ local ub_bY_`q' = r(ub)
1586
+ local lb_bY_`q' = r(lb)
1587
+ }
1588
+ forvalues q=2(1)8 {
1589
+ ci means `var' if var_`q'==0, level(95)
1590
+ local bN_`q' = r(mean)
1591
+ local ub_bN_`q' = r(ub)
1592
+ local lb_bN_`q' = r(lb)
1593
+ }
1594
+ ci means `var' if var_1==1 & center!=1, level(95)
1595
+ local bY_1 = r(mean)
1596
+ local ub_bY_1 = r(ub)
1597
+ local lb_bY_1 = r(lb)
1598
+ ci means `var' if var_1==0 & center!=1, level(95)
1599
+ local bN_1 = r(mean)
1600
+ local ub_bN_1 = r(ub)
1601
+ local lb_bN_1 = r(lb)
1602
+
1603
+ ci means `var' if sector_dummy==0 , level(95)
1604
+ local bN_7 = r(mean)
1605
+ local ub_bN_7 = r(ub)
1606
+ local lb_bN_7 = r(lb)
1607
+ local bN_8 = r(mean)
1608
+ local ub_bN_8 = r(ub)
1609
+ local lb_bN_8 = r(lb)
1610
+ }
1611
+ preserve
1612
+ clear
1613
+ set obs 46
1614
+ egen t = seq()
1615
+ 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."
1616
+ label values t quintile
1617
+ replace t=t/3
1618
+
1619
+ gen bY = .
1620
+ gen ub_bY = .
1621
+ gen lb_bY = .
1622
+ gen bN = .
1623
+ gen ub_bN = .
1624
+ gen lb_bN = .
1625
+ gen n=_n
1626
+
1627
+
1628
+ local q = 3
1629
+ forvalues i=1(1)6 {
1630
+ replace bY=`bY_`i'' if n==`q'
1631
+ replace ub_bY=`ub_bY_`i'' if n==`q'
1632
+ replace lb_bY=`lb_bY_`i'' if n==`q'
1633
+ local q = `q' + 6
1634
+ }
1635
+
1636
+ local q = 6
1637
+ forvalues i=1(1)6 {
1638
+ replace bN=`bN_`i'' if n==`q'
1639
+ replace ub_bN=`ub_bN_`i'' if n==`q'
1640
+ replace lb_bN=`lb_bN_`i'' if n==`q'
1641
+ local q = `q' + 6
1642
+ }
1643
+
1644
+
1645
+ replace bY=`bY_8' if n==39
1646
+ replace ub_bY=`ub_bY_8' if n==39
1647
+ replace lb_bY=`lb_bY_8' if n==39
1648
+
1649
+ replace bN=`bY_7' if n==42
1650
+ replace ub_bN=`ub_bY_7' if n==42
1651
+ replace lb_bN=`lb_bY_7' if n==42
1652
+
1653
+ replace bN=`bN_7' if n==45
1654
+ replace ub_bN=`ub_bN_7' if n==45
1655
+ replace lb_bN=`lb_bN_7' if n==45
1656
+
1657
+ export delimited "$outdir/figure_6_b_r_data.csv", replace
1658
+
1659
+ restore
1660
+
1661
+ * By country *
1662
+
1663
+ gen var_perc = moh_more
1664
+
1665
+ *** Means of variables ***
1666
+ foreach x in US UK IT FR SE DE {
1667
+ ci means var_perc if country=="`x'", level(95)
1668
+ *storing mean and confidence interval for perceived data
1669
+ local m_perc`x' = r(mean)
1670
+ local lb_perc`x' = r(lb)
1671
+ local ub_perc`x' = r(ub)
1672
+ *ci means var_real if country=="`x'", level(95)
1673
+ *local m_real`x' = r(mean)
1674
+ qui su var_perc if country=="`x'", detail
1675
+ local md_perc`x' = r(p50)
1676
+ local p25`x' = r(p25)
1677
+ local p75`x' = r(p75)
1678
+ }
1679
+
1680
+
1681
+ preserve
1682
+ clear
1683
+ set obs 31
1684
+ egen t = seq()
1685
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
1686
+ label values t var
1687
+ replace t=t/5
1688
+
1689
+ gen m_perc = .
1690
+ gen md_perc = .
1691
+ gen lb_perc = .
1692
+ gen ub_perc = .
1693
+ gen m_real = .
1694
+ gen p25 = .
1695
+ gen p75 = .
1696
+
1697
+ gen n=_n
1698
+
1699
+ local q = 5
1700
+ foreach x in SE DE IT FR UK US {
1701
+ replace m_perc=`m_perc`x'' if n==`q'
1702
+ replace md_perc=`md_perc`x'' if n==`q'
1703
+ replace lb_perc=`lb_perc`x'' if n==`q'
1704
+ replace ub_perc=`ub_perc`x'' if n==`q'
1705
+ *replace m_real=`m_real`x'' if n==`q'
1706
+ replace p25=`p25`x'' if n==`q'
1707
+ replace p75=`p75`x'' if n==`q'
1708
+ local q = `q' + 5
1709
+ }
1710
+
1711
+ export delimited "$outdir/figure_6_b_l_data.csv", replace
1712
+
1713
+ restore
1714
+
1715
+ drop var_perc
1716
+
1717
+ ************************
1718
+ * Figure 7 -- Poverty
1719
+ ************************
1720
+
1721
+ * By group *
1722
+
1723
+ global vars mis_poverty_imm
1724
+ foreach var in $vars{
1725
+ forvalues q=2(1)8 {
1726
+ ci means `var' if var_`q'==1, level(95)
1727
+ local bY_`q' = r(mean)
1728
+ local ub_bY_`q' = r(ub)
1729
+ local lb_bY_`q' = r(lb)
1730
+ qui su `var' if var_`q'==1, detail
1731
+ local b2Y_`q' = r(p50)
1732
+ local ub2_bY_`q' = r(p75)
1733
+ local lb2_bY_`q' = r(p25)
1734
+ }
1735
+ forvalues q=2(1)8 {
1736
+ ci means `var' if var_`q'==0, level(95)
1737
+ local bN_`q' = r(mean)
1738
+ local ub_bN_`q' = r(ub)
1739
+ local lb_bN_`q' = r(lb)
1740
+ qui su `var' if var_`q'==0, detail
1741
+ local b2N_`q' = r(p50)
1742
+ local ub2_bN_`q' = r(p75)
1743
+ local lb2_bN_`q' = r(p25)
1744
+ }
1745
+ ci means `var' if var_1==1 & center!=1, level(95)
1746
+ local bY_1 = r(mean)
1747
+ local ub_bY_1 = r(ub)
1748
+ local lb_bY_1 = r(lb)
1749
+ qui su `var' if var_1==1 & center!=1, detail
1750
+ local b2Y_1 = r(p50)
1751
+ local ub2_bY_1 = r(p75)
1752
+ local lb2_bY_1 = r(p25)
1753
+ ci means `var' if var_1==0 & center!=1, level(95)
1754
+ local bN_1 = r(mean)
1755
+ local ub_bN_1 = r(ub)
1756
+ local lb_bN_1 = r(lb)
1757
+ qui su `var' if var_1==0 & center!=1, detail
1758
+ local b2N_1 = r(p50)
1759
+ local ub2_bN_1 = r(p75)
1760
+ local lb2_bN_1 = r(p25)
1761
+
1762
+ ci means `var' if sector_dummy==0 , level(95)
1763
+ local bN_7 = r(mean)
1764
+ local ub_bN_7 = r(ub)
1765
+ local lb_bN_7 = r(lb)
1766
+ local bN_8 = r(mean)
1767
+ local ub_bN_8 = r(ub)
1768
+ local lb_bN_8 = r(lb)
1769
+ qui su `var' if sector_dummy==0 , detail
1770
+ local b2N_7 = r(p50)
1771
+ local b2N_8 = r(p50)
1772
+ local ub2_bN_7 = r(p75)
1773
+ local lb2_bN_7 = r(p25)
1774
+ local ub2_bN_8 = r(p75)
1775
+ local lb2_bN_8 = r(p25)
1776
+ }
1777
+
1778
+ global vars mis_poverty_nat
1779
+ foreach var in $vars{
1780
+ forvalues q=2(1)8 {
1781
+ ci means `var' if var_`q'==1, level(95)
1782
+ local bNY_`q' = r(mean)
1783
+ local ub_bNY_`q' = r(ub)
1784
+ local lb_bNY_`q' = r(lb)
1785
+ qui su `var' if var_`q'==1, detail
1786
+ local b2NY_`q' = r(p50)
1787
+ local ub2_bNY_`q' = r(p75)
1788
+ local lb2_bNY_`q' = r(p25)
1789
+ }
1790
+ forvalues q=2(1)8 {
1791
+ ci means `var' if var_`q'==0, level(95)
1792
+ local bNN_`q' = r(mean)
1793
+ local ub_bNN_`q' = r(ub)
1794
+ local lb_bNN_`q' = r(lb)
1795
+ qui su `var' if var_`q'==0, detail
1796
+ local b2NN_`q' = r(p50)
1797
+ local ub2_bNN_`q' = r(p75)
1798
+ local lb2_bNN_`q' = r(p25)
1799
+ }
1800
+ ci means `var' if var_1==1 & center!=1, level(95)
1801
+ local bNY_1 = r(mean)
1802
+ local ub_bNY_1 = r(ub)
1803
+ local lb_bNY_1 = r(lb)
1804
+ qui su `var' if var_1==1 & center!=1, detail
1805
+ local b2NY_1 = r(p50)
1806
+ local ub2_bNY_1 = r(p75)
1807
+ local lb2_bNY_1 = r(p25)
1808
+ ci means `var' if var_1==0 & center!=1, level(95)
1809
+ local bNN_1 = r(mean)
1810
+ local ub_bNN_1 = r(ub)
1811
+ local lb_bNN_1 = r(lb)
1812
+ qui su `var' if var_1==0 & center!=1, detail
1813
+ local b2NN_1 = r(p50)
1814
+ local ub2_bNN_1 = r(p75)
1815
+ local lb2_bNN_1 = r(p25)
1816
+
1817
+ ci means `var' if sector_dummy==0 , level(95)
1818
+ local bNN_7 = r(mean)
1819
+ local ub_bNN_7 = r(ub)
1820
+ local lb_bNN_7 = r(lb)
1821
+ local bNN_8 = r(mean)
1822
+ local ub_bNN_8 = r(ub)
1823
+ local lb_bNN_8 = r(lb)
1824
+ qui su `var' if sector_dummy==0 , detail
1825
+ local b2NN_7 = r(p50)
1826
+ local b2NN_8 = r(p50)
1827
+ local ub2_bNN_7 = r(p75)
1828
+ local lb2_bNN_7 = r(p25)
1829
+ local ub2_bNN_8 = r(p75)
1830
+ local lb2_bNN_8 = r(p25)
1831
+ }
1832
+ preserve
1833
+ clear
1834
+ set obs 46
1835
+ egen t = seq()
1836
+ 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."
1837
+ label values t quintile
1838
+ replace t=t/3
1839
+
1840
+ gen bY = .
1841
+ gen bNY = .
1842
+ gen ub_bY = .
1843
+ gen lb_bY = .
1844
+ gen ub_bNY = .
1845
+ gen lb_bNY = .
1846
+ gen bN = .
1847
+ gen bNN = .
1848
+ gen ub_bN = .
1849
+ gen lb_bN = .
1850
+ gen ub_bNN = .
1851
+ gen lb_bNN = .
1852
+ gen n=_n
1853
+
1854
+
1855
+ local q = 3
1856
+ forvalues i=1(1)6 {
1857
+ replace bY=`bY_`i'' if n==`q'
1858
+ replace ub_bY=`ub_bY_`i'' if n==`q'
1859
+ replace lb_bY=`lb_bY_`i'' if n==`q'
1860
+ local q = `q' + 6
1861
+ }
1862
+
1863
+ local q = 3
1864
+ forvalues i=1(1)6 {
1865
+ replace bNY=`bNY_`i'' if n==`q'
1866
+ replace ub_bNY=`ub_bNY_`i'' if n==`q'
1867
+ replace lb_bNY=`lb_bNY_`i'' if n==`q'
1868
+ local q = `q' + 6
1869
+ }
1870
+
1871
+ local q = 6
1872
+ forvalues i=1(1)6 {
1873
+ replace bN=`bN_`i'' if n==`q'
1874
+ replace ub_bN=`ub_bN_`i'' if n==`q'
1875
+ replace lb_bN=`lb_bN_`i'' if n==`q'
1876
+ local q = `q' + 6
1877
+ }
1878
+
1879
+ local q = 6
1880
+ forvalues i=1(1)6 {
1881
+ replace bNN=`bNN_`i'' if n==`q'
1882
+ replace ub_bNN=`ub_bNN_`i'' if n==`q'
1883
+ replace lb_bNN=`lb_bNN_`i'' if n==`q'
1884
+ local q = `q' + 6
1885
+ }
1886
+
1887
+
1888
+ replace bY=`bY_8' if n==39
1889
+ replace ub_bY=`ub_bY_8' if n==39
1890
+ replace lb_bY=`lb_bY_8' if n==39
1891
+
1892
+ replace bN=`bY_7' if n==42
1893
+ replace ub_bN=`ub_bY_7' if n==42
1894
+ replace lb_bN=`lb_bY_7' if n==42
1895
+
1896
+ replace bN=`bN_7' if n==45
1897
+ replace ub_bN=`ub_bN_7' if n==45
1898
+ replace lb_bN=`lb_bN_7' if n==45
1899
+
1900
+ replace bNY=`bNY_8' if n==39
1901
+ replace ub_bNY=`ub_bNY_8' if n==39
1902
+ replace lb_bNY=`lb_bNY_8' if n==39
1903
+
1904
+ replace bNN=`bNY_7' if n==42
1905
+ replace ub_bNN=`ub_bNY_7' if n==42
1906
+ replace lb_bNN=`lb_bNY_7' if n==42
1907
+
1908
+ replace bNN=`bNN_7' if n==45
1909
+ replace ub_bNN=`ub_bNN_7' if n==45
1910
+ replace lb_bNN=`lb_bNN_7' if n==45
1911
+
1912
+ export delimited "$outdir/figure_7_r_data.csv", replace
1913
+
1914
+ restore
1915
+
1916
+ * By country *
1917
+
1918
+ gen var_perc = mis_poverty_imm
1919
+
1920
+ gen var_nat = mis_poverty_nat
1921
+
1922
+
1923
+ *** Means of variables ***
1924
+ foreach x in US UK IT FR SE DE {
1925
+ ci means var_perc if country=="`x'", level(95)
1926
+ *storing mean and confidence interval for perceived data
1927
+ local m_perc`x' = r(mean)
1928
+ local lb_perc`x' = r(lb)
1929
+ local ub_perc`x' = r(ub)
1930
+ ci means var_nat if country=="`x'", level(95)
1931
+ local m_nat`x' = r(mean)
1932
+ local lb_nat`x' = r(lb)
1933
+ local ub_nat`x' = r(ub)
1934
+ qui su var_perc if country=="`x'", detail
1935
+ local md_perc`x' = r(p50)
1936
+ local p25`x' = r(p25)
1937
+ local p75`x' = r(p75)
1938
+ }
1939
+
1940
+
1941
+ preserve
1942
+ clear
1943
+ set obs 31
1944
+ egen t = seq()
1945
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
1946
+ label values t var
1947
+ replace t=t/5
1948
+
1949
+ gen m_perc = .
1950
+ gen md_perc = .
1951
+ gen lb_perc = .
1952
+ gen ub_perc = .
1953
+ gen m_nat = .
1954
+ gen lb_nat = .
1955
+ gen ub_nat = .
1956
+ gen p25 = .
1957
+ gen p75 = .
1958
+
1959
+ gen n=_n
1960
+
1961
+ local q = 5
1962
+ foreach x in SE DE IT FR UK US {
1963
+ replace m_perc=`m_perc`x'' if n==`q'
1964
+ replace md_perc=`md_perc`x'' if n==`q'
1965
+ replace lb_perc=`lb_perc`x'' if n==`q'
1966
+ replace ub_perc=`ub_perc`x'' if n==`q'
1967
+ replace m_nat=`m_nat`x'' if n==`q'
1968
+ replace lb_nat=`lb_nat`x'' if n==`q'
1969
+ replace ub_nat=`ub_nat`x'' if n==`q'
1970
+ replace p25=`p25`x'' if n==`q'
1971
+ replace p75=`p75`x'' if n==`q'
1972
+ local q = `q' + 5
1973
+ }
1974
+
1975
+ export delimited "$outdir/figure_7_l_data.csv", replace
1976
+
1977
+ restore
1978
+
1979
+ drop var_perc var_nat
1980
+
1981
+
1982
+ ********************
1983
+ * Figure 9 - Share of first and second gen immigrants
1984
+ *******************
1985
+
1986
+
1987
+ * By Country graph
1988
+
1989
+ gen var_perc = perc_share_foreign
1990
+
1991
+ gen var_real = share_foreign
1992
+
1993
+ gen var_real_2 = share_foreign2
1994
+
1995
+
1996
+
1997
+ *** Means of variables ***
1998
+ foreach x in US UK IT FR SE DE {
1999
+ ci means var_perc if country=="`x'", level(95)
2000
+ *storing mean and confidence interval for perceived data
2001
+ local m_perc`x' = r(mean)
2002
+ local lb_perc`x' = r(lb)
2003
+ local ub_perc`x' = r(ub)
2004
+ ci means var_real if country=="`x'", level(95)
2005
+ local m_real`x' = r(mean)
2006
+ ci means var_real_2 if country=="`x'", level(95)
2007
+ local m_real`x'_2 = r(mean)
2008
+ qui su var_perc if country=="`x'", detail
2009
+ local md_perc`x' = r(p50)
2010
+ local p25`x' = r(p25)
2011
+ local p75`x' = r(p75)
2012
+ }
2013
+
2014
+
2015
+ preserve
2016
+ clear
2017
+ set obs 31
2018
+ egen t = seq()
2019
+ label define var 1 "Sweden" 2 "Germany" 3 "Italy" 4 "France" 5 "UK" 6 "US"
2020
+ label values t var
2021
+ replace t=t/5
2022
+
2023
+ gen m_perc = .
2024
+ gen md_perc = .
2025
+ gen lb_perc = .
2026
+ gen ub_perc = .
2027
+ gen m_real = .
2028
+ gen m_real_2 = .
2029
+ gen p25 = .
2030
+ gen p75 = .
2031
+
2032
+ gen n=_n
2033
+
2034
+ local q = 5
2035
+ foreach x in SE DE IT FR UK US {
2036
+ replace m_perc=`m_perc`x'' if n==`q'
2037
+ replace md_perc=`md_perc`x'' if n==`q'
2038
+ replace lb_perc=`lb_perc`x'' if n==`q'
2039
+ replace ub_perc=`ub_perc`x'' if n==`q'
2040
+ replace m_real=`m_real`x'' if n==`q'
2041
+ replace m_real_2=`m_real`x'_2' if n==`q'
2042
+ replace p25=`p25`x'' if n==`q'
2043
+ replace p75=`p75`x'' if n==`q'
2044
+ local q = `q' + 5
2045
+ }
2046
+
2047
+
2048
+ export delimited "$outdir/figure_9_data.csv", replace
2049
+
2050
+
2051
+
2052
+
2053
+ restore
2054
+
2055
+ drop var_perc var_real var_real_2
2056
+
37/replication_package/Do/Figures/Fig8.do ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **********
2
+ * Immigration and Redistribution
3
+ * Alesina, Miano, Stantcheva
4
+ * RESTUD
5
+
6
+ * Figure 8
7
+ **********
8
+
9
+ clear all
10
+
11
+ * Specify directory of the replication package
12
+ global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"
13
+ cd "$dir"
14
+
15
+ * Declare output sub-directory
16
+
17
+ global outdir "Out/Figures"
18
+
19
+ * Load the data
20
+ use "Data/survey_analysis.dta", clear
21
+
22
+ * Countries included in the analysis
23
+ global countries "US UK DE FR IT SE"
24
+
25
+ * Generate flags - To ensure answers quality
26
+ gen flag_1=0
27
+ gen flag_2=0
28
+
29
+ bysort country treatment_recod: egen min_duration = pctile(duration), p(2)
30
+ bysort country treatment_recod: egen max_duration = pctile(duration), p(98)
31
+
32
+ replace flag_1=1 if duration<min_duration
33
+ replace flag_2=1 if duration>max_duration
34
+
35
+ * Drop respondents in bottom and top 2% of distribution of time spent on the survey
36
+ keep if flag_1==0 & flag_2==0
37
+
38
+ *Drop variable used to exclude inattentive respondents
39
+ drop flag_1 flag_2 min_duration max_duration
40
+
41
+ * Gen dummies for Categorical variables
42
+
43
+ * Immigration is not a problem
44
+ gen imm_not_problem=(q_imm_problem==16 | q_imm_problem==17)
45
+ replace imm_not_problem=. if q_imm_problem==.
46
+ la var imm_not_problem "The current number of immigrants is not a problem"
47
+
48
+ * When should immigrants be entitled to get benefits?
49
+ gen imm_benefits_soon=(q_imm_benefits==1 | q_imm_benefits==2 | q_imm_benefits==4)
50
+ replace imm_benefits_soon=. if q_imm_benefits==.
51
+ la var imm_benefits_soon "Immigrants should get benefits in less than 3 years"
52
+
53
+ * When should immigrants be allowed to apply for citizenship?
54
+ gen imm_citizenship_soon=(q_imm_citizenship==1 | q_imm_citizenship==2)
55
+ replace imm_citizenship_soon=. if q_imm_citizenship==.
56
+ la var imm_citizenship_soon "Immigrants should get citizenship in 2 or 5 years"
57
+
58
+ * When would you consider an immigrant "Truly American"?
59
+ gen trully_american_cit=(q_imm_american==7 | q_imm_american==1 | q_imm_american==4)
60
+ replace trully_american_cit=. if q_imm_american==.
61
+ la var trully_american_cit "Consider American at citizenship or sooner"
62
+
63
+ * Government should care about everyone
64
+ gen govt_everyone=(q_govt_imm==7 | q_govt_imm==6)
65
+ replace govt_everyone=. if q_govt_imm==.
66
+ la var govt_everyone "The government should care equally about everyone"
67
+
68
+
69
+ ****************
70
+ * Gen controls *
71
+ ****************
72
+
73
+
74
+ * Gen Left-right variables
75
+ * Based on vote or voting intensions
76
+ gen left=(party_voted==4 | party_voted==5)
77
+ replace left=. if party_voted==. | party_voted==6 | party_voted==0
78
+ gen right=(party_voted==1 | party_voted==2)
79
+ replace right=. if party_voted==. | party_voted==6 | party_voted==0
80
+ gen center=(party_voted==3)
81
+ replace center=. if party_voted==. | party_voted==6 | party_voted==0
82
+
83
+ label var left "Left-wing"
84
+ label var right "Right-wing"
85
+ label var center "Center"
86
+
87
+ foreach i in left right center{
88
+ label val `i' binary
89
+ }
90
+
91
+
92
+ * Gen variables for HI sectors, with low/high educ
93
+ gen sector_dummy_h=sector_dummy*university_degree
94
+ gen sector_dummy_l=sector_dummy*(1-university_degree)
95
+
96
+
97
+ *Young
98
+ gen young=(age<45)
99
+
100
+
101
+ gen US=(country=="US")
102
+ gen UK=(country=="UK")
103
+ gen IT=(country=="IT")
104
+ gen SE=(country=="SE")
105
+ gen DE=(country=="DE")
106
+ gen FR=(country=="FR")
107
+
108
+
109
+
110
+ * Keep control group only
111
+ ****************
112
+ keep if control==1
113
+ ****************
114
+
115
+
116
+ * Declare variables to be included in the graph
117
+
118
+ global imm_vars imm_not_problem imm_benefits_soon imm_citizenship_soon ///
119
+ trully_american_cit govt_everyone
120
+
121
+
122
+
123
+ ********** BY COUNTRY **********
124
+
125
+ *** Means of variables ***
126
+ foreach x in US UK FR IT DE SE {
127
+ foreach y in $imm_vars {
128
+ su `y' if country=="`x'"
129
+ local m`y'`x' = r(mean)
130
+ }
131
+ }
132
+
133
+
134
+ preserve
135
+ clear
136
+ set obs 26
137
+ egen t = seq()
138
+ label define var 5 "Govt. should care about everyone" 4 "American upon citiz. or before" 3 "Imm. allowed to get citiz. soon" ///
139
+ 2 "Imm. should get benefits soon" 1 "Imm. not a problem"
140
+ label values t var
141
+ replace t=t/5
142
+
143
+
144
+ gen m_US = .
145
+ gen m_UK = .
146
+ gen m_FR = .
147
+ gen m_IT = .
148
+ gen m_DE = .
149
+ gen m_SE = .
150
+
151
+ gen n=_n
152
+ foreach x in US UK FR IT DE SE {
153
+ replace m_`x'=`mgovt_everyone`x'' if n==25
154
+ replace m_`x'=`mtrully_american_cit`x'' if n==20
155
+ replace m_`x'=`mimm_citizenship_soon`x'' if n==15
156
+ replace m_`x'=`mimm_benefits_soon`x'' if n==10
157
+ replace m_`x'=`mimm_not_problem`x'' if n==5
158
+ }
159
+
160
+
161
+
162
+ twoway (scatter t m_US, mcolor(red) msize(large) lcolor(midblue) lpattern(solid) msymbol(D)) ///
163
+ (scatter t m_UK, mcolor(blue) msize(large) lcolor(red) lpattern(solid) msymbol(O)) ///
164
+ (scatter t m_FR, mcolor(dkgreen) msize(large) lcolor(red) lpattern(solid) msymbol(S)) ///
165
+ (scatter t m_IT, mcolor(orange) msize(large) lcolor(red) lpattern(solid) msymbol(T)) ///
166
+ (scatter t m_DE, mcolor(balck) msize(large) lcolor(red) lpattern(solid) msymbol(C)) ///
167
+ (scatter t m_SE, mcolor(purple) msize(vlarge) lcolor(midblue) lpattern(solid) msymbol(X)), ///
168
+ ytitle("") ylabel(1 2 3 4 5, value labsize(medium) angle(0) glcolor(gs16) noticks) ///
169
+ 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)) ///
170
+ xtitle("Share Answering Yes") ///
171
+ yline(1, lcolor(gs14) lpattern("-")) yline(2, lcolor(gs14) lpattern("-")) ///
172
+ yline(3, lcolor(gs14) lpattern("-")) yline(4, lcolor(gs14) lpattern("-")) ///
173
+ yline(5, lcolor(gs14) lpattern("-")) ///
174
+ graphregion(color(white)) plotregion(color(white))
175
+ graph export "$outdir/Figure_8_A.eps", as(eps) replace
176
+
177
+ restore
178
+
179
+
180
+ ********** BY CORE CHARACTERISTICS **********
181
+
182
+ gen var_1 = left
183
+ gen var_2 = right
184
+ gen var_3 = university_degree
185
+ gen var_4 = (1-university_degree)
186
+ gen var_5 = sector_dummy_l
187
+ gen var_6 = sector_dummy_h
188
+ gen var_7 = (1-sector_dummy)
189
+
190
+ *** Means of variables ***
191
+ forval i=1(1)7 {
192
+ foreach y in $imm_vars {
193
+ su `y' if var_`i'==1
194
+ local `y'_m`i' = r(mean)
195
+ }
196
+ }
197
+
198
+
199
+ preserve
200
+ clear
201
+ set obs 26
202
+ egen t = seq()
203
+ label define var 5 "Govt. should care about everyone" 4 "American upon citiz. or before" 3 "Imm. allowed to get citiz. soon" ///
204
+ 2 "Imm. should get benefits soon" 1 "Imm. not a problem"
205
+ label values t var
206
+ replace t=t/5
207
+
208
+ forval i=1(1)7{
209
+ gen m_`i' = .
210
+ }
211
+
212
+ *label define var 1 "" 2 "" 3 "" 4 "" 5 ""
213
+
214
+ gen n=_n
215
+
216
+ forval i=1(1)7 {
217
+ replace m_`i'=`govt_everyone_m`i'' if n==25
218
+ replace m_`i'=`trully_american_cit_m`i'' if n==20
219
+ replace m_`i'=`imm_citizenship_soon_m`i'' if n==15
220
+ replace m_`i'=`imm_benefits_soon_m`i'' if n==10
221
+ replace m_`i'=`imm_not_problem_m`i'' if n==5
222
+ }
223
+
224
+
225
+
226
+ twoway (scatter t m_1, mcolor(eltblue) msize(large) lcolor(eltblue) lpattern(solid) msymbol(S)) ///
227
+ (scatter t m_2, mcolor(maroon) msize(large) lcolor(maroon) lpattern(solid) msymbol(D)) ///
228
+ (scatter t m_3, mcolor(dkgreen) msize(large) lcolor(dkgreen) lpattern(solid) msymbol(C)) ///
229
+ (scatter t m_4, mcolor(yellow*1.3) msize(large) lcolor(yellow*1.3) lpattern(solid) msymbol(T)) ///
230
+ (scatter t m_5, mcolor(orange) msize(vlarge) lcolor(orange) lpattern(solid) msymbol(+) mlwidth(medthick)) ///
231
+ (scatter t m_6, mcolor(black) msize(huge) lcolor(black) lpattern(solid) msymbol(X) mlwidth(medthick)) ///
232
+ (scatter t m_7, mcolor(navy) msize(vlarge) lcolor(navy) lpattern(solid) msymbol(pipe) mlwidth(medthick)) , ///
233
+ ytitle("") ylabel(1 2 3 4 5, value labsize(medium) angle(0) glcolor(gs16) noticks) ///
234
+ 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)) ///
235
+ xtitle("Share Answering Yes") xlabel(0(0.2)1) ///
236
+ yline(1, lcolor(gs14) lpattern("-")) yline(2, lcolor(gs14) lpattern("-")) ///
237
+ yline(3, lcolor(gs14) lpattern("-")) yline(4, lcolor(gs14) lpattern("-")) ///
238
+ yline(5, lcolor(gs14) lpattern("-")) ///
239
+ xlabel(0.1(0.2)0.7) ///
240
+ graphregion(color(white)) plotregion(color(white))
241
+ graph export "$outdir/Figure_8_B.eps", as(eps) replace
242
+
243
+ restore
244
+
37/replication_package/Do/Figures/Fig9.Rmd ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Figure 9"
3
+ output: pdf_document
4
+ ---
5
+
6
+ ```{r setup, include=FALSE}
7
+ knitr::opts_chunk$set(echo = F, warning = F, message = F)
8
+ ```
9
+
10
+ ```{r, include = F, echo = F}
11
+ # Importing Packages
12
+ rm(list=ls())
13
+ gc()
14
+ library(tidyverse)
15
+ library(extrafont)
16
+ library(gtable)
17
+ library(ggplot2)
18
+ library(gridExtra)
19
+ library(grid)
20
+ library(cowplot)
21
+ library(grDevices)
22
+ loadfonts()
23
+ ```
24
+
25
+ ```{r}
26
+ # SPECIFY DIRECTORY OF THE REPLICATION PACKAGE
27
+ setwd("C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing")
28
+
29
+ # IMPORTING DATASET
30
+ datafig_second_gen = read_csv('Out/Figures_data/figure_9_data.csv', show_col_types = FALSE)
31
+ ```
32
+
33
+ ```{r}
34
+ # Function to Export Figures: SPECIFY DIRECTORY OF THE REPLICATION PACKAGE
35
+
36
+ FigureExporter = function(Figure, Name, WhereFolderDraft = "C:/Users/Francesco/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"){
37
+ figure_name <- Name
38
+ figures_dir <- file.path(WhereFolderDraft, 'Out/Figures')
39
+ fig_path <- file.path(figures_dir, figure_name)
40
+ png(fig_path, width = 4800, height=2700, res = 720, type = c("cairo-png"))
41
+ Figure1 = Figure
42
+ print(Figure1)
43
+ }
44
+ ```
45
+
46
+
47
+
48
+ ```{r}
49
+ #Data Adjustment for cleaning (Left Panel) Function - Without Rescaling
50
+
51
+ DataAdjustNoResc = function(data){
52
+ data = data[data$t %in% c("Sweden", "Germany", "Italy", "France", "UK", "US"), !(names(data) %in% "n")]
53
+ data$m_perc <- data$m_perc
54
+ data$m_real <- data$m_real
55
+ data <- transform(data,
56
+ lbound = lb_perc,
57
+ ubound = ub_perc)
58
+
59
+ diff <- data %>%
60
+ mutate(Max = max(m_perc, m_real),
61
+ Min = min(m_perc, m_real),
62
+ Diff = Max / Min - 1) %>%
63
+ arrange(desc(Diff))
64
+
65
+ ## Create difference between perception and real
66
+ data$diff <- (data$m_perc - data$m_real)/data$m_real
67
+ data_adj = data
68
+ data_adj
69
+ }
70
+ ```
71
+
72
+
73
+ #Figure 9
74
+
75
+ ```{r}
76
+ # Data adjustment: rescaling not needed
77
+ datafig_second_gen_adj = DataAdjustNoResc(datafig_second_gen)
78
+
79
+ # Function to generate the graph
80
+ Left_10_B = function(xlb, xupb, distance_ticks){
81
+ data = datafig_second_gen_adj
82
+
83
+ p <- ggplot(data, aes(x=t)) +
84
+ ## Plot segment joining and points
85
+ geom_segment(aes(x=t, xend=t, y=m_real, yend=m_perc), size = 0.4, color="black") +
86
+ geom_segment(aes(x=t, xend=t, y=lbound, yend=ubound), size = 2, color = rgb(0.7,0.2,0.1,0.3)) +
87
+ geom_point(aes(x=t, y=m_real_2, colour= 'Act. 1 & 2 Gen.', shape = 'Act. 1 & 2 Gen.'), size=4) +
88
+ geom_point(aes(x=t, y=m_real, colour='Act. 1 Gen.', shape = 'Act. 1 Gen.'), size=4) +
89
+ geom_point(aes(x=t, y=m_perc, colour='Perceived (mean)', shape = 'Perceived (mean)'), size=3) +
90
+ coord_flip()
91
+
92
+ ## Add theme, labels, and modify scale
93
+ myshapes <- c("my_b" = "15", "my_d" = "18")
94
+ p1 <- p +
95
+ scale_y_continuous(limits = c(xlb, xupb), breaks = seq(xlb, xupb, by = distance_ticks)) +
96
+ theme_light() +
97
+ theme(
98
+ ## Control grid
99
+ panel.grid.major = element_line(linetype = 'dashed', color = 'darkgrey'),
100
+ panel.grid.major.y = element_line(linetype = 'solid', color = 'darkgrey'),
101
+
102
+ ## Control legend
103
+ legend.position = "bottom",
104
+ legend.box = "horizontal",
105
+ legend.justification = c(0.5,0),
106
+ legend.title = element_blank(),
107
+ text = element_text(family = "LM Roman 10", color='black', size=11),
108
+ axis.text = element_text(colour = 'black'),
109
+ axis.text.x = element_text(size=9),
110
+ axis.text.y = element_text(size=9),
111
+ axis.title.x = element_text(size = 9, margin = margin(t=15)),
112
+ axis.ticks.x = element_blank()
113
+ ) +
114
+ scale_colour_manual(name = "", labels = c( "Act. 1 & 2 Gen.", 'Act. 1 Gen.','Perceived (mean)'),
115
+ values = c("Act. 1 & 2 Gen." = "#1A476F", 'Act. 1 Gen.' = "#0080FF",
116
+ 'Perceived (mean)' = rgb(0.7,0.2,0.1,1))) +
117
+ scale_shape_manual(name = "", labels = c("Act. 1 & 2 Gen.",'Act. 1 Gen.', 'Perceived (mean)'),
118
+ values = c( "Act. 1 & 2 Gen." = 20, 'Act. 1 Gen.' = 18, 'Perceived (mean)' = 15)) +
119
+ xlab("") +
120
+ ylab("Share of Immigrants") +
121
+ guides(col = guide_legend(nrow=2,byrow=TRUE))
122
+ p1}
123
+ ```
124
+
125
+ ```{r}
126
+ # Generate Figure
127
+ plot_grid(Left_10_B(0, 40, 5), labels=NULL, ncol=2, align='h', axis='b')
128
+
129
+ # Export
130
+ FigureExporter(plot_grid(Left_10_B(0, 40, 5), labels=NULL, ncol=2, align='h', axis='b'), "Figure_9.png")
131
+
132
+ ```
37/replication_package/Do/Tables/Tab1.do ADDED
@@ -0,0 +1,295 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **********
2
+ * Immigration and Redistribution
3
+ * Alesina, Miano, Stantcheva
4
+ * RESTUD
5
+
6
+ * Table 1
7
+ * You should install the command frmttable before running this dofile -- type "search frmttable" and select sg97_5
8
+ **********
9
+
10
+ clear all
11
+
12
+ * Specify directory of the replication package
13
+ global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"
14
+ cd "$dir"
15
+
16
+ * Declare output sub-directory
17
+ global outdir "Out/Tables"
18
+
19
+ * Load the data
20
+ use "Data/survey_analysis.dta", clear
21
+
22
+ * Generate country dummies
23
+ gen US=(country=="US")
24
+ label var US "Answered the survey for the United States"
25
+ gen UK=(country=="UK")
26
+ label var UK "Answered the survey for the United Kingdom"
27
+ gen Italy=(country=="IT")
28
+ label var Italy "Answered the survey for Italy"
29
+ gen Sweden=(country=="SE")
30
+ label var Sweden "Answered the survey for Sweden"
31
+ gen Germany=(country=="DE")
32
+ label var Germany "Answered the survey for Germany"
33
+ gen France=(country=="FR")
34
+ label var France "Answered the survey for France"
35
+
36
+ foreach i in US UK Italy Sweden Germany France{
37
+ label val `i' binary
38
+ }
39
+
40
+ * Generate flags - To ensure answers quality
41
+
42
+ * Time spent on the survey
43
+ gen flag_1=0
44
+ gen flag_2=0
45
+
46
+ bysort country treatment_recod: egen min_duration = pctile(duration), p(2)
47
+ bysort country treatment_recod: egen max_duration = pctile(duration), p(98)
48
+
49
+ replace flag_1=1 if duration<min_duration
50
+ replace flag_2=1 if duration>max_duration
51
+
52
+ * Time spent on videos
53
+ global videos t1 t2 t3
54
+
55
+ foreach q in $videos{
56
+
57
+ bysort country: egen max_time_`q'= pctile(time_`q'), p(98)
58
+ }
59
+
60
+ foreach q in $videos{
61
+
62
+ gen flag_time_max_`q'=(time_`q'> max_time_`q')
63
+ replace flag_time_max_`q'=. if time_`q'==.
64
+
65
+ }
66
+
67
+
68
+ * Drop respondents that have spent too little or too much time on the survey (bottom/top 2%)
69
+ keep if flag_1==0 & flag_2==0
70
+
71
+
72
+ * Drop respondents who have spent too much time on the videos (top 2%)
73
+ foreach q in $videos{
74
+
75
+ drop if flag_time_max_`q'==1
76
+
77
+ }
78
+
79
+ * Drop the variables used to exclude inattentive respondents
80
+ 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
81
+
82
+ * Gen variables *
83
+
84
+ * Gender
85
+ gen male=(sex==1)
86
+ label var male "Is a male"
87
+ label val male binary
88
+
89
+ * Age brackets
90
+ gen age_1=(age>=18 & age<=29)
91
+ label var age_1 "Is between 18 and 29"
92
+ gen age_2=(age>=30 & age<=39)
93
+ label var age_2 "Is between 30 and 39"
94
+ gen age_3=(age>=40 & age<=49)
95
+ label var age_3 "Is between 40 and 49"
96
+ gen age_4=(age>=50 & age<=59)
97
+ label var age_4 "Is between 50 and 59"
98
+ gen age_5=(age>=60)
99
+ label var age_5 "Is 60 or above"
100
+
101
+ foreach i in 1 2 3 4 5{
102
+ label val age_`i' binary
103
+ }
104
+
105
+ * Income brackets
106
+ gen inc_bracket_1=0
107
+ label var inc_bracket_1 "Is in the first income bracket"
108
+ gen inc_bracket_2=0
109
+ label var inc_bracket_2 "Is in the second income bracket"
110
+ gen inc_bracket_3=0
111
+ label var inc_bracket_3 "Is in the third income bracket"
112
+ gen inc_bracket_4=0
113
+ label var inc_bracket_4 "Is in the last income bracket"
114
+
115
+ * US
116
+ replace inc_bracket_1=1 if household_income<4 & US==1
117
+ replace inc_bracket_2=1 if (household_income==4 | household_income==5) & US==1
118
+ replace inc_bracket_3=1 if(household_income==6 | household_income==7) & US==1
119
+ replace inc_bracket_4=1 if household_income>7 & US==1
120
+
121
+ * UK
122
+ replace inc_bracket_1=1 if income_q_UK==1 | income_q_UK==4
123
+ replace inc_bracket_2=1 if income_q_UK==5
124
+ replace inc_bracket_3=1 if income_q_UK==6
125
+ replace inc_bracket_4=1 if income_q_UK==7
126
+
127
+ * FR
128
+ replace inc_bracket_1=1 if income_q_FR==1 | income_q_FR==4
129
+ replace inc_bracket_2=1 if income_q_FR==5
130
+ replace inc_bracket_3=1 if income_q_FR==3
131
+ replace inc_bracket_4=1 if income_q_FR==2 | income_q_FR==8
132
+
133
+ * IT
134
+ replace inc_bracket_1=1 if income_q_IT==1
135
+ replace inc_bracket_2=1 if income_q_IT==4
136
+ replace inc_bracket_3=1 if income_q_IT==5
137
+ replace inc_bracket_4=1 if income_q_IT==3 | income_q_IT==2
138
+
139
+ * DE
140
+ replace inc_bracket_1=1 if income_q_DE==1 | income_q_DE==4
141
+ replace inc_bracket_2=1 if income_q_DE==5 | income_q_DE==3
142
+ replace inc_bracket_3=1 if income_q_DE==2
143
+ replace inc_bracket_4=1 if income_q_DE==8 | income_q_DE==9
144
+
145
+ *SE
146
+ replace inc_bracket_1=1 if income_q_SE==1
147
+ replace inc_bracket_2=1 if income_q_SE==5
148
+ replace inc_bracket_3=1 if income_q_SE==4
149
+ replace inc_bracket_4=1 if income_q_SE==3
150
+
151
+ foreach i in 1 2 3 4{
152
+ label val inc_bracket_`i' binary
153
+ }
154
+
155
+ * Married dummy (=0 if "other")
156
+ gen married=(marital_status==2)
157
+ label var married "Is married"
158
+ label val married binary
159
+
160
+ * Gen employed
161
+ gen employed=(employment<4)
162
+ replace employed=. if employment==.
163
+ label var employed "Is employed"
164
+ label val employed binary
165
+
166
+ * Gen unemployed
167
+ gen unemployed=(employment==4)
168
+ replace unemployed=. if employment==.
169
+ label var unemployed "Is unemployed"
170
+ label val unemployed binary
171
+
172
+
173
+
174
+ ******** Table 1: to check representativeness of the sample ******
175
+
176
+ cap mata drop A
177
+
178
+ * Gender
179
+ foreach x in US UK France Italy Germany Sweden {
180
+ su male if `x'==1
181
+ local male`x' : display %5.2f `r(mean)'
182
+ }
183
+ matrix A=(`maleUS', 0.49,`maleUK', 0.48,`maleFrance', 0.49,`maleItaly', 0.50, `maleGermany', 0.49, `maleSweden', 0.50)
184
+
185
+ * Age
186
+ foreach x in US UK France Italy Germany Sweden {
187
+ su age_1 if `x'==1
188
+ local age_1`x' : display %5.2f `r(mean)'
189
+ }
190
+ cap mata drop B
191
+ 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)
192
+ matrix A=A\B
193
+ foreach x in US UK France Italy Germany Sweden {
194
+ su age_2 if `x'==1
195
+ local age_2`x' : display %5.2f `r(mean)'
196
+ }
197
+ cap mata drop B
198
+ 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)
199
+ matrix A=A\B
200
+ foreach x in US UK France Italy Germany Sweden {
201
+ su age_3 if `x'==1
202
+ local age_3`x' : display %5.2f `r(mean)'
203
+ }
204
+ cap mata drop B
205
+ 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)
206
+ matrix A=A\B
207
+ foreach x in US UK France Italy Germany Sweden {
208
+ su age_4 if `x'==1
209
+ local age_4`x' : display %5.2f `r(mean)'
210
+ }
211
+ cap mata drop B
212
+ 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)
213
+ matrix A=A\B
214
+ foreach x in US UK France Italy Germany Sweden {
215
+ su age_5 if `x'==1
216
+ local age_5`x' : display %5.2f `r(mean)'
217
+ }
218
+ cap mata drop B
219
+ 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)
220
+ matrix A=A\B
221
+
222
+ * Income
223
+ foreach x in US UK France Italy Germany Sweden {
224
+ su inc_bracket_1 if `x'==1
225
+ local inc_bracket_1`x' : display %5.2f `r(mean)'
226
+ }
227
+ cap mata drop B
228
+ 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)
229
+ matrix A=A\B
230
+ foreach x in US UK France Italy Germany Sweden {
231
+ su inc_bracket_2 if `x'==1
232
+ local inc_bracket_2`x' : display %5.2f `r(mean)'
233
+ }
234
+ cap mata drop B
235
+ 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)
236
+ matrix A=A\B
237
+ foreach x in US UK France Italy Germany Sweden {
238
+ su inc_bracket_3 if `x'==1
239
+ local inc_bracket_3`x' : display %5.2f `r(mean)'
240
+ }
241
+ cap mata drop B
242
+ 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)
243
+ matrix A=A\B
244
+ foreach x in US UK France Italy Germany Sweden {
245
+ su inc_bracket_4 if `x'==1
246
+ local inc_bracket_4`x' : display %5.2f `r(mean)'
247
+ }
248
+ cap mata drop B
249
+ 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)
250
+ matrix A=A\B
251
+
252
+
253
+ * Married
254
+ foreach x in US UK France Italy Germany Sweden {
255
+ su married if `x'==1
256
+ local married`x' : display %5.2f `r(mean)'
257
+ }
258
+ cap mata drop B
259
+ matrix B=(`marriedUS', 0.49,`marriedUK', 0.41,`marriedFrance', 0.46,`marriedItaly', 0.46, `marriedGermany', 0.46, `marriedSweden', 0.33)
260
+ matrix A=A\B
261
+
262
+
263
+ * Employed
264
+ foreach x in US UK France Italy Germany Sweden {
265
+ su employed if `x'==1
266
+ local employed`x' : display %5.2f `r(mean)'
267
+ }
268
+ cap mata drop B
269
+ matrix B=(`employedUS', 0.70,`employedUK', 0.74,`employedFrance', 0.65,`employedItaly', 0.57, `employedGermany', 0.75, `employedSweden', 0.77)
270
+ matrix A=A\B
271
+
272
+ * Unemployed
273
+ foreach x in US UK France Italy Germany Sweden {
274
+ su unemployed if `x'==1
275
+ local unemployed`x' : display %5.2f `r(mean)'
276
+ }
277
+ cap mata drop B
278
+ matrix B=(`unemployedUS', 0.05,`unemployedUK', 0.05,`unemployedFrance', 0.09,`unemployedItaly', 0.11, `unemployedGermany', 0.04,`unemployedSweden', 0.05)
279
+ matrix A=A\B
280
+
281
+ * University degree
282
+ foreach x in US UK France Italy Germany Sweden {
283
+ su university_degree if `x'==1
284
+ local university`x' : display %5.2f `r(mean)'
285
+ }
286
+ cap mata drop B
287
+ matrix B=(`universityUS', 0.41,`universityUK', 0.36,`universityFrance', 0.31,`universityItaly', 0.16, `universityGermany', 0.25, `universitySweden', 0.36)
288
+ matrix A=A\B
289
+
290
+ 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
291
+
292
+ frmttable using "$outdir/summary_stats_sample_by_country_final.tex", statmat(A) tex fragment replace ///
293
+ 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)") ///
294
+ 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) ///
295
+ multicol(1,2,2;1,4,2;1,6,2;1,8,2;1,10,2;1,12,2) hlines(110100000000000001) noce
37/replication_package/Do/Tables/Tab2_3.do ADDED
@@ -0,0 +1,516 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **********
2
+ * Immigration and Redistribution
3
+ * Alesina, Miano, Stantcheva
4
+ * RESTUD
5
+
6
+ * Tables 2 and 3
7
+ * The command appendfile should be installed before running this dofile. Type "ssc install appendfile".
8
+ **********
9
+
10
+ clear all
11
+
12
+ * Specify directory of the replication package
13
+ global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"
14
+ cd "$dir"
15
+
16
+ * Declare output sub-directory
17
+ global outdir "Out/Tables"
18
+
19
+ * Load survey + local data
20
+ use "Data/survey_analysis.dta", clear
21
+
22
+ * Countries included in the analysis
23
+ global countries US IT FR DE SE UK
24
+
25
+ * Generate flags - To ensure answers quality
26
+ gen flag_1=0
27
+ gen flag_2=0
28
+
29
+ bysort country treatment_recod: egen min_duration = pctile(duration), p(2)
30
+ bysort country treatment_recod: egen max_duration = pctile(duration), p(98)
31
+
32
+ replace flag_1=1 if duration<min_duration
33
+ replace flag_2=1 if duration>max_duration
34
+
35
+
36
+ * Drop respondents that have spent too little or too much time (top/bottom 2%)
37
+ keep if flag_1==0 & flag_2==0
38
+
39
+ *Drop variables that were used to exclude innatentive respondents
40
+ drop flag_1 flag_2 min_duration max_duration
41
+
42
+ * Add data on actual immigrants and non-immigrants statistics and generate misperceptions *
43
+ do "Do/misperceptions.do"
44
+
45
+ *** Keep only control group ***
46
+ keep if control==1
47
+
48
+
49
+ ****************
50
+ * Gen controls *
51
+ ****************
52
+
53
+
54
+ * Gen Left-Right variables *
55
+
56
+ * Based on vote or voting intensions
57
+ gen left=(party_voted==4 | party_voted==5)
58
+ replace left=. if party_voted==. | party_voted==6 | party_voted==0
59
+ gen right=(party_voted==1 | party_voted==2)
60
+ replace right=. if party_voted==. | party_voted==6 | party_voted==0
61
+ gen center=(party_voted==3)
62
+ replace center=. if party_voted==. | party_voted==6 | party_voted==0
63
+
64
+ label var left "Left-wing"
65
+ label var right "Right-wing"
66
+ label var center "Center"
67
+
68
+ foreach i in left right center{
69
+ label val `i' binary
70
+ }
71
+
72
+
73
+ * Gen controls *
74
+
75
+ * Young
76
+ gen young=(age<45)
77
+ label var young "Age 18-45"
78
+ label val young binary
79
+
80
+ * Gender
81
+ gen female=(sex==2)
82
+ label var female "Female"
83
+ label val female binary
84
+
85
+ * Immigrant parent
86
+ gen immigrant_parent=(q_parent_same==2)
87
+ replace immigrant_parent=. if q_parent_same==.
88
+ label var immigrant_parent "Immigrant parent"
89
+ label val immigrant_parent binary
90
+
91
+ * Top income
92
+ gen top_income=0
93
+ foreach x in $countries{
94
+ su household_income if country=="`x'", d
95
+ replace top_income=1 if household_income>r(p75) & country=="`x'"
96
+ }
97
+ label var top_income "High Income"
98
+ label val top_income binary
99
+
100
+ * Gen variables for HI sectors, with college/no college
101
+ gen sector_dummy_h=sector_dummy*university_degree
102
+ gen sector_dummy_l=sector_dummy*(1-university_degree)
103
+
104
+ label var sector_dummy_h "H. Imm. Sect. College"
105
+ label var sector_dummy_l "H. Imm. Sect. No College"
106
+ label val sector_dummy_h binary
107
+ label val sector_dummy_l binary
108
+
109
+ * Gen additional variables entering the indices
110
+
111
+ * 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)
112
+ gen moh_more=(Moh_transfers<3 & Moh_tax>2)
113
+ replace moh_more=1 if Moh_transfers==3 & Moh_tax>3
114
+ replace moh_more=. if Moh_tax==. | Moh_transfers==.
115
+ la var moh_more "Mohammad receives more transfers and/or pay less taxes than John"
116
+ label val moh_more binary
117
+
118
+ * Transfers
119
+ gen imm_tra_more=(transfers_imm==10 | transfers_imm==11 |transfers_imm==12 |transfers_imm==13)
120
+ la var imm_tra_more "Immigrants receive more transfers"
121
+ replace imm_tra_more=. if transfers_imm==.
122
+ label val imm_tra_more binary
123
+
124
+ *******
125
+ * Declare controls to be included in regressions *
126
+ global controls_index right female young immigrant_parent university_degree top_income sector_dummy_l sector_dummy_h
127
+
128
+ **********
129
+
130
+ *** Gen indices ***
131
+ * Cultural distance, Economic circumstances, Free riding *
132
+ foreach var in mis_share_foreign mis_share_LA mis_share_AS mis_share_AF mis_share_E mis_share_NA ///
133
+ mis_unemp_imm_nn mis_loweduc_imm_nn mis_higheduc_imm_nn effort_poor moh_more imm_tra_more{
134
+
135
+ reg `var' $controls_index
136
+ su `var' if e(sample)==1
137
+ local `var'mc: display %5.3f `r(mean)'
138
+ su `var' if e(sample)==1
139
+ local `var'sdc: display %5.3f `r(sd)'
140
+ gen `var'_ind=(`var'-``var'mc')/``var'sdc'
141
+ 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
142
+ }
143
+
144
+
145
+ gen culture_index = (mis_share_LA_ind + mis_share_AS_ind + mis_share_AF_ind - mis_share_E_ind - mis_share_NA_ind)/5
146
+
147
+ gen econ_index = (mis_unemp_imm_nn_ind + mis_loweduc_imm_nn_ind - mis_higheduc_imm_nn_ind)/3
148
+
149
+ gen free_riding_index = (effort_poor_ind + moh_more_ind + imm_tra_more_ind)/3
150
+
151
+ foreach var in mis_share_foreign mis_share_LA mis_share_AS mis_share_AF mis_share_E mis_share_NA ///
152
+ mis_unemp_imm_nn mis_higheduc_imm_nn effort_poor moh_more imm_tra_more mis_loweduc_imm_nn {
153
+
154
+ drop `var'_ind
155
+
156
+ }
157
+
158
+
159
+
160
+ label var culture_index "Perceived cultural distance index"
161
+ label var econ_index "Perceived economic weakness index"
162
+ label var free_riding_index "Perceived free-riding index"
163
+
164
+
165
+ ******
166
+ * Gen actual local cultural distance index and other indices *
167
+ 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{
168
+
169
+ su `var'
170
+ local `var'mc: display %5.3f `r(mean)'
171
+ su `var'
172
+ local `var'sdc: display %5.3f `r(sd)'
173
+ gen `var'_ind=(`var'-``var'mc')/``var'sdc'
174
+ replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==.
175
+ }
176
+
177
+ 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
178
+
179
+ gen econ_index_act = (loweduc_imm_lc_ind -college_imm_lc_ind +unemp_imm_lc_ind)/3
180
+
181
+ 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
182
+
183
+ label var culture_index_act "Actual local cultural distance index"
184
+ label var econ_index_act "Actual local economic circumstances index"
185
+
186
+ * Standardize indices *
187
+ foreach var in culture_index econ_index free_riding_index culture_index_act econ_index_act{
188
+ reg `var' $controls_index
189
+ su `var' if e(sample)==1
190
+ local `var'mc: display %5.3f `r(mean)'
191
+ local `var'sdc: display %5.3f `r(sd)'
192
+ replace `var'=(`var'-``var'mc')/``var'sdc'
193
+ }
194
+
195
+
196
+ **********************************************************
197
+ *** Table 2: Perception vs. Actual Indices
198
+ **********************************************************
199
+
200
+ * Regressions *
201
+
202
+ global table_name "$outdir/table_local_indices"
203
+
204
+ * Table start
205
+ file open holder using $table_name.tex, write replace text
206
+ file write holder "\begin{tabular}{lcccc} " _n
207
+ file write holder "\\ \\ & All & Perc. Cultural Distance & Perc. Econ. Weakness & Perc. Free Riding \\" _n
208
+ file write holder "& Immigrants (misp.) & Index & Index & Index \\" _n
209
+ file write holder "& (1) & (2) & (3) & (4) \\ \hline" _n
210
+ file close holder
211
+ * Table end
212
+ file open holder using temp_end.tex, write replace text
213
+ file write holder "\hline \end{tabular}" _n
214
+ file close holder
215
+
216
+
217
+
218
+ eststo clear
219
+ foreach var in mis_share_foreign{
220
+ eststo: xi: reg `var' share_foreign_lc $controls_index i.country, robust
221
+ su `var' if e(sample)==1
222
+ local `var'mc: display %5.2f `r(mean)'
223
+ }
224
+
225
+ foreach var in culture_index{
226
+ eststo: xi: reg `var' culture_index_act $controls_index i.country, robust
227
+ su `var' if e(sample)==1
228
+ local `var'mc: display %5.2f abs(`r(mean)') // Abs is used to correct stata's rounding error
229
+ }
230
+
231
+ foreach var in econ_index{
232
+ eststo: xi: reg `var' econ_index_act $controls_index i.country, robust
233
+ su `var' if e(sample)==1
234
+ local `var'mc: display %5.2f abs(`r(mean)')
235
+ }
236
+
237
+ foreach var in free_riding_index{
238
+ eststo: xi: reg `var' $controls_index i.country, robust
239
+ su `var' if e(sample)==1
240
+ local `var'mc: display %5.2f abs(`r(mean)')
241
+ }
242
+
243
+
244
+ 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 ///
245
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
246
+
247
+
248
+ * Table middle
249
+ file open holder using temp_mid1.tex, write replace text
250
+ file write holder "Control mean & `mis_share_foreignmc' & `culture_indexmc' & `econ_indexmc' & `free_riding_indexmc' \\" _n
251
+ file close holder
252
+
253
+
254
+ appendfile temp1.tex $table_name.tex
255
+ appendfile temp_mid1.tex $table_name.tex
256
+ appendfile temp_end.tex $table_name.tex
257
+
258
+
259
+ erase temp1.tex
260
+ erase temp_end.tex
261
+ erase temp_mid1.tex
262
+
263
+
264
+ *******************************************
265
+ * Table 3: Correlation matrix
266
+ *******************************************
267
+
268
+ global controls right female young immigrant_parent university_degree top_income sector_dummy_l sector_dummy_h
269
+
270
+ 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
271
+
272
+ 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
273
+
274
+ preserve
275
+
276
+ * Perceptions
277
+ gen perc1 = perc_share_foreign
278
+ gen perc2 = perc_share_LA
279
+ gen perc3 = perc_share_AF
280
+ gen perc4 = perc_share_AS
281
+ gen perc5 = perc_share_E
282
+ gen perc6 = perc_unemp_imm
283
+ gen perc7 = perc_loweduc_imm
284
+ gen perc8 = perc_higheduc_imm
285
+
286
+ * National only
287
+ gen perc9 = perc_poverty_imm
288
+ gen perc10 = perc_share_mu
289
+
290
+
291
+ * Actual local
292
+ gen act_l1 = share_foreign_lc
293
+ gen act_l2 = share_LatinAmerica_lc
294
+ gen act_l3 = share_Africa_lc
295
+ gen act_l4 = share_Asia_lc
296
+ gen act_l5 = share_Europe_lc
297
+ gen act_l6 = unemp_imm_lc
298
+ gen act_l7 = loweduc_imm_lc
299
+ gen act_l8 = college_imm_lc
300
+
301
+ gen act_natl6 = unemp_nat_lc
302
+ gen act_natl7 = loweduc_nat_lc
303
+ gen act_natl8 = college_nat_lc
304
+ gen act_natl9 = poor_lc
305
+
306
+ gen act_diffl6 = unemp_imm_lc - unemp_nat_lc
307
+ gen act_diffl7 = loweduc_imm_lc - loweduc_nat_lc
308
+ gen act_diffl8 = college_imm_lc - college_nat_lc
309
+
310
+ * Actual national
311
+ gen act_n1 = share_foreign
312
+ gen act_n2 = share_LA
313
+ gen act_n3 = share_NAF + share_SA
314
+ gen act_n4 = share_ME + share_A
315
+ gen act_n5 = share_WE + share_EE
316
+ gen act_n6 = unemp_imm
317
+ gen act_n7 = loweduc_imm
318
+ gen act_n8 = higheduc_imm
319
+
320
+ gen act_n9 = poverty_imm
321
+ gen act_n10 = share_muslim
322
+
323
+ gen act_natn6 = unemp_nat
324
+ gen act_natn7 = loweduc_nat
325
+ gen act_natn8 = higheduc_nat
326
+ gen act_natn9 = poverty_nat
327
+
328
+ gen act_diffn6 = unemp_imm - unemp_nat
329
+ gen act_diffn7 = loweduc_imm - loweduc_nat
330
+ gen act_diffn8 = higheduc_imm - higheduc_nat
331
+ gen act_diffn9 = poverty_imm - poverty_nat
332
+
333
+
334
+ * Natives
335
+
336
+ * Perceptions
337
+ gen percn1 = perc_unemp_nat
338
+ gen percn2 = perc_loweduc_nat
339
+ gen percn3 = perc_higheduc_nat
340
+ gen percn4 = perc_poverty_nat
341
+
342
+ * Actual local
343
+ gen actn_l1 = unemp_nat_lc
344
+ gen actn_l2 = loweduc_nat_lc
345
+ gen actn_l3 = college_nat_lc
346
+ gen actn_l4 = poor_lc
347
+
348
+ * Actual national
349
+ gen actn_n1 = unemp_nat
350
+ gen actn_n2 = loweduc_nat
351
+ gen actn_n3 = higheduc_nat
352
+ gen actn_n4 = poverty_nat
353
+
354
+
355
+
356
+ * Regressions *
357
+ global table_name "$outdir/corr_matrix"
358
+
359
+ * Table start
360
+ file open holder using $table_name.tex, write replace text
361
+ file write holder "\begin{tabular}{lcccccccccc} " _n
362
+ file write holder "& \multicolumn{8}{l}{\textbf{Panel A: Correlation of Perceived Immigrants Characteristics with Actual Immigrants Characteristics}} \\" _n
363
+ file write holder "& Share of & Imm. from Latin & Imm. from & Imm. from & Imm. from & Unemployment & No High & College-educated & Poverty & Muslim \\" _n
364
+ file write holder "& Immigrants & America & Africa & Asia & Europe & Imm. & School Imm. & Imm. & Imm. & Imm. \\" _n
365
+ file write holder "& (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) \\ \hline" _n
366
+ file close holder
367
+ * Table end
368
+ file open holder using temp_end.tex, write replace text
369
+ file write holder "\hline \end{tabular}" _n
370
+ file close holder
371
+
372
+ * Local
373
+ gen act_l=.
374
+ label var act_l "Local correlation"
375
+
376
+ eststo clear
377
+ forval i=1(1)8 {
378
+ replace act_l=act_l`i'
379
+ eststo: xi: reg perc`i' act_l $controls i.country, robust
380
+ }
381
+ esttab using temp_1.tex, replace fragment booktabs keep(act_l) noconst noobs label ///
382
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
383
+
384
+ * National
385
+ gen act_n=.
386
+ label var act_n "National correlation"
387
+
388
+ eststo clear
389
+ forval i=1(1)10 {
390
+ replace act_n=act_n`i'
391
+ eststo: xi: reg perc`i' act_n $controls, robust
392
+ }
393
+ esttab using temp_2.tex, replace fragment booktabs keep(act_n) noconst noobs label ///
394
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
395
+
396
+ * Table middle
397
+ file open holder using temp_mid1.tex, write replace text
398
+ file write holder "\\ & \multicolumn{10}{l}{\textbf{Panel B: Correlation of Perceived Immigrants Characteristics with Actual Non-immigrants Characteristics}} \\" _n
399
+ file write holder "& Unemployment & No High & College-educated & Poverty \\" _n
400
+ file write holder "& Imm. & School Imm. & Imm. & Imm. \\" _n
401
+ file write holder "& (1) & (2) & (3) & (4) \\ \hline" _n
402
+ file close holder
403
+
404
+ * Natives - Local
405
+ gen act_natl=.
406
+ label var act_natl "Local correlation"
407
+ eststo clear
408
+ forval i=6(1)9 {
409
+ replace act_natl=act_natl`i'
410
+ eststo: xi: reg perc`i' act_natl $controls i.country, robust
411
+ }
412
+ esttab using temp_3.tex, replace fragment booktabs keep(act_natl) noconst noobs label ///
413
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
414
+
415
+
416
+ * Natives - National
417
+ gen act_natn=.
418
+ label var act_natn "National correlation"
419
+ eststo clear
420
+ forval i=6(1)9 {
421
+ replace act_natn=act_natn`i'
422
+ eststo: xi: reg perc`i' act_natn $controls, robust
423
+ }
424
+ esttab using temp_4.tex, replace fragment booktabs keep(act_natn) noconst noobs label ///
425
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
426
+
427
+ * Table middle
428
+ file open holder using temp_mid2.tex, write replace text
429
+ file write holder "\\ & \multicolumn{10}{l}{\textbf{Panel C: Correlation of Perceived Immigrants Characteristics with Actual Immigrants - Non-immigrants Differences}} \\" _n
430
+ file write holder "& Unemployment & No High & College-educated & Poverty \\" _n
431
+ file write holder "& Imm. & School Imm. & Imm. & Imm. \\" _n
432
+ file write holder "& (1) & (2) & (3) & (4) \\ \hline" _n
433
+ file close holder
434
+
435
+ * Imm-Natives diff - Local
436
+ gen act_diffl=.
437
+ label var act_diffl "Local correlation"
438
+ eststo clear
439
+ forval i=6(1)8 {
440
+ replace act_diffl=act_diffl`i'
441
+ eststo: xi: reg perc`i' act_diffl $controls i.country, robust
442
+ }
443
+ esttab using temp_5.tex, replace fragment booktabs keep(act_diffl) noconst noobs label ///
444
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
445
+
446
+
447
+ * Imm-Natives diff - National
448
+ gen act_diffn=.
449
+ label var act_diffn "National correlation"
450
+ eststo clear
451
+ forval i=6(1)9 {
452
+ replace act_diffn=act_diffn`i'
453
+ eststo: xi: reg perc`i' act_diffn $controls, robust
454
+ }
455
+ esttab using temp_6.tex, replace fragment booktabs keep(act_diffn) noconst noobs label ///
456
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
457
+
458
+
459
+ ** Natives **
460
+
461
+ * Table middle
462
+ file open holder using temp_mid3.tex, write replace text
463
+ file write holder "\\ & \multicolumn{10}{l}{\textbf{Panel D: Correlation of Perceived Non-immigrants Characteristics with Actual Non-immigrants Characteristics}} \\" _n
464
+ file write holder "& Unemployment & No High & College-educated & Poverty \\" _n
465
+ file write holder "& Nat. & School Nat. & Nat. & Nat. \\" _n
466
+ file write holder "& (1) & (2) & (3) & (4) \\ \hline" _n
467
+ file close holder
468
+
469
+ * Local
470
+ gen actn_l=.
471
+ label var actn_l "Local correlation"
472
+
473
+ eststo clear
474
+ forval i=1(1)4 {
475
+ replace actn_l=actn_l`i'
476
+ eststo: xi: reg percn`i' actn_l $controls i.country, robust
477
+ }
478
+ esttab using temp_7.tex, replace fragment booktabs keep(actn_l) noconst noobs label ///
479
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
480
+
481
+ * National
482
+ gen actn_n=.
483
+ label var actn_n "National correlation"
484
+
485
+ eststo clear
486
+ forval i=1(1)4 {
487
+ replace actn_n=actn_n`i'
488
+ eststo: xi: reg percn`i' actn_n $controls, robust
489
+ }
490
+ esttab using temp_8.tex, replace fragment booktabs keep(actn_n) noconst noobs label ///
491
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
492
+
493
+
494
+ appendfile temp_1.tex $table_name.tex
495
+ appendfile temp_2.tex $table_name.tex
496
+ appendfile temp_mid1.tex $table_name.tex
497
+ appendfile temp_3.tex $table_name.tex
498
+ appendfile temp_4.tex $table_name.tex
499
+ appendfile temp_mid2.tex $table_name.tex
500
+ appendfile temp_5.tex $table_name.tex
501
+ appendfile temp_6.tex $table_name.tex
502
+ appendfile temp_mid3.tex $table_name.tex
503
+ appendfile temp_7.tex $table_name.tex
504
+ appendfile temp_8.tex $table_name.tex
505
+ appendfile temp_end.tex $table_name.tex
506
+
507
+
508
+ forval i=1(1)8{
509
+ erase temp_`i'.tex
510
+ }
511
+ erase temp_mid1.tex
512
+ erase temp_mid2.tex
513
+ erase temp_mid3.tex
514
+ erase temp_end.tex
515
+
516
+ restore
37/replication_package/Do/Tables/Tab4to6.do ADDED
@@ -0,0 +1,397 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **********
2
+ * Immigration and Redistribution
3
+ * Alesina, Miano, Stantcheva
4
+ * RESTUD
5
+
6
+ * Tables 4, 5 and 6
7
+ * You should install winsor2 and appendfile before running this dofile. Type "ssc install winsor2" and "ssc install appendfile".
8
+ **********
9
+
10
+ clear all
11
+
12
+ * Specify directory of the replication package
13
+ global dir "/Users/armandomiano/Dropbox/AMS_Redistribution/Data/Survey_Data/Replication RESTUD sharing"
14
+ cd "$dir"
15
+
16
+ * Declare output sub-directory
17
+ global outdir "Out/Tables"
18
+
19
+ * Load survey data
20
+ use "Data/survey_analysis.dta", clear
21
+
22
+ * Countries included in the analysis
23
+ global countries "US UK DE FR IT SE"
24
+
25
+ * Generate flags - To ensure answers quality
26
+ global videos t1 t2 t3
27
+
28
+ gen flag_1=0
29
+ gen flag_2=0
30
+
31
+ bysort country treatment_recod: egen min_duration = pctile(duration), p(2)
32
+ bysort country treatment_recod: egen max_duration = pctile(duration), p(98)
33
+
34
+ replace flag_1=1 if duration<min_duration
35
+ replace flag_2=1 if duration>max_duration
36
+
37
+
38
+ * Time spent on each video
39
+
40
+ * Gen time (in seconds) spent on each video treatment - based on page submit
41
+ foreach q in $videos{
42
+
43
+ bysort country: egen max_time_`q'= pctile(time_`q'), p(98)
44
+ }
45
+
46
+ foreach q in $videos{
47
+
48
+ gen flag_time_max_`q'=(time_`q'> max_time_`q')
49
+ replace flag_time_max_`q'=. if time_`q'==.
50
+
51
+ }
52
+
53
+ * Drop respondents that have spent too little or too much time (bottom/top 2%)
54
+ keep if flag_1==0 & flag_2==0
55
+
56
+
57
+ * Drop respondents who have spent too much time on the videos (top 2%)
58
+ foreach q in $videos{
59
+
60
+ drop if flag_time_max_`q'==1
61
+
62
+ }
63
+
64
+ * Drop the variables used to exclude inattentive respondents
65
+ 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
66
+
67
+
68
+ * Add data on actual immigrants statistics and generate misperceptions *
69
+ do "Do/misperceptions.do"
70
+
71
+ * Share of all immigrants for the US (legal and undocumented)
72
+ replace share_foreign=13.5 if country=="US"
73
+
74
+ * Redefing misperception share of all immigrants for the US, to keep into account above correction
75
+ replace mis_share_foreign=perc_share_foreign-share_foreign if country=="US"
76
+
77
+ ****** Gen dummy for (almost) accurate perception of immigration
78
+
79
+ gen accurate_share_foreign=0
80
+ replace accurate_share_foreign=1 if mis_share_foreign>-1 & mis_share_foreign<1
81
+ replace accurate_share_foreign=. if mis_share_foreign==.
82
+ label var accurate_share_foreign "Accurate perception of the share of immigrants"
83
+ label val accurate_share_foreign binary
84
+
85
+ * Gen additional outcome variables
86
+
87
+ * Immigration is not a problem
88
+ gen imm_not_problem=(q_imm_problem==16 | q_imm_problem==17)
89
+ replace imm_not_problem=. if q_imm_problem==.
90
+ la var imm_not_problem "Immigration is not a problem"
91
+ label val imm_not_problem binary
92
+
93
+ * When should immigrants be entitled to get benefits?
94
+ gen imm_benefits_soon=(q_imm_benefits==1 | q_imm_benefits==2 | q_imm_benefits==4)
95
+ replace imm_benefits_soon=. if q_imm_benefits==.
96
+ la var imm_benefits_soon "Immigrants should get benefits in less than 3 years"
97
+ label val imm_benefits_soon binary
98
+
99
+ * When should immigrants be allowed to apply for citizenship?
100
+ gen imm_citizenship_soon=(q_imm_citizenship==1 | q_imm_citizenship==2)
101
+ replace imm_citizenship_soon=. if q_imm_citizenship==.
102
+ la var imm_citizenship_soon "Immigrants should get citizenship in 2 or 5 years"
103
+ label val imm_citizenship_soon binary
104
+
105
+ * When would you consider an immigrant "Truly American"?
106
+ gen trully_american_cit=(q_imm_american==7 | q_imm_american==1 | q_imm_american==4)
107
+ replace trully_american_cit=. if q_imm_american==.
108
+ la var trully_american_cit "Consider American at citizenship or sooner"
109
+ label val trully_american_cit binary
110
+
111
+ *Budget allocation
112
+ winsor2 budget_safetynet budget_health budget_education, s(_w) c(5 95) by(country)
113
+ la var budget_safetynet_w "% of the budget assigned to Income Support Program (winsorized)"
114
+ la var budget_health_w "% of the budget assigned to Public Spending on Health (winsorized)"
115
+ la var budget_education_w "% of the budget assigned to Spending on Schooling (winsorized)"
116
+
117
+ gen budget_social_w = budget_health_w + budget_safetynet_w
118
+ la var budget_social_w "% of the budget assigned to Income Support Program and Health (winsorized)"
119
+
120
+ * Inequality is a serious problem
121
+ gen ineq_problem_ser=(q_inequality_problem==4 | q_inequality_problem==5)
122
+ replace ineq_problem_ser=. if q_inequality_problem==.
123
+ la var ineq_problem_ser "Inequality is a serious problem"
124
+ label val ineq_problem_ser binary
125
+
126
+ * Total donation above 50th percentile within country
127
+ gen total_donation_d=0
128
+ foreach x in $countries {
129
+ su total_donation if country=="`x'", d
130
+ replace total_donation_d=1 if total_donation>r(p50) & country=="`x'"
131
+ }
132
+ replace total_donation_d=. if total_donation==.
133
+
134
+ la var total_donation_d "Donated more than the median of the country of reference"
135
+ label val total_donation_d binary
136
+
137
+
138
+ ****************
139
+ * Gen controls *
140
+ ****************
141
+
142
+ * Gen Left-right variables, based on vote or voting intentions *
143
+ gen left=(party_voted==4 | party_voted==5)
144
+ replace left=. if party_voted==. | party_voted==6 | party_voted==0
145
+ gen right=(party_voted==1 | party_voted==2)
146
+ replace right=. if party_voted==. | party_voted==6 | party_voted==0
147
+ gen center=(party_voted==3)
148
+ replace center=. if party_voted==. | party_voted==6 | party_voted==0
149
+
150
+ label var left "Left-wing"
151
+ label var right "Right-wing"
152
+ label var center "Center"
153
+
154
+ foreach i in left right center{
155
+ label val `i' binary
156
+ }
157
+
158
+ *Young
159
+ gen young=(age<45)
160
+ label var young "Is less than 45"
161
+ label val young binary
162
+
163
+ * Gender
164
+ gen male=(sex==1)
165
+ label var male "Male"
166
+ label val male binary
167
+
168
+ * Children dummy
169
+ gen children=(number_children>1)
170
+ replace children=. if number_children==.
171
+ label var children "Has children"
172
+ label val children binary
173
+
174
+ * Immigrant parent
175
+ gen immigrant_parent=(q_parent_same==2)
176
+ replace immigrant_parent=. if q_parent_same==.
177
+ label var immigrant_parent "At least one of the parents is an immigrant"
178
+ label val immigrant_parent binary
179
+
180
+ * Top income
181
+ gen top_income=0
182
+ foreach x in $countries{
183
+ su household_income if country=="`x'", d
184
+ replace top_income=1 if household_income>r(p75) & country=="`x'"
185
+ }
186
+ label var top_income "High Income"
187
+ label val top_income binary
188
+
189
+ * Immigration block first
190
+ label var immigfirst "Order/Salience T"
191
+
192
+ * Gen interacted treatments
193
+ gen treatment1_if = treatment1*immigfirst
194
+ gen treatment2_if = treatment2*immigfirst
195
+ gen treatment3_if = treatment3*immigfirst
196
+ label var treatment1_if "Share of Immigrants Treatment and saw first the Immigration Block"
197
+ label var treatment2_if "Origin of Immigrants Treatment and saw first the Immigration Block"
198
+ label var treatment3_if "Hard Work Treatment and saw first the Immigration Block"
199
+
200
+ foreach i in 1 2 3{
201
+ label val treatment`i'_if binary
202
+ }
203
+
204
+
205
+ ********************************************
206
+ * Declare variables to be used as controls *
207
+ ********************************************
208
+
209
+
210
+ global controls right left male young immigrant_parent children university_degree top_income sector_dummy
211
+
212
+
213
+ *******************************************************
214
+ * Declare variables to be included in the regressions *
215
+ *******************************************************
216
+
217
+ global treatments_int treatment1 treatment2 treatment3 treatment1_if treatment2_if treatment3_if
218
+
219
+ global treatments treatment1 treatment2 treatment3
220
+
221
+ global X $treatments $controls i.country
222
+
223
+ global X_int immigfirst $treatments_int $controls i.country
224
+
225
+
226
+ ****************
227
+ *** TABLE 4: Second Stage - Support for Redistribution & Order treatment ***
228
+ ****************
229
+
230
+ global table_name "$outdir/table_2stage_redistribution"
231
+
232
+ ****************
233
+
234
+ * Table start
235
+ file open holder using $table_name.tex, write replace text
236
+ file write holder "\begin{tabular}{lcccccc} " _n
237
+ file write holder "& Tax & Tax & Social & Education & Inequality & Donation \\" _n
238
+ file write holder "& Top 1 & Bottom 50 & Budget & Budget & Serious Problem & Above Median \\" _n
239
+ file write holder "& (1) & (2) & (3) & (4) & (5) & (6) \\ \hline" _n
240
+ file close holder
241
+ * Table end
242
+ file open holder using temp_end.tex, write replace text
243
+ file write holder "\hline \end{tabular}" _n
244
+ file close holder
245
+
246
+
247
+ eststo clear
248
+
249
+ foreach var in tax_top1 tax_bottom50 budget_social_w budget_education_w ineq_problem_ser total_donation_d{
250
+ eststo: xi: reg `var' $X_int, robust
251
+ su `var' if e(sample)==1 & control==1 & immigfirst==0
252
+ local `var'mc: display %5.2f `r(mean)'
253
+ }
254
+ esttab using temp_all_2.tex, replace fragment booktabs keep(immigfirst $treatments) order(immigfirst $treatments) noconst label ///
255
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
256
+
257
+ * Table middle
258
+ file open holder using temp_mid3.tex, write replace text
259
+ file write holder "Control mean & `tax_top1mc' & `tax_bottom50mc' & `budget_social_wmc' & `budget_education_wmc' & `ineq_problem_sermc' & `total_donation_dmc' \\" _n
260
+ file close holder
261
+
262
+
263
+ appendfile temp_all_2.tex $table_name.tex
264
+ appendfile temp_mid3.tex $table_name.tex
265
+ appendfile temp_end.tex $table_name.tex
266
+
267
+
268
+
269
+ erase temp_all_2.tex
270
+ erase temp_mid3.tex
271
+ erase temp_end.tex
272
+
273
+
274
+ *****************
275
+ *** TABLE 5: First Stage ***
276
+ *****************
277
+
278
+ global table_name "$outdir/table_1stage"
279
+
280
+ * Table start
281
+ file open holder using $table_name.tex, write replace text
282
+ file write holder "\begin{tabular}{lccccccc} " _n
283
+ file write holder "& All & Accurate Perception & M. East and & N. America, W. and & Muslim & Christian & Lack of Effort \\" _n
284
+ file write holder "& Immigrants & All Immigrants & N. Africa & E. Europe & & & Reason Poor \\" _n
285
+ file write holder "& (misp.) & & (misp.) & (misp.) & (misp.) & (misp.) & \\" _n
286
+ file write holder "& (1) & (2) & (3) & (4) & (5) & (6) & (7) \\ \hline" _n
287
+ file close holder
288
+ * Table end
289
+ file open holder using temp_end.tex, write replace text
290
+ file write holder "\hline \end{tabular}" _n
291
+ file close holder
292
+
293
+
294
+ eststo clear
295
+ 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{
296
+ eststo: xi: reg `var' $X, robust
297
+ su `var' if e(sample)==1 & control==1
298
+ local `var'mc: display %5.2f `r(mean)'
299
+ }
300
+ esttab using temp_all.tex, replace fragment booktabs keep($treatments) noconst label ///
301
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
302
+
303
+ * Table middle
304
+ file open holder using temp_mid1.tex, write replace text
305
+ 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
306
+ file close holder
307
+
308
+
309
+ appendfile temp_all.tex $table_name.tex
310
+ appendfile temp_mid1.tex $table_name.tex
311
+ appendfile temp_end.tex $table_name.tex
312
+
313
+
314
+ erase temp_all.tex
315
+ erase temp_end.tex
316
+ erase temp_mid1.tex
317
+
318
+
319
+ ********
320
+ * Table 6: Second Stage - Support for Immigration
321
+ *********
322
+
323
+ global table_name "$outdir/table_2stage_immigration"
324
+
325
+
326
+ *** Gen Immigration support index
327
+
328
+ foreach var in imm_not_problem imm_benefits_soon imm_citizenship_soon ///
329
+ trully_american_cit q_govt_imm {
330
+ xi: reg `var' $X
331
+ su `var' if e(sample)==1 & control==1
332
+ local `var'mc: display %5.3f `r(mean)'
333
+ su `var' if e(sample)==1 & control==1
334
+ local `var'sdc: display %5.3f `r(sd)'
335
+ su `var' if e(sample)==1 & treatment1==1
336
+ local `var'mt1: display %5.3f `r(mean)'
337
+ su `var' if e(sample)==1 & treatment2==1
338
+ local `var'mt2: display %5.3f `r(mean)'
339
+ su `var' if e(sample)==1 & treatment3==1
340
+ local `var'mt3: display %5.3f `r(mean)'
341
+ gen `var'_ind=(`var'-``var'mc')/``var'sdc'
342
+ replace `var'_ind=(``var'mc'-``var'mc')/``var'sdc' if `var'==. & control==1
343
+ replace `var'_ind=(``var'mt1'-``var'mc')/``var'sdc' if `var'==. & treatment1==1
344
+ replace `var'_ind=(``var'mt2'-``var'mc')/``var'sdc' if `var'==. & treatment2==1
345
+ replace `var'_ind=(``var'mt3'-``var'mc')/``var'sdc' if `var'==. & treatment3==1
346
+ }
347
+
348
+ gen index_imm_support=(imm_benefits_soon_ind + imm_citizenship_soon_ind ///
349
+ +trully_american_cit_ind + q_govt_imm_ind +imm_not_problem_ind)/5
350
+
351
+
352
+ drop imm_not_problem_ind imm_benefits_soon_ind imm_citizenship_soon_ind ///
353
+ trully_american_cit_ind q_govt_imm_ind
354
+
355
+ * Standardize resulting index
356
+ xi: reg index_imm_support $X
357
+ su index_imm_support if e(sample)==1 & control==1
358
+ local index_imm_supportmc: display %5.3f `r(mean)'
359
+ local index_imm_supportsdc: display %5.3f `r(sd)'
360
+ replace index_imm_support = (index_imm_support - `index_imm_supportmc')/`index_imm_supportsdc'
361
+
362
+ * Table start
363
+ file open holder using $table_name.tex, write replace text
364
+ file write holder "\begin{tabular}{lcccccc} " _n
365
+ file write holder "& Imm. Not & Imm. Benefits & Imm. Citizenship & American & Govt. Should care & Imm Support \\" _n
366
+ file write holder "& A Problem & Soon & Soon & Upon Citizenship/Before & About Everyone & Index \\" _n
367
+ file write holder "& (1) & (2) & (3) & (4) & (5) & (6) \\ \hline" _n
368
+ file close holder
369
+ * Table end
370
+ file open holder using temp_end.tex, write replace text
371
+ file write holder "\hline \end{tabular}" _n
372
+ file close holder
373
+
374
+ eststo clear
375
+ foreach var in imm_not_problem imm_benefits_soon imm_citizenship_soon ///
376
+ trully_american_cit q_govt_imm index_imm_support{
377
+ eststo: xi: reg `var' $X, robust
378
+ su `var' if e(sample)==1 & control==1
379
+ local `var'mc: display %5.2f `r(mean)'
380
+ }
381
+ esttab using temp_all.tex, replace fragment booktabs keep($treatments) noconst label ///
382
+ star(* .1 ** .05 *** .01) se nonumbers nomtitles nolines nocon compress
383
+
384
+ * Table middle
385
+ file open holder using temp_mid1.tex, write replace text
386
+ file write holder "Control mean & `imm_not_problemmc' & `imm_benefits_soonmc' & `imm_citizenship_soonmc' & `trully_american_citmc' & `q_govt_immmc' & `index_imm_supportmc' \\" _n
387
+ file close holder
388
+
389
+
390
+ appendfile temp_all.tex $table_name.tex
391
+ appendfile temp_mid1.tex $table_name.tex
392
+ appendfile temp_end.tex $table_name.tex
393
+
394
+
395
+ erase temp_all.tex
396
+ erase temp_mid1.tex
397
+ erase temp_end.tex
37/replication_package/Do/misperceptions.do ADDED
@@ -0,0 +1,316 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **********
2
+ * Immigration and Redistribution
3
+ * Alesina, Miano, Stantcheva
4
+ * RESTUD
5
+
6
+ * This file generates the variables for the actual statistics on immigrants and non-immigrants (natives) and computes misperceptions (perceived - actual)
7
+ * See the Appendix for all the details on the sources and computations of the actual statistics
8
+ **********
9
+
10
+ ** Share of foreign-born ***
11
+ gen share_foreign=.
12
+ la var share_foreign "Actual share of foreign born"
13
+ replace share_foreign=14.8 if country=="DE"
14
+ replace share_foreign=12.2 if country=="FR"
15
+ replace share_foreign=10 if country=="IT"
16
+ replace share_foreign=13.4 if country=="UK"
17
+ replace share_foreign=10 if country=="US"
18
+ replace share_foreign=17.6 if country=="SE"
19
+
20
+ ** Share of second-generation immigrants ***
21
+ gen share_second_gen=.
22
+ la var share_second_gen "Actual share of second-gen. immigrants"
23
+ replace share_second_gen=7.4 if country=="DE"
24
+ replace share_second_gen=11 if country=="FR"
25
+ replace share_second_gen=2.4 if country=="IT"
26
+ replace share_second_gen=9.2 if country=="UK"
27
+ replace share_second_gen=15.4 if country=="US" // Also including 3.5 illegal immigrants
28
+ replace share_second_gen=13 if country=="SE"
29
+
30
+ **********
31
+ * Share of immigrants from each area
32
+ gen share_NA=.
33
+ la var share_NA "Actual share imm. from North America"
34
+ gen share_LA=.
35
+ la var share_LA "Actual share imm. from Latin America"
36
+ gen share_WE=.
37
+ la var share_WE "Actual share imm. from Western Europe"
38
+ gen share_EE=.
39
+ la var share_EE "Actual share imm. from Eastern Europe"
40
+ gen share_NAF=.
41
+ la var share_NAF "Actual share imm. from North Africa"
42
+ gen share_SA=.
43
+ la var share_SA "Actual share imm. from Sub-Saharan Africa"
44
+ gen share_ME=.
45
+ la var share_ME "Actual share imm. from Middle East"
46
+ gen share_A=.
47
+ la var share_A "Actual share imm. from Asia"
48
+ gen share_O=.
49
+ la var share_O "Actual share imm. from Oceania"
50
+
51
+ * United States
52
+ replace share_NA=2.3 if country=="US"
53
+ replace share_LA=42.3 if country=="US"
54
+ replace share_WE=7.7 if country=="US"
55
+ replace share_EE=6.1 if country=="US"
56
+ replace share_NAF=0.3 if country=="US"
57
+ replace share_SA=4.8 if country=="US"
58
+ replace share_ME=4.1 if country=="US"
59
+ replace share_A=32.1 if country=="US"
60
+ replace share_O=0.7 if country=="US"
61
+
62
+ * UK
63
+ replace share_NA=2.3 if country=="UK"
64
+ replace share_LA=3.9 if country=="UK"
65
+ replace share_WE=19.0 if country=="UK"
66
+ replace share_EE=20.0 if country=="UK"
67
+ replace share_NAF=0.9 if country=="UK"
68
+ replace share_SA=16.0 if country=="UK"
69
+ replace share_ME=5.1 if country=="UK"
70
+ replace share_A=30.1 if country=="UK"
71
+ replace share_O=2.28 if country=="UK"
72
+
73
+ * Italy
74
+ replace share_NA=0.9 if country=="IT"
75
+ replace share_LA=9.1 if country=="IT"
76
+ replace share_WE=14.3 if country=="IT"
77
+ replace share_EE=38.1 if country=="IT"
78
+ replace share_NAF=10.2 if country=="IT"
79
+ replace share_SA=8.2 if country=="IT"
80
+ replace share_ME=2.9 if country=="IT"
81
+ replace share_A=15.9 if country=="IT"
82
+ replace share_O=0.4 if country=="IT"
83
+
84
+ * France
85
+ replace share_NA=1 if country=="FR"
86
+ replace share_LA=3.4 if country=="FR"
87
+ replace share_WE=29.3 if country=="FR"
88
+ replace share_EE=5.2 if country=="FR"
89
+ replace share_NAF=35.3 if country=="FR"
90
+ replace share_SA=13.1 if country=="FR"
91
+ replace share_ME=5.6 if country=="FR"
92
+ replace share_A=7.3 if country=="FR"
93
+ replace share_O=0.2 if country=="FR"
94
+
95
+ * Germany
96
+ replace share_NA=1.1 if country=="DE"
97
+ replace share_LA=3.2 if country=="DE"
98
+ replace share_WE=14.9 if country=="DE"
99
+ replace share_EE=42.6 if country=="DE"
100
+ replace share_NAF=1.5 if country=="DE"
101
+ replace share_SA=2.3 if country=="DE"
102
+ replace share_ME=17.3 if country=="DE"
103
+ replace share_A=15.9 if country=="DE"
104
+ replace share_O=0.1 if country=="DE"
105
+
106
+ * Sweden
107
+ replace share_NA=1.4 if country=="SE"
108
+ replace share_LA=5.5 if country=="SE"
109
+ replace share_WE=23.6 if country=="SE"
110
+ replace share_EE=22.2 if country=="SE"
111
+ replace share_NAF=1.2 if country=="SE"
112
+ replace share_SA=9.1 if country=="SE"
113
+ replace share_ME=23.8 if country=="SE"
114
+ replace share_A=12.4 if country=="SE"
115
+ replace share_O=0.31 if country=="SE"
116
+
117
+ *************
118
+
119
+ * Share of immigrants - Religion
120
+ gen share_christian=.
121
+ gen share_muslim=.
122
+
123
+ label var share_muslim "Actual Share Muslims"
124
+
125
+ label var share_christian "Actual Share Christians"
126
+
127
+
128
+ * United States
129
+ replace share_christian=61 if country=="US"
130
+ replace share_muslim=10 if country=="US"
131
+
132
+ * UK
133
+ replace share_christian=58 if country=="UK"
134
+ replace share_muslim=23 if country=="UK"
135
+
136
+ * France
137
+ replace share_christian=43 if country=="FR"
138
+ replace share_muslim=48 if country=="FR"
139
+
140
+ * Italy
141
+ replace share_christian=57 if country=="IT"
142
+ replace share_muslim=33 if country=="IT"
143
+
144
+ * Germany
145
+ replace share_christian=51 if country=="DE"
146
+ replace share_muslim=30 if country=="DE"
147
+
148
+ * Sweden
149
+ replace share_christian=61 if country=="SE"
150
+ replace share_muslim=27 if country=="SE"
151
+
152
+ * Immigrants' unemployment rate
153
+ gen unemp_imm=.
154
+ la var unemp_imm "Actual immigrant's unemployment rate"
155
+ replace unemp_imm=6.9 if country=="DE"
156
+ replace unemp_imm=16.6 if country=="FR"
157
+ replace unemp_imm=14.7 if country=="IT"
158
+ replace unemp_imm=5.7 if country=="UK"
159
+ replace unemp_imm=5.5 if country=="US"
160
+ replace unemp_imm=16.1 if country=="SE"
161
+
162
+ * Highly educated immigrats
163
+ gen higheduc_imm=.
164
+ la var higheduc_imm "Actual share of highly educated immigrants"
165
+ replace higheduc_imm=22.3 if country=="DE"
166
+ replace higheduc_imm=28.8 if country=="FR"
167
+ replace higheduc_imm=11.7 if country=="IT"
168
+ replace higheduc_imm=48.8 if country=="UK"
169
+ replace higheduc_imm=41.4 if country=="US"
170
+ replace higheduc_imm=37.9 if country=="SE"
171
+
172
+ * Low educated immigrats
173
+ gen loweduc_imm=.
174
+ la var loweduc_imm "Actual share of low educated immigrants"
175
+ replace loweduc_imm=35.1 if country=="DE"
176
+ replace loweduc_imm=39.1 if country=="FR"
177
+ replace loweduc_imm=49.1 if country=="IT"
178
+ replace loweduc_imm=16.6 if country=="UK"
179
+ replace loweduc_imm=22.0 if country=="US"
180
+ replace loweduc_imm=33.7 if country=="SE"
181
+
182
+ * Immigrants' poverty rate
183
+ gen poverty_imm=.
184
+ la var poverty_imm "Actual immigrants' poverty rate"
185
+ replace poverty_imm=20.5 if country=="DE"
186
+ replace poverty_imm=23.8 if country=="FR"
187
+ replace poverty_imm=34.9 if country=="IT"
188
+ replace poverty_imm=19 if country=="UK"
189
+ replace poverty_imm=13.6 if country=="US"
190
+ replace poverty_imm=29.8 if country=="SE"
191
+
192
+ ****
193
+ * Natives' unemployment rate ***
194
+ gen unemp_nat=.
195
+ la var unemp_nat "Actual natives' unemployment rate"
196
+ replace unemp_nat=3.8 if country=="DE"
197
+ replace unemp_nat=9.1 if country=="FR"
198
+ replace unemp_nat=11.2 if country=="IT"
199
+ replace unemp_nat=4.9 if country=="UK"
200
+ replace unemp_nat=5.2 if country=="US"
201
+ replace unemp_nat=5.1 if country=="SE"
202
+
203
+ * Highly educated natives
204
+ gen higheduc_nat=.
205
+ la var higheduc_nat "Actual share of highly educated natives"
206
+ replace higheduc_nat=24.9 if country=="DE"
207
+ replace higheduc_nat=31.2 if country=="FR"
208
+ replace higheduc_nat=16.3 if country=="IT"
209
+ replace higheduc_nat=36 if country=="UK"
210
+ replace higheduc_nat=40.8 if country=="US"
211
+ replace higheduc_nat=34.6 if country=="SE"
212
+
213
+ * Low educated natives
214
+ gen loweduc_nat=.
215
+ la var loweduc_nat "Actual share of low educated natives"
216
+ replace loweduc_nat=16.3 if country=="DE"
217
+ replace loweduc_nat=23.4 if country=="FR"
218
+ replace loweduc_nat=40.4 if country=="IT"
219
+ replace loweduc_nat=21.3 if country=="UK"
220
+ replace loweduc_nat=11.9 if country=="US"
221
+ replace loweduc_nat=17.6 if country=="SE"
222
+
223
+ * Natives' poverty rate
224
+ gen poverty_nat=.
225
+ la var poverty_nat "Actual natives' poverty rate"
226
+ replace poverty_nat=16.3 if country=="DE"
227
+ replace poverty_nat=10.7 if country=="FR"
228
+ replace poverty_nat=17.5 if country=="IT"
229
+ replace poverty_nat=14.5 if country=="UK"
230
+ replace poverty_nat=10.5 if country=="US"
231
+ replace poverty_nat=12 if country=="SE"
232
+
233
+
234
+
235
+ * Gen misperception variables (guessed - real --> negative for understatement, positive for overstatement) *
236
+
237
+ * Share, origin, religion of immigrants
238
+ foreach g in foreign NA LA WE EE NAF SA ME A O ch mu{
239
+ gen mis_share_`g' = perc_share_`g' - share_`g'
240
+ }
241
+
242
+ * Unemployment, education, poverty of immigrants and natives
243
+
244
+ foreach g in imm nat{
245
+ foreach s in unemp higheduc loweduc poverty{
246
+ gen mis_`s'_`g' = perc_`s'_`g' - `s'_`g'
247
+ }
248
+ }
249
+
250
+ gen mis_unemp_imm_nn=perc_unemp_imm-unemp_imm
251
+ gen mis_higheduc_imm_nn=perc_higheduc_imm-higheduc_imm
252
+ gen mis_loweduc_imm_nn=perc_loweduc_imm-loweduc_imm
253
+ gen mis_poverty_imm_nn=perc_poverty_imm-poverty_imm
254
+
255
+ * Grouped origins
256
+
257
+ * Middle East + North Africa
258
+ gen mis_share_ME_NAF = mis_share_ME + mis_share_NAF
259
+
260
+ * North America + Western and Eastern Europe
261
+ gen mis_share_NA_WE_EE = mis_share_NA + mis_share_WE + mis_share_EE
262
+
263
+ * Europe
264
+ gen mis_share_E = mis_share_WE + mis_share_EE
265
+ gen perc_share_E = perc_share_WE + perc_share_EE
266
+
267
+ * Africa
268
+ gen mis_share_AF = mis_share_NAF + mis_share_SA
269
+ gen perc_share_AF = perc_share_NAF + perc_share_SA
270
+
271
+ * Asia
272
+ gen mis_share_AS = mis_share_A + mis_share_ME
273
+ gen perc_share_AS = perc_share_A + perc_share_ME
274
+
275
+ * Gen misperception relative to first and second generation immigrants
276
+ gen share_foreign2= share_foreign + share_second_gen
277
+
278
+ gen mis_share_foreign2 = perc_share_foreign - share_foreign2
279
+
280
+ *Relabel variables
281
+ label var mis_share_foreign "Misperception of the share of immigrants"
282
+ label var mis_share_NA "Misperception of the share of immigrants from North America"
283
+ label var mis_share_LA "Misperception of the share of immigrants from Latin America"
284
+ label var mis_share_WE "Misperception of the share of immigrants from Western Europe"
285
+ label var mis_share_EE "Misperception of the share of immigrants from Eastern Europe"
286
+ label var mis_share_NAF "Misperception of the share of immigrants from North Africa"
287
+ label var mis_share_SA "Misperception of the share of immigrants from Sub-saharian Africa"
288
+ label var mis_share_ME "Misperception of the share of immigrants from Middle East"
289
+ label var mis_share_A "Misperception of the share of immigrants from Asia"
290
+ label var mis_share_O "Misperception of the share of immigrants from Oceania"
291
+ label var mis_share_ch "Misperception of the share of christian immigrants"
292
+ label var mis_share_mu "Misperception of the share of muslim immigrants"
293
+ label var mis_unemp_imm "Misperception of the share of unemployed immigrants"
294
+ label var mis_higheduc_imm "Misperception of the share of high-educated immigrants"
295
+ label var mis_loweduc_imm "Misperception of the share of low-educated immigrants"
296
+ label var mis_poverty_imm "Misperception of the share of immigrants living below the poverty threshold"
297
+ label var mis_unemp_nat "Misperception of the share of unemployed natives"
298
+ label var mis_higheduc_nat "Misperception of the share of high-educated natives"
299
+ label var mis_loweduc_nat "Misperception of the share of low-educated natives"
300
+ label var mis_poverty_nat "Misperception of the share of natives living below the poverty threshold"
301
+ label var mis_share_ME_NAF "Misperception of the share of immigrants from Middle East and North Africa"
302
+ label var mis_share_NA_WE_EE "Misperception of the share of immigrants from North America, Western and Eastern Europe"
303
+ label var mis_share_E "Misperception of the share of immigrants from Europe"
304
+ label var perc_share_E "Perceived share of immigrants from Europe"
305
+ label var mis_share_AF "Misperception of the share of immigrants from Africa"
306
+ label var perc_share_AF "Perceived share of immigrants from Africa"
307
+ label var mis_share_AS "Misperception of the share of immigrants from Asia and Middle East"
308
+ label var perc_share_AS "Perceived share of immigrants from Asia and Middle East"
309
+ label var share_foreign2 "Actual share of immigrants from first and second generations"
310
+ label var mis_share_foreign2 "Misperception of the actual share of immigrants from first and second generations"
311
+ label var mis_unemp_imm_nn "Misperception of the number of unemployed immigrants"
312
+ label var mis_higheduc_imm_nn "Misperception of the number of high-educated immigrants"
313
+ label var mis_loweduc_imm_nn "Misperception of the number of low-educated immigrants"
314
+ label var mis_poverty_imm_nn "Misperception of the number of immigrants under the poverty threshold"
315
+
316
+
37/replication_package/Out/Figures/Figure_10.eps ADDED
@@ -0,0 +1,849 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %!PS-Adobe-2.0 EPSF-2.0
2
+ %% This is a Stata generated postscript file
3
+ %%BoundingBox: 0 0 396 288
4
+ %%HiResBoundingBox: 0.000 0.000 396.000 288.000
5
+ %%DocumentNeededResources: font Helvetica
6
+ /xratio 0.012375 def
7
+ /yratio 0.012375 def
8
+ /Sbgfill {
9
+ /y1 exch def
10
+ /x1 exch def
11
+ /y0 exch def
12
+ /x0 exch def
13
+ x0 y0 moveto
14
+ x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto
15
+ fill
16
+ } def
17
+ /Spt {
18
+ yratio mul
19
+ /yp exch def
20
+ xratio mul
21
+ /xp exch def
22
+ Slrgb setrgbcolor
23
+ xp yp .5 0 360 arc fill
24
+ } def
25
+ /Sln {
26
+ yratio mul
27
+ /y1p exch def
28
+ xratio mul
29
+ /x1p exch def
30
+ yratio mul
31
+ /y0p exch def
32
+ xratio mul
33
+ /x0p exch def
34
+ Slw setlinewidth
35
+ Slrgb setrgbcolor
36
+ x0p y0p M x1p y1p lineto S
37
+ } def
38
+ /Scrv {
39
+ yratio mul
40
+ /y3p exch def
41
+ xratio mul
42
+ /x3p exch def
43
+ yratio mul
44
+ /y2p exch def
45
+ xratio mul
46
+ /x2p exch def
47
+ yratio mul
48
+ /y1p exch def
49
+ xratio mul
50
+ /x1p exch def
51
+ Slw setlinewidth
52
+ Slrgb setrgbcolor
53
+ x1p y1p x2p y2p x3p y3p curveto
54
+ S
55
+ } def
56
+ /Stxtl {
57
+ /sp exch def
58
+ yratio mul
59
+ /sizep exch def
60
+ dup
61
+ /anglep exch def
62
+ 0 exch sub
63
+ /angle2p exch def
64
+ yratio mul
65
+ /y0p exch def
66
+ xratio mul
67
+ /x0p exch def
68
+ Strgb setrgbcolor
69
+ x0p y0p M anglep rotate sizep fntsize sp show stroke angle2p rotate
70
+ } def
71
+ /Stxtc {
72
+ /sp exch def
73
+ yratio mul
74
+ /sizep exch def
75
+ dup
76
+ /anglep exch def
77
+ 0 exch sub
78
+ /angle2p exch def
79
+ yratio mul
80
+ /y0p exch def
81
+ xratio mul
82
+ /x0p exch def
83
+ Strgb setrgbcolor
84
+ x0p y0p M anglep rotate sizep fntsize sp stringwidth exch -2 div exch rm sp show stroke angle2p rotate
85
+ } def
86
+ /Stxtr {
87
+ /sp exch def
88
+ yratio mul
89
+ /sizep exch def
90
+ dup
91
+ /anglep exch def
92
+ 0 exch sub
93
+ /angle2p exch def
94
+ yratio mul
95
+ /y0p exch def
96
+ xratio mul
97
+ /x0p exch def
98
+ Strgb setrgbcolor
99
+ x0p y0p M anglep rotate sizep fntsize sp stringwidth 1 index -1 mul exch rm pop sp show stroke angle2p rotate
100
+ } def
101
+ /Srect {
102
+ /sfill exch def
103
+ /sstroke exch def
104
+ yratio mul
105
+ /y1 exch def
106
+ xratio mul
107
+ /x1 exch def
108
+ yratio mul
109
+ /y0 exch def
110
+ xratio mul
111
+ /x0 exch def
112
+ newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto closepath
113
+ sfill Sfill
114
+ sstroke Sstroke
115
+ } def
116
+ /Sellipse {
117
+ /sfill exch def
118
+ /sstroke exch def
119
+ yratio mul
120
+ /yrad exch def
121
+ xratio mul
122
+ /xrad exch def
123
+ yratio mul
124
+ /y exch def
125
+ xratio mul
126
+ /x exch def
127
+ /savematrix matrix currentmatrix def
128
+ x y translate
129
+ xrad yrad scale
130
+ 0 0 1 0 360 arc
131
+ savematrix setmatrix
132
+ sfill Sfill
133
+ sstroke Sstroke
134
+ } def
135
+ /Stri {
136
+ /sfill exch def
137
+ /sstroke exch def
138
+ xratio mul
139
+ /r exch def
140
+ yratio mul
141
+ /y0 exch def
142
+ xratio mul
143
+ /x0 exch def
144
+ /xcen x0 def
145
+ y0 r add
146
+ /ytop exch def
147
+ r 2 div
148
+ y0 exch sub
149
+ /ybot exch def
150
+ r 3 sqrt 2 div mul dup
151
+ xcen exch sub
152
+ /xleft exch def
153
+ xcen add
154
+ /xright exch def
155
+ newpath xcen ytop moveto xright ybot lineto xleft ybot lineto xcen ytop lineto closepath
156
+ sfill Sfill
157
+ sstroke Sstroke
158
+ } def
159
+ /Soldtri {
160
+ /sfill exch def
161
+ xratio mul
162
+ /r exch def
163
+ yratio mul
164
+ /y0 exch def
165
+ xratio mul
166
+ /x0 exch def
167
+ x0 r sub
168
+ /x1 exch def
169
+ y0 r sub
170
+ /y1 exch def
171
+ x0 r add
172
+ /x2 exch def
173
+ y0 r sub
174
+ /y2 exch def
175
+ /x3 x0 def
176
+ y0 r add
177
+ /y3 exch def
178
+ newpath x1 y1 moveto x2 y2 lineto x3 y3 lineto x1 y1 lineto closepath
179
+ sfill 1 eq {
180
+ Ssrgb setrgbcolor
181
+ gsave
182
+ fill
183
+ grestore
184
+ } if
185
+ Slw setlinewidth
186
+ Slrgb setrgbcolor
187
+ S
188
+ } def
189
+ /Sdia {
190
+ /sfill exch def
191
+ /sstroke exch def
192
+ xratio mul
193
+ /r exch def
194
+ yratio mul
195
+ /y exch def
196
+ xratio mul
197
+ /x exch def
198
+ x r sub
199
+ /x0 exch def
200
+ /y0 y def
201
+ /x1 x def
202
+ y r sub
203
+ /y1 exch def
204
+ x r add
205
+ /x2 exch def
206
+ /y2 y def
207
+ /x3 x def
208
+ y r add
209
+ /y3 exch def
210
+ newpath x0 y0 moveto x1 y1 lineto x2 y2 lineto x3 y3 lineto closepath
211
+ sfill Sfill
212
+ sstroke Sstroke
213
+ } def
214
+ /Scc {
215
+ /sfill exch def
216
+ /sstroke exch def
217
+ xratio mul
218
+ /r0 exch def
219
+ yratio mul
220
+ /y0 exch def
221
+ xratio mul
222
+ /x0 exch def
223
+ x0 y0 r0 0 360 arc closepath
224
+ sfill Sfill
225
+ sstroke Sstroke
226
+ } def
227
+ /Spie {
228
+ /sfill exch def
229
+ /salign exch def
230
+ /a1 exch def
231
+ /a0 exch def
232
+ xratio mul
233
+ /r exch def
234
+ yratio mul
235
+ /y exch def
236
+ xratio mul
237
+ /x exch def
238
+ /Pie {
239
+ x y moveto x y r a0 a1 arc closepath
240
+ } def
241
+ newpath Pie
242
+ sfill Sfill
243
+ Slrgb setrgbcolor
244
+ salign 0 eq {
245
+ gsave
246
+ Slw 2 mul setlinewidth
247
+ clip
248
+ S
249
+ grestore
250
+ } if
251
+ salign 1 eq {
252
+ Slw setlinewidth
253
+ S
254
+ } if
255
+ salign 2 eq {
256
+ gsave
257
+ Slw 2 mul setlinewidth
258
+ strokepath
259
+ pathbbox
260
+ /ury exch def
261
+ /urx exch def
262
+ /lly exch def
263
+ /llx exch def
264
+ newpath llx lly moveto llx ury lineto urx ury lineto urx lly lineto closepath
265
+ Pie
266
+ eoclip
267
+ newpath Pie
268
+ S
269
+ grestore
270
+ } if
271
+ newpath
272
+ } def
273
+ /Splu {
274
+ xratio mul
275
+ /r exch def
276
+ yratio mul
277
+ /y exch def
278
+ xratio mul
279
+ /x exch def
280
+ x r sub
281
+ /x0 exch def
282
+ x r add
283
+ /x1 exch def
284
+ x0 y M x1 y L
285
+ y r sub
286
+ /y0 exch def
287
+ y r add
288
+ /y1 exch def
289
+ x y0 M x y1 L
290
+ } def
291
+ /Scro {
292
+ xratio mul
293
+ /r exch def
294
+ yratio mul
295
+ /y exch def
296
+ xratio mul
297
+ /x exch def
298
+ x r sub
299
+ /x0 exch def
300
+ y r sub
301
+ /y0 exch def
302
+ x r add
303
+ /x1 exch def
304
+ y r add
305
+ /y1 exch def
306
+ x0 y0 M x1 y1 L
307
+ x r add
308
+ /x0 exch def
309
+ y r sub
310
+ /y0 exch def
311
+ x r sub
312
+ /x1 exch def
313
+ y r add
314
+ /y1 exch def
315
+ x0 y0 M x1 y1 L
316
+ } def
317
+ /Sm {
318
+ yratio mul
319
+ /y exch def
320
+ xratio mul
321
+ /x exch def
322
+ x y M
323
+ } def
324
+ /Sl {
325
+ yratio mul
326
+ /y exch def
327
+ xratio mul
328
+ /x exch def
329
+ x y L
330
+ } def
331
+ /SPl {
332
+ yratio mul
333
+ /y exch def
334
+ xratio mul
335
+ /x exch def
336
+ x y PL
337
+ } def
338
+ /Sarr {
339
+ /sfill exch def
340
+ xratio mul
341
+ /r exch def
342
+ yratio mul
343
+ /y exch def
344
+ xratio mul
345
+ /x exch def
346
+ y r add
347
+ /ytop exch def
348
+ y r sub
349
+ /ybot exch def
350
+ gsave
351
+ Slrgb setrgbcolor
352
+ sfill 0 eq {
353
+ r 2 mul 3 div dup
354
+ x exch sub
355
+ /xleft exch def
356
+ x add
357
+ /xright exch def
358
+ newpath xleft y moveto x ytop lineto xright y lineto x ytop moveto x ybot lineto
359
+ Lcs
360
+ 1 setlinejoin
361
+ } {
362
+ r 2 div dup
363
+ x exch sub
364
+ /xleft exch def
365
+ x add
366
+ /xright exch def
367
+ newpath xleft y moveto x ytop lineto xright y lineto x ytop closepath moveto x ybot lineto
368
+ gsave
369
+ fill
370
+ grestore
371
+ } ifelse
372
+ Slw setlinewidth
373
+ S
374
+ grestore
375
+ } def
376
+ /Spipe {
377
+ xratio mul
378
+ /r exch def
379
+ yratio mul
380
+ /y exch def
381
+ xratio mul
382
+ /x exch def
383
+ y r sub
384
+ /y0 exch def
385
+ y r add
386
+ /y1 exch def
387
+ x y0 M x y1 L
388
+ } def
389
+ /Sv {
390
+ xratio mul
391
+ /r exch def
392
+ yratio mul
393
+ /y0 exch def
394
+ xratio mul
395
+ /x0 exch def
396
+ /xcen x0 def
397
+ y0 r add
398
+ /ytop exch def
399
+ r 2 div
400
+ y0 exch sub
401
+ /ybot exch def
402
+ r 3 sqrt 2 div mul dup
403
+ xcen exch sub
404
+ /xleft exch def
405
+ xcen add
406
+ /xright exch def
407
+ newpath xleft ytop moveto xcen ybot lineto xright ytop lineto
408
+ Slw setlinewidth
409
+ Slrgb setrgbcolor
410
+ S
411
+ } def
412
+ /Lcs {
413
+ currentlinecap
414
+ 1 setlinecap
415
+ } def
416
+ /Lcr {
417
+ setlinecap
418
+ } def
419
+ /Sbp {
420
+ newpath
421
+ } def
422
+ /Sep {
423
+ /sfill exch def
424
+ closepath
425
+ /salign exch def
426
+ Lcs
427
+ salign 0 eq {
428
+ sfill Sfill
429
+ gsave
430
+ Slw 2 mul setlinewidth
431
+ clip
432
+ Slrgb setrgbcolor
433
+ S
434
+ grestore
435
+ } if
436
+ salign 1 eq {
437
+ sfill Sfill
438
+ Slw setlinewidth
439
+ Slrgb setrgbcolor
440
+ S
441
+ } if
442
+ salign 2 eq {
443
+ gsave
444
+ Slw 2 mul setlinewidth
445
+ Slrgb setrgbcolor
446
+ S
447
+ grestore
448
+ sfill Sfill
449
+ } if
450
+ newpath
451
+ Lcr
452
+ } def
453
+ /Sbpa {
454
+ newpath
455
+ } def
456
+ /Sepa {
457
+ Slw setlinewidth
458
+ Slrgb setrgbcolor
459
+ currentlinejoin
460
+ 1 setlinejoin
461
+ S
462
+ setlinejoin
463
+ newpath
464
+ } def
465
+ /Stransrot {
466
+ /anglep exch def
467
+ yratio mul
468
+ /y exch def
469
+ xratio mul
470
+ /x exch def
471
+ x y translate
472
+ anglep rotate
473
+ x neg y neg translate
474
+ } def
475
+ /cp {currentpoint} def
476
+ /M {moveto} def
477
+ /rm {rmoveto} def
478
+ /S {
479
+ Slw 0.000 eq {
480
+ newpath
481
+ } if
482
+ Slw 0.000 ne {
483
+ stroke
484
+ } if
485
+ } def
486
+ /L {Slw setlinewidth Slrgb setrgbcolor lineto Lcs S Lcr} def
487
+ /PL {Slw setlinewidth Slrgb setrgbcolor lineto} def
488
+ /MF-Helvetica {
489
+ /newfontname exch def
490
+ /fontname exch def
491
+ /fontdict fontname findfont def
492
+ /newfont fontdict maxlength dict def
493
+ fontdict {
494
+ exch dup /FID eq {pop pop} {exch newfont 3 1 roll put} ifelse
495
+ } forall
496
+ newfont /FontName newfontname put
497
+ newfont /Encoding ISOLatin1Encoding put
498
+ newfontname newfont definefont pop
499
+ } def
500
+ /Helvetica /Helvetica-0 MF-Helvetica
501
+ /Slw 0.120 def
502
+ 0.918 0.949 0.953 setrgbcolor
503
+ 0 0 396.000 288.000 Sbgfill
504
+ /Sfill {
505
+ /sfill exch def
506
+ sfill 1 eq {
507
+ Ssrgb setrgbcolor
508
+ gsave
509
+ fill
510
+ grestore
511
+ } if
512
+ } def
513
+ /Sstroke {
514
+ /sstroke exch def
515
+ sstroke 1 eq {
516
+ Slw setlinewidth
517
+ Slrgb setrgbcolor
518
+ S
519
+ } if
520
+ newpath
521
+ } def
522
+ /Slrgb {1.000 1.000 1.000} def
523
+ /Strgb {1.000 1.000 1.000} def
524
+ /Ssrgb {1.000 1.000 1.000} def
525
+ /Slw 0.576 def
526
+ 0 0 31999 23272 0 1 Srect
527
+ 23 23 31976 23249 1 0 Srect
528
+ 16045 6677 31184 22457 0 1 Srect
529
+ 16068 6700 31161 22434 1 0 Srect
530
+ /Slrgb {0.000 0.000 0.000} def
531
+ /Strgb {0.000 0.000 0.000} def
532
+ /Slw 0.864 def
533
+ /Slrgb {1.000 1.000 1.000} def
534
+ 16045 9034 31184 9034 Sln
535
+ /Slw 0.576 def
536
+ /Slrgb {0.000 0.000 0.000} def
537
+ /Slw 0.864 def
538
+ /Slrgb {1.000 1.000 1.000} def
539
+ 16045 12723 31184 12723 Sln
540
+ /Slw 0.576 def
541
+ /Slrgb {0.000 0.000 0.000} def
542
+ /Slw 0.864 def
543
+ /Slrgb {1.000 1.000 1.000} def
544
+ 16045 16412 31184 16412 Sln
545
+ /Slw 0.576 def
546
+ /Slrgb {0.000 0.000 0.000} def
547
+ /Slw 0.864 def
548
+ /Slrgb {1.000 1.000 1.000} def
549
+ 16045 20101 31184 20101 Sln
550
+ /Slw 0.576 def
551
+ /Slrgb {0.000 0.000 0.000} def
552
+ /Slw 0.432 def
553
+ 27849 6677 27849 22457 Sln
554
+ /Slw 0.864 def
555
+ /Slrgb {0.502 0.502 0.502} def
556
+ 16045 10878 16371 10878 Sln
557
+ 16510 10878 16836 10878 Sln
558
+ 16975 10878 17301 10878 Sln
559
+ 17440 10878 17766 10878 Sln
560
+ 17906 10878 18232 10878 Sln
561
+ 18371 10878 18697 10878 Sln
562
+ 18836 10878 19162 10878 Sln
563
+ 19301 10878 19627 10878 Sln
564
+ 19767 10878 20093 10878 Sln
565
+ 20232 10878 20558 10878 Sln
566
+ 20697 10878 21023 10878 Sln
567
+ 21162 10878 21488 10878 Sln
568
+ 21628 10878 21953 10878 Sln
569
+ 22093 10878 22419 10878 Sln
570
+ 22558 10878 22884 10878 Sln
571
+ 23023 10878 23349 10878 Sln
572
+ 23488 10878 23814 10878 Sln
573
+ 23954 10878 24280 10878 Sln
574
+ 24419 10878 24745 10878 Sln
575
+ 24884 10878 25210 10878 Sln
576
+ 25349 10878 25675 10878 Sln
577
+ 25815 10878 26141 10878 Sln
578
+ 26280 10878 26606 10878 Sln
579
+ 26745 10878 27071 10878 Sln
580
+ 27210 10878 27536 10878 Sln
581
+ 27676 10878 28001 10878 Sln
582
+ 28141 10878 28467 10878 Sln
583
+ 28606 10878 28932 10878 Sln
584
+ 29071 10878 29397 10878 Sln
585
+ 29536 10878 29862 10878 Sln
586
+ 30002 10878 30328 10878 Sln
587
+ 30467 10878 30793 10878 Sln
588
+ 30932 10878 31184 10878 Sln
589
+ 16045 14567 16371 14567 Sln
590
+ 16510 14567 16836 14567 Sln
591
+ 16975 14567 17301 14567 Sln
592
+ 17440 14567 17766 14567 Sln
593
+ 17906 14567 18232 14567 Sln
594
+ 18371 14567 18697 14567 Sln
595
+ 18836 14567 19162 14567 Sln
596
+ 19301 14567 19627 14567 Sln
597
+ 19767 14567 20093 14567 Sln
598
+ 20232 14567 20558 14567 Sln
599
+ 20697 14567 21023 14567 Sln
600
+ 21162 14567 21488 14567 Sln
601
+ 21628 14567 21953 14567 Sln
602
+ 22093 14567 22419 14567 Sln
603
+ 22558 14567 22884 14567 Sln
604
+ 23023 14567 23349 14567 Sln
605
+ 23488 14567 23814 14567 Sln
606
+ 23954 14567 24280 14567 Sln
607
+ 24419 14567 24745 14567 Sln
608
+ 24884 14567 25210 14567 Sln
609
+ 25349 14567 25675 14567 Sln
610
+ 25815 14567 26141 14567 Sln
611
+ 26280 14567 26606 14567 Sln
612
+ 26745 14567 27071 14567 Sln
613
+ 27210 14567 27536 14567 Sln
614
+ 27676 14567 28001 14567 Sln
615
+ 28141 14567 28467 14567 Sln
616
+ 28606 14567 28932 14567 Sln
617
+ 29071 14567 29397 14567 Sln
618
+ 29536 14567 29862 14567 Sln
619
+ 30002 14567 30328 14567 Sln
620
+ 30467 14567 30793 14567 Sln
621
+ 30932 14567 31184 14567 Sln
622
+ 16045 18256 16371 18256 Sln
623
+ 16510 18256 16836 18256 Sln
624
+ 16975 18256 17301 18256 Sln
625
+ 17440 18256 17766 18256 Sln
626
+ 17906 18256 18232 18256 Sln
627
+ 18371 18256 18697 18256 Sln
628
+ 18836 18256 19162 18256 Sln
629
+ 19301 18256 19627 18256 Sln
630
+ 19767 18256 20093 18256 Sln
631
+ 20232 18256 20558 18256 Sln
632
+ 20697 18256 21023 18256 Sln
633
+ 21162 18256 21488 18256 Sln
634
+ 21628 18256 21953 18256 Sln
635
+ 22093 18256 22419 18256 Sln
636
+ 22558 18256 22884 18256 Sln
637
+ 23023 18256 23349 18256 Sln
638
+ 23488 18256 23814 18256 Sln
639
+ 23954 18256 24280 18256 Sln
640
+ 24419 18256 24745 18256 Sln
641
+ 24884 18256 25210 18256 Sln
642
+ 25349 18256 25675 18256 Sln
643
+ 25815 18256 26141 18256 Sln
644
+ 26280 18256 26606 18256 Sln
645
+ 26745 18256 27071 18256 Sln
646
+ 27210 18256 27536 18256 Sln
647
+ 27676 18256 28001 18256 Sln
648
+ 28141 18256 28467 18256 Sln
649
+ 28606 18256 28932 18256 Sln
650
+ 29071 18256 29397 18256 Sln
651
+ 29536 18256 29862 18256 Sln
652
+ 30002 18256 30328 18256 Sln
653
+ 30467 18256 30793 18256 Sln
654
+ 30932 18256 31184 18256 Sln
655
+ /Ssrgb {0.282 0.424 0.549} def
656
+ /Slw 4.032 def
657
+ /Slrgb {0.800 0.800 1.000} def
658
+ 27339 9956 28682 9956 Sln
659
+ 25389 13645 26911 13645 Sln
660
+ 22324 17334 23690 17334 Sln
661
+ 16562 21023 17907 21023 Sln
662
+ /Slw 0.864 def
663
+ /Slrgb {0.302 0.302 1.000} def
664
+ /Ssrgb {0.302 0.302 1.000} def
665
+ 27692 9637 28328 10273 0 1 Srect
666
+ 27727 9672 28293 10238 1 0 Srect
667
+ 25831 13326 26467 13962 0 1 Srect
668
+ 25866 13361 26432 13927 1 0 Srect
669
+ 22688 17016 23324 17652 0 1 Srect
670
+ 22723 17051 23289 17617 1 0 Srect
671
+ 16916 20705 17552 21341 0 1 Srect
672
+ 16951 20740 17517 21306 1 0 Srect
673
+ /Ssrgb {0.467 0.569 0.349} def
674
+ /Slw 4.032 def
675
+ /Slrgb {1.000 0.800 0.800} def
676
+ 25846 8111 27611 8111 Sln
677
+ 28546 11800 30471 11800 Sln
678
+ 24795 15490 26548 15490 Sln
679
+ 23810 19179 25426 19179 Sln
680
+ /Slw 0.864 def
681
+ /Slrgb {0.835 0.000 0.000} def
682
+ /Ssrgb {0.835 0.000 0.000} def
683
+ 26728 8111 449 0 1 Sdia
684
+ 26728 8111 400 1 0 Sdia
685
+ 29508 11800 449 0 1 Sdia
686
+ 29508 11800 400 1 0 Sdia
687
+ 25671 15489 449 0 1 Sdia
688
+ 25671 15489 400 1 0 Sdia
689
+ 24617 19178 449 0 1 Sdia
690
+ 24617 19178 400 1 0 Sdia
691
+ /Slw 0.576 def
692
+ /Slrgb {0.000 0.000 0.000} def
693
+ 16045 6677 16045 22457 Sln
694
+ 15884 8695 0
695
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
696
+ (All Immigrants \(misp.\)) stringwidth pop add
697
+ xratio div
698
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
699
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
700
+ 0.000 970
701
+ (All Immigrants \(misp.\)) Stxtl
702
+ (All Immigrants \(misp.\)) stringwidth pop xratio div
703
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
704
+ pop pop pop pop
705
+ 15884 12384 0
706
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
707
+ (Perc. cultural distance index) stringwidth pop add
708
+ xratio div
709
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
710
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
711
+ 0.000 970
712
+ (Perc. cultural distance index) Stxtl
713
+ (Perc. cultural distance index) stringwidth pop xratio div
714
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
715
+ pop pop pop pop
716
+ 15884 16073 0
717
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
718
+ (Perc. economic weakness index) stringwidth pop add
719
+ xratio div
720
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
721
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
722
+ 0.000 970
723
+ (Perc. economic weakness index) Stxtl
724
+ (Perc. economic weakness index) stringwidth pop xratio div
725
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
726
+ pop pop pop pop
727
+ 15884 19762 0
728
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
729
+ (Perc. free-riding index) stringwidth pop add
730
+ xratio div
731
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
732
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
733
+ 0.000 970
734
+ (Perc. free-riding index) Stxtl
735
+ (Perc. free-riding index) stringwidth pop xratio div
736
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
737
+ pop pop pop pop
738
+ 16045 6677 31184 6677 Sln
739
+ 16557 6677 16557 6354 Sln
740
+ 16557 5513 0
741
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
742
+ (-.4) stringwidth pop add
743
+ 2 div xratio div
744
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
745
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
746
+ 0.000 970
747
+ (-.4) Stxtl
748
+ (-.4) stringwidth pop xratio div
749
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
750
+ pop pop pop pop
751
+ 19380 6677 19380 6354 Sln
752
+ 19380 5513 0
753
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
754
+ (-.3) stringwidth pop add
755
+ 2 div xratio div
756
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
757
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
758
+ 0.000 970
759
+ (-.3) Stxtl
760
+ (-.3) stringwidth pop xratio div
761
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
762
+ pop pop pop pop
763
+ 22203 6677 22203 6354 Sln
764
+ 22203 5513 0
765
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
766
+ (-.2) stringwidth pop add
767
+ 2 div xratio div
768
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
769
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
770
+ 0.000 970
771
+ (-.2) Stxtl
772
+ (-.2) stringwidth pop xratio div
773
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
774
+ pop pop pop pop
775
+ 25026 6677 25026 6354 Sln
776
+ 25026 5513 0
777
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
778
+ (-.1) stringwidth pop add
779
+ 2 div xratio div
780
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
781
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
782
+ 0.000 970
783
+ (-.1) Stxtl
784
+ (-.1) stringwidth pop xratio div
785
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
786
+ pop pop pop pop
787
+ 27849 6677 27849 6354 Sln
788
+ 27849 5513 0
789
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
790
+ (0) stringwidth pop add
791
+ 2 div xratio div
792
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
793
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
794
+ 0.000 970
795
+ (0) Stxtl
796
+ (0) stringwidth pop xratio div
797
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
798
+ pop pop pop pop
799
+ 30672 6677 30672 6354 Sln
800
+ 30672 5513 0
801
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
802
+ (.1) stringwidth pop add
803
+ 2 div xratio div
804
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
805
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
806
+ 0.000 970
807
+ (.1) Stxtl
808
+ (.1) stringwidth pop xratio div
809
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
810
+ pop pop pop pop
811
+ 23615 4463 0
812
+ /Helvetica-0 findfont 970 yratio mul scalefont setfont
813
+ (Correlation) stringwidth pop add
814
+ 2 div xratio div
815
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
816
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
817
+ 0.000 970
818
+ (Correlation) Stxtl
819
+ (Correlation) stringwidth pop xratio div
820
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
821
+ pop pop pop pop
822
+ /Ssrgb {1.000 1.000 1.000} def
823
+ 17930 1094 29300 3731 0 1 Srect
824
+ 17953 1117 29277 3708 1 0 Srect
825
+ /Slw 0.864 def
826
+ /Slrgb {0.302 0.302 1.000} def
827
+ /Ssrgb {0.302 0.302 1.000} def
828
+ 18244 2660 18880 3296 0 1 Srect
829
+ 18279 2695 18845 3261 1 0 Srect
830
+ /Slrgb {0.835 0.000 0.000} def
831
+ /Ssrgb {0.835 0.000 0.000} def
832
+ 18562 1847 449 0 1 Sdia
833
+ 18562 1847 400 1 0 Sdia
834
+ 19330 2695 2 copy
835
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
836
+ 0.000 808
837
+ (Support for Immigration) Stxtl
838
+ (Support for Immigration) stringwidth pop xratio div
839
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
840
+ pop pop pop pop
841
+ 19330 1564 2 copy
842
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
843
+ 0.000 808
844
+ (Support for Redistribution) Stxtl
845
+ (Support for Redistribution) stringwidth pop xratio div
846
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
847
+ pop pop pop pop
848
+ S showpage
849
+ %%EOF
37/replication_package/Out/Figures/Figure_2.png ADDED

Git LFS Details

  • SHA256: 9d451878c4bae4b772cd9caaa6eb6ec84a89bff1db12d9ba47fe7ad0bb46662b
  • Pointer size: 131 Bytes
  • Size of remote file: 212 kB
37/replication_package/Out/Figures/Figure_3_A.png ADDED

Git LFS Details

  • SHA256: 7b544da05440710db29be20aa4a114f879fa5fd1b8b093b22d0aff0fcea4d43d
  • Pointer size: 131 Bytes
  • Size of remote file: 219 kB
37/replication_package/Out/Figures/Figure_3_B.png ADDED

Git LFS Details

  • SHA256: 5e858e2770d7acff7179fca0d7b4975c96ad662abc5975a6c634e7f27036b283
  • Pointer size: 131 Bytes
  • Size of remote file: 219 kB
37/replication_package/Out/Figures/Figure_4_A.png ADDED

Git LFS Details

  • SHA256: 321316ebbf873712015462e13c69a0535b09f36e15719a354420d771f02f2ee5
  • Pointer size: 131 Bytes
  • Size of remote file: 231 kB
37/replication_package/Out/Figures/Figure_4_B.png ADDED

Git LFS Details

  • SHA256: d1c00eb9d4a2e3014319d586996befb82ac18c47ef477196a3f67e5d885ea9e0
  • Pointer size: 131 Bytes
  • Size of remote file: 225 kB
37/replication_package/Out/Figures/Figure_5_A.png ADDED

Git LFS Details

  • SHA256: 77cae3ddde194578a04033509dabf312b22fe9c4c31d30fb1df214adda5ae271
  • Pointer size: 131 Bytes
  • Size of remote file: 202 kB
37/replication_package/Out/Figures/Figure_5_B.png ADDED

Git LFS Details

  • SHA256: fd3295f41a7901a04bdea6e543b711a392cce844e7483d5f4e386dfaf2c1f34e
  • Pointer size: 131 Bytes
  • Size of remote file: 212 kB
37/replication_package/Out/Figures/Figure_6_A.png ADDED

Git LFS Details

  • SHA256: d2aac3ef1c48ae0196886ab52fb9271a0c1ee375e4530783371b4f9ee1d845a1
  • Pointer size: 131 Bytes
  • Size of remote file: 198 kB
37/replication_package/Out/Figures/Figure_6_B.png ADDED

Git LFS Details

  • SHA256: 15a831e5af649ee0ccdc95fdc316f140dc834f825f5720c494db4dc2677e0f6e
  • Pointer size: 131 Bytes
  • Size of remote file: 195 kB
37/replication_package/Out/Figures/Figure_7.png ADDED

Git LFS Details

  • SHA256: 9a11a74d1cf9e914267e74986c29abc1c6bae1481d7bc86010d74e2b1cac0805
  • Pointer size: 131 Bytes
  • Size of remote file: 214 kB
37/replication_package/Out/Figures/Figure_8_A.eps ADDED
@@ -0,0 +1,984 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %!PS-Adobe-2.0 EPSF-2.0
2
+ %% This is a Stata generated postscript file
3
+ %%BoundingBox: 0 0 396 288
4
+ %%HiResBoundingBox: 0.000 0.000 396.000 288.000
5
+ %%DocumentNeededResources: font Helvetica
6
+ /xratio 0.012375 def
7
+ /yratio 0.012375 def
8
+ /Sbgfill {
9
+ /y1 exch def
10
+ /x1 exch def
11
+ /y0 exch def
12
+ /x0 exch def
13
+ x0 y0 moveto
14
+ x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto
15
+ fill
16
+ } def
17
+ /Spt {
18
+ yratio mul
19
+ /yp exch def
20
+ xratio mul
21
+ /xp exch def
22
+ Slrgb setrgbcolor
23
+ xp yp .5 0 360 arc fill
24
+ } def
25
+ /Sln {
26
+ yratio mul
27
+ /y1p exch def
28
+ xratio mul
29
+ /x1p exch def
30
+ yratio mul
31
+ /y0p exch def
32
+ xratio mul
33
+ /x0p exch def
34
+ Slw setlinewidth
35
+ Slrgb setrgbcolor
36
+ x0p y0p M x1p y1p lineto S
37
+ } def
38
+ /Scrv {
39
+ yratio mul
40
+ /y3p exch def
41
+ xratio mul
42
+ /x3p exch def
43
+ yratio mul
44
+ /y2p exch def
45
+ xratio mul
46
+ /x2p exch def
47
+ yratio mul
48
+ /y1p exch def
49
+ xratio mul
50
+ /x1p exch def
51
+ Slw setlinewidth
52
+ Slrgb setrgbcolor
53
+ x1p y1p x2p y2p x3p y3p curveto
54
+ S
55
+ } def
56
+ /Stxtl {
57
+ /sp exch def
58
+ yratio mul
59
+ /sizep exch def
60
+ dup
61
+ /anglep exch def
62
+ 0 exch sub
63
+ /angle2p exch def
64
+ yratio mul
65
+ /y0p exch def
66
+ xratio mul
67
+ /x0p exch def
68
+ Strgb setrgbcolor
69
+ x0p y0p M anglep rotate sizep fntsize sp show stroke angle2p rotate
70
+ } def
71
+ /Stxtc {
72
+ /sp exch def
73
+ yratio mul
74
+ /sizep exch def
75
+ dup
76
+ /anglep exch def
77
+ 0 exch sub
78
+ /angle2p exch def
79
+ yratio mul
80
+ /y0p exch def
81
+ xratio mul
82
+ /x0p exch def
83
+ Strgb setrgbcolor
84
+ x0p y0p M anglep rotate sizep fntsize sp stringwidth exch -2 div exch rm sp show stroke angle2p rotate
85
+ } def
86
+ /Stxtr {
87
+ /sp exch def
88
+ yratio mul
89
+ /sizep exch def
90
+ dup
91
+ /anglep exch def
92
+ 0 exch sub
93
+ /angle2p exch def
94
+ yratio mul
95
+ /y0p exch def
96
+ xratio mul
97
+ /x0p exch def
98
+ Strgb setrgbcolor
99
+ x0p y0p M anglep rotate sizep fntsize sp stringwidth 1 index -1 mul exch rm pop sp show stroke angle2p rotate
100
+ } def
101
+ /Srect {
102
+ /sfill exch def
103
+ /sstroke exch def
104
+ yratio mul
105
+ /y1 exch def
106
+ xratio mul
107
+ /x1 exch def
108
+ yratio mul
109
+ /y0 exch def
110
+ xratio mul
111
+ /x0 exch def
112
+ newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto closepath
113
+ sfill Sfill
114
+ sstroke Sstroke
115
+ } def
116
+ /Sellipse {
117
+ /sfill exch def
118
+ /sstroke exch def
119
+ yratio mul
120
+ /yrad exch def
121
+ xratio mul
122
+ /xrad exch def
123
+ yratio mul
124
+ /y exch def
125
+ xratio mul
126
+ /x exch def
127
+ /savematrix matrix currentmatrix def
128
+ x y translate
129
+ xrad yrad scale
130
+ 0 0 1 0 360 arc
131
+ savematrix setmatrix
132
+ sfill Sfill
133
+ sstroke Sstroke
134
+ } def
135
+ /Stri {
136
+ /sfill exch def
137
+ /sstroke exch def
138
+ xratio mul
139
+ /r exch def
140
+ yratio mul
141
+ /y0 exch def
142
+ xratio mul
143
+ /x0 exch def
144
+ /xcen x0 def
145
+ y0 r add
146
+ /ytop exch def
147
+ r 2 div
148
+ y0 exch sub
149
+ /ybot exch def
150
+ r 3 sqrt 2 div mul dup
151
+ xcen exch sub
152
+ /xleft exch def
153
+ xcen add
154
+ /xright exch def
155
+ newpath xcen ytop moveto xright ybot lineto xleft ybot lineto xcen ytop lineto closepath
156
+ sfill Sfill
157
+ sstroke Sstroke
158
+ } def
159
+ /Soldtri {
160
+ /sfill exch def
161
+ xratio mul
162
+ /r exch def
163
+ yratio mul
164
+ /y0 exch def
165
+ xratio mul
166
+ /x0 exch def
167
+ x0 r sub
168
+ /x1 exch def
169
+ y0 r sub
170
+ /y1 exch def
171
+ x0 r add
172
+ /x2 exch def
173
+ y0 r sub
174
+ /y2 exch def
175
+ /x3 x0 def
176
+ y0 r add
177
+ /y3 exch def
178
+ newpath x1 y1 moveto x2 y2 lineto x3 y3 lineto x1 y1 lineto closepath
179
+ sfill 1 eq {
180
+ Ssrgb setrgbcolor
181
+ gsave
182
+ fill
183
+ grestore
184
+ } if
185
+ Slw setlinewidth
186
+ Slrgb setrgbcolor
187
+ S
188
+ } def
189
+ /Sdia {
190
+ /sfill exch def
191
+ /sstroke exch def
192
+ xratio mul
193
+ /r exch def
194
+ yratio mul
195
+ /y exch def
196
+ xratio mul
197
+ /x exch def
198
+ x r sub
199
+ /x0 exch def
200
+ /y0 y def
201
+ /x1 x def
202
+ y r sub
203
+ /y1 exch def
204
+ x r add
205
+ /x2 exch def
206
+ /y2 y def
207
+ /x3 x def
208
+ y r add
209
+ /y3 exch def
210
+ newpath x0 y0 moveto x1 y1 lineto x2 y2 lineto x3 y3 lineto closepath
211
+ sfill Sfill
212
+ sstroke Sstroke
213
+ } def
214
+ /Scc {
215
+ /sfill exch def
216
+ /sstroke exch def
217
+ xratio mul
218
+ /r0 exch def
219
+ yratio mul
220
+ /y0 exch def
221
+ xratio mul
222
+ /x0 exch def
223
+ x0 y0 r0 0 360 arc closepath
224
+ sfill Sfill
225
+ sstroke Sstroke
226
+ } def
227
+ /Spie {
228
+ /sfill exch def
229
+ /salign exch def
230
+ /a1 exch def
231
+ /a0 exch def
232
+ xratio mul
233
+ /r exch def
234
+ yratio mul
235
+ /y exch def
236
+ xratio mul
237
+ /x exch def
238
+ /Pie {
239
+ x y moveto x y r a0 a1 arc closepath
240
+ } def
241
+ newpath Pie
242
+ sfill Sfill
243
+ Slrgb setrgbcolor
244
+ salign 0 eq {
245
+ gsave
246
+ Slw 2 mul setlinewidth
247
+ clip
248
+ S
249
+ grestore
250
+ } if
251
+ salign 1 eq {
252
+ Slw setlinewidth
253
+ S
254
+ } if
255
+ salign 2 eq {
256
+ gsave
257
+ Slw 2 mul setlinewidth
258
+ strokepath
259
+ pathbbox
260
+ /ury exch def
261
+ /urx exch def
262
+ /lly exch def
263
+ /llx exch def
264
+ newpath llx lly moveto llx ury lineto urx ury lineto urx lly lineto closepath
265
+ Pie
266
+ eoclip
267
+ newpath Pie
268
+ S
269
+ grestore
270
+ } if
271
+ newpath
272
+ } def
273
+ /Splu {
274
+ xratio mul
275
+ /r exch def
276
+ yratio mul
277
+ /y exch def
278
+ xratio mul
279
+ /x exch def
280
+ x r sub
281
+ /x0 exch def
282
+ x r add
283
+ /x1 exch def
284
+ x0 y M x1 y L
285
+ y r sub
286
+ /y0 exch def
287
+ y r add
288
+ /y1 exch def
289
+ x y0 M x y1 L
290
+ } def
291
+ /Scro {
292
+ xratio mul
293
+ /r exch def
294
+ yratio mul
295
+ /y exch def
296
+ xratio mul
297
+ /x exch def
298
+ x r sub
299
+ /x0 exch def
300
+ y r sub
301
+ /y0 exch def
302
+ x r add
303
+ /x1 exch def
304
+ y r add
305
+ /y1 exch def
306
+ x0 y0 M x1 y1 L
307
+ x r add
308
+ /x0 exch def
309
+ y r sub
310
+ /y0 exch def
311
+ x r sub
312
+ /x1 exch def
313
+ y r add
314
+ /y1 exch def
315
+ x0 y0 M x1 y1 L
316
+ } def
317
+ /Sm {
318
+ yratio mul
319
+ /y exch def
320
+ xratio mul
321
+ /x exch def
322
+ x y M
323
+ } def
324
+ /Sl {
325
+ yratio mul
326
+ /y exch def
327
+ xratio mul
328
+ /x exch def
329
+ x y L
330
+ } def
331
+ /SPl {
332
+ yratio mul
333
+ /y exch def
334
+ xratio mul
335
+ /x exch def
336
+ x y PL
337
+ } def
338
+ /Sarr {
339
+ /sfill exch def
340
+ xratio mul
341
+ /r exch def
342
+ yratio mul
343
+ /y exch def
344
+ xratio mul
345
+ /x exch def
346
+ y r add
347
+ /ytop exch def
348
+ y r sub
349
+ /ybot exch def
350
+ gsave
351
+ Slrgb setrgbcolor
352
+ sfill 0 eq {
353
+ r 2 mul 3 div dup
354
+ x exch sub
355
+ /xleft exch def
356
+ x add
357
+ /xright exch def
358
+ newpath xleft y moveto x ytop lineto xright y lineto x ytop moveto x ybot lineto
359
+ Lcs
360
+ 1 setlinejoin
361
+ } {
362
+ r 2 div dup
363
+ x exch sub
364
+ /xleft exch def
365
+ x add
366
+ /xright exch def
367
+ newpath xleft y moveto x ytop lineto xright y lineto x ytop closepath moveto x ybot lineto
368
+ gsave
369
+ fill
370
+ grestore
371
+ } ifelse
372
+ Slw setlinewidth
373
+ S
374
+ grestore
375
+ } def
376
+ /Spipe {
377
+ xratio mul
378
+ /r exch def
379
+ yratio mul
380
+ /y exch def
381
+ xratio mul
382
+ /x exch def
383
+ y r sub
384
+ /y0 exch def
385
+ y r add
386
+ /y1 exch def
387
+ x y0 M x y1 L
388
+ } def
389
+ /Sv {
390
+ xratio mul
391
+ /r exch def
392
+ yratio mul
393
+ /y0 exch def
394
+ xratio mul
395
+ /x0 exch def
396
+ /xcen x0 def
397
+ y0 r add
398
+ /ytop exch def
399
+ r 2 div
400
+ y0 exch sub
401
+ /ybot exch def
402
+ r 3 sqrt 2 div mul dup
403
+ xcen exch sub
404
+ /xleft exch def
405
+ xcen add
406
+ /xright exch def
407
+ newpath xleft ytop moveto xcen ybot lineto xright ytop lineto
408
+ Slw setlinewidth
409
+ Slrgb setrgbcolor
410
+ S
411
+ } def
412
+ /Lcs {
413
+ currentlinecap
414
+ 1 setlinecap
415
+ } def
416
+ /Lcr {
417
+ setlinecap
418
+ } def
419
+ /Sbp {
420
+ newpath
421
+ } def
422
+ /Sep {
423
+ /sfill exch def
424
+ closepath
425
+ /salign exch def
426
+ Lcs
427
+ salign 0 eq {
428
+ sfill Sfill
429
+ gsave
430
+ Slw 2 mul setlinewidth
431
+ clip
432
+ Slrgb setrgbcolor
433
+ S
434
+ grestore
435
+ } if
436
+ salign 1 eq {
437
+ sfill Sfill
438
+ Slw setlinewidth
439
+ Slrgb setrgbcolor
440
+ S
441
+ } if
442
+ salign 2 eq {
443
+ gsave
444
+ Slw 2 mul setlinewidth
445
+ Slrgb setrgbcolor
446
+ S
447
+ grestore
448
+ sfill Sfill
449
+ } if
450
+ newpath
451
+ Lcr
452
+ } def
453
+ /Sbpa {
454
+ newpath
455
+ } def
456
+ /Sepa {
457
+ Slw setlinewidth
458
+ Slrgb setrgbcolor
459
+ currentlinejoin
460
+ 1 setlinejoin
461
+ S
462
+ setlinejoin
463
+ newpath
464
+ } def
465
+ /Stransrot {
466
+ /anglep exch def
467
+ yratio mul
468
+ /y exch def
469
+ xratio mul
470
+ /x exch def
471
+ x y translate
472
+ anglep rotate
473
+ x neg y neg translate
474
+ } def
475
+ /cp {currentpoint} def
476
+ /M {moveto} def
477
+ /rm {rmoveto} def
478
+ /S {
479
+ Slw 0.000 eq {
480
+ newpath
481
+ } if
482
+ Slw 0.000 ne {
483
+ stroke
484
+ } if
485
+ } def
486
+ /L {Slw setlinewidth Slrgb setrgbcolor lineto Lcs S Lcr} def
487
+ /PL {Slw setlinewidth Slrgb setrgbcolor lineto} def
488
+ /MF-Helvetica {
489
+ /newfontname exch def
490
+ /fontname exch def
491
+ /fontdict fontname findfont def
492
+ /newfont fontdict maxlength dict def
493
+ fontdict {
494
+ exch dup /FID eq {pop pop} {exch newfont 3 1 roll put} ifelse
495
+ } forall
496
+ newfont /FontName newfontname put
497
+ newfont /Encoding ISOLatin1Encoding put
498
+ newfontname newfont definefont pop
499
+ } def
500
+ /Helvetica /Helvetica-0 MF-Helvetica
501
+ /Slw 0.120 def
502
+ 0.918 0.949 0.953 setrgbcolor
503
+ 0 0 396.000 288.000 Sbgfill
504
+ /Sfill {
505
+ /sfill exch def
506
+ sfill 1 eq {
507
+ Ssrgb setrgbcolor
508
+ gsave
509
+ fill
510
+ grestore
511
+ } if
512
+ } def
513
+ /Sstroke {
514
+ /sstroke exch def
515
+ sstroke 1 eq {
516
+ Slw setlinewidth
517
+ Slrgb setrgbcolor
518
+ S
519
+ } if
520
+ newpath
521
+ } def
522
+ /Slrgb {1.000 1.000 1.000} def
523
+ /Strgb {1.000 1.000 1.000} def
524
+ /Ssrgb {1.000 1.000 1.000} def
525
+ /Slw 0.576 def
526
+ 0 0 31999 23272 0 1 Srect
527
+ 23 23 31976 23249 1 0 Srect
528
+ 15486 6031 31184 22457 0 1 Srect
529
+ 15509 6054 31161 22434 1 0 Srect
530
+ /Slrgb {0.000 0.000 0.000} def
531
+ /Strgb {0.000 0.000 0.000} def
532
+ /Slw 0.864 def
533
+ /Slrgb {1.000 1.000 1.000} def
534
+ 15486 9007 31184 9007 Sln
535
+ /Slw 0.576 def
536
+ /Slrgb {0.000 0.000 0.000} def
537
+ /Slw 0.864 def
538
+ /Slrgb {1.000 1.000 1.000} def
539
+ 15486 12088 31184 12088 Sln
540
+ /Slw 0.576 def
541
+ /Slrgb {0.000 0.000 0.000} def
542
+ /Slw 0.864 def
543
+ /Slrgb {1.000 1.000 1.000} def
544
+ 15486 15168 31184 15168 Sln
545
+ /Slw 0.576 def
546
+ /Slrgb {0.000 0.000 0.000} def
547
+ /Slw 0.864 def
548
+ /Slrgb {1.000 1.000 1.000} def
549
+ 15486 18249 31184 18249 Sln
550
+ /Slw 0.576 def
551
+ /Slrgb {0.000 0.000 0.000} def
552
+ /Slw 0.864 def
553
+ /Slrgb {1.000 1.000 1.000} def
554
+ 15486 21329 31184 21329 Sln
555
+ /Slw 0.576 def
556
+ /Slrgb {0.000 0.000 0.000} def
557
+ /Slw 0.864 def
558
+ /Slrgb {0.878 0.878 0.878} def
559
+ 15486 9007 15812 9007 Sln
560
+ 15951 9007 16277 9007 Sln
561
+ 16416 9007 16742 9007 Sln
562
+ 16882 9007 17208 9007 Sln
563
+ 17347 9007 17673 9007 Sln
564
+ 17812 9007 18138 9007 Sln
565
+ 18277 9007 18603 9007 Sln
566
+ 18743 9007 19069 9007 Sln
567
+ 19208 9007 19534 9007 Sln
568
+ 19673 9007 19999 9007 Sln
569
+ 20138 9007 20464 9007 Sln
570
+ 20604 9007 20929 9007 Sln
571
+ 21069 9007 21395 9007 Sln
572
+ 21534 9007 21860 9007 Sln
573
+ 21999 9007 22325 9007 Sln
574
+ 22464 9007 22790 9007 Sln
575
+ 22930 9007 23256 9007 Sln
576
+ 23395 9007 23721 9007 Sln
577
+ 23860 9007 24186 9007 Sln
578
+ 24325 9007 24651 9007 Sln
579
+ 24791 9007 25117 9007 Sln
580
+ 25256 9007 25582 9007 Sln
581
+ 25721 9007 26047 9007 Sln
582
+ 26186 9007 26512 9007 Sln
583
+ 26652 9007 26977 9007 Sln
584
+ 27117 9007 27443 9007 Sln
585
+ 27582 9007 27908 9007 Sln
586
+ 28047 9007 28373 9007 Sln
587
+ 28512 9007 28838 9007 Sln
588
+ 28978 9007 29304 9007 Sln
589
+ 29443 9007 29769 9007 Sln
590
+ 29908 9007 30234 9007 Sln
591
+ 30373 9007 30699 9007 Sln
592
+ 30839 9007 31165 9007 Sln
593
+ 15486 12088 15812 12088 Sln
594
+ 15951 12088 16277 12088 Sln
595
+ 16416 12088 16742 12088 Sln
596
+ 16882 12088 17208 12088 Sln
597
+ 17347 12088 17673 12088 Sln
598
+ 17812 12088 18138 12088 Sln
599
+ 18277 12088 18603 12088 Sln
600
+ 18743 12088 19069 12088 Sln
601
+ 19208 12088 19534 12088 Sln
602
+ 19673 12088 19999 12088 Sln
603
+ 20138 12088 20464 12088 Sln
604
+ 20604 12088 20929 12088 Sln
605
+ 21069 12088 21395 12088 Sln
606
+ 21534 12088 21860 12088 Sln
607
+ 21999 12088 22325 12088 Sln
608
+ 22464 12088 22790 12088 Sln
609
+ 22930 12088 23256 12088 Sln
610
+ 23395 12088 23721 12088 Sln
611
+ 23860 12088 24186 12088 Sln
612
+ 24325 12088 24651 12088 Sln
613
+ 24791 12088 25117 12088 Sln
614
+ 25256 12088 25582 12088 Sln
615
+ 25721 12088 26047 12088 Sln
616
+ 26186 12088 26512 12088 Sln
617
+ 26652 12088 26977 12088 Sln
618
+ 27117 12088 27443 12088 Sln
619
+ 27582 12088 27908 12088 Sln
620
+ 28047 12088 28373 12088 Sln
621
+ 28512 12088 28838 12088 Sln
622
+ 28978 12088 29304 12088 Sln
623
+ 29443 12088 29769 12088 Sln
624
+ 29908 12088 30234 12088 Sln
625
+ 30373 12088 30699 12088 Sln
626
+ 30839 12088 31165 12088 Sln
627
+ 15486 15168 15812 15168 Sln
628
+ 15951 15168 16277 15168 Sln
629
+ 16416 15168 16742 15168 Sln
630
+ 16882 15168 17208 15168 Sln
631
+ 17347 15168 17673 15168 Sln
632
+ 17812 15168 18138 15168 Sln
633
+ 18277 15168 18603 15168 Sln
634
+ 18743 15168 19069 15168 Sln
635
+ 19208 15168 19534 15168 Sln
636
+ 19673 15168 19999 15168 Sln
637
+ 20138 15168 20464 15168 Sln
638
+ 20604 15168 20929 15168 Sln
639
+ 21069 15168 21395 15168 Sln
640
+ 21534 15168 21860 15168 Sln
641
+ 21999 15168 22325 15168 Sln
642
+ 22464 15168 22790 15168 Sln
643
+ 22930 15168 23256 15168 Sln
644
+ 23395 15168 23721 15168 Sln
645
+ 23860 15168 24186 15168 Sln
646
+ 24325 15168 24651 15168 Sln
647
+ 24791 15168 25117 15168 Sln
648
+ 25256 15168 25582 15168 Sln
649
+ 25721 15168 26047 15168 Sln
650
+ 26186 15168 26512 15168 Sln
651
+ 26652 15168 26977 15168 Sln
652
+ 27117 15168 27443 15168 Sln
653
+ 27582 15168 27908 15168 Sln
654
+ 28047 15168 28373 15168 Sln
655
+ 28512 15168 28838 15168 Sln
656
+ 28978 15168 29304 15168 Sln
657
+ 29443 15168 29769 15168 Sln
658
+ 29908 15168 30234 15168 Sln
659
+ 30373 15168 30699 15168 Sln
660
+ 30839 15168 31165 15168 Sln
661
+ 15486 18249 15812 18249 Sln
662
+ 15951 18249 16277 18249 Sln
663
+ 16416 18249 16742 18249 Sln
664
+ 16882 18249 17208 18249 Sln
665
+ 17347 18249 17673 18249 Sln
666
+ 17812 18249 18138 18249 Sln
667
+ 18277 18249 18603 18249 Sln
668
+ 18743 18249 19069 18249 Sln
669
+ 19208 18249 19534 18249 Sln
670
+ 19673 18249 19999 18249 Sln
671
+ 20138 18249 20464 18249 Sln
672
+ 20604 18249 20929 18249 Sln
673
+ 21069 18249 21395 18249 Sln
674
+ 21534 18249 21860 18249 Sln
675
+ 21999 18249 22325 18249 Sln
676
+ 22464 18249 22790 18249 Sln
677
+ 22930 18249 23256 18249 Sln
678
+ 23395 18249 23721 18249 Sln
679
+ 23860 18249 24186 18249 Sln
680
+ 24325 18249 24651 18249 Sln
681
+ 24791 18249 25117 18249 Sln
682
+ 25256 18249 25582 18249 Sln
683
+ 25721 18249 26047 18249 Sln
684
+ 26186 18249 26512 18249 Sln
685
+ 26652 18249 26977 18249 Sln
686
+ 27117 18249 27443 18249 Sln
687
+ 27582 18249 27908 18249 Sln
688
+ 28047 18249 28373 18249 Sln
689
+ 28512 18249 28838 18249 Sln
690
+ 28978 18249 29304 18249 Sln
691
+ 29443 18249 29769 18249 Sln
692
+ 29908 18249 30234 18249 Sln
693
+ 30373 18249 30699 18249 Sln
694
+ 30839 18249 31165 18249 Sln
695
+ 15486 21329 15812 21329 Sln
696
+ 15951 21329 16277 21329 Sln
697
+ 16416 21329 16742 21329 Sln
698
+ 16882 21329 17208 21329 Sln
699
+ 17347 21329 17673 21329 Sln
700
+ 17812 21329 18138 21329 Sln
701
+ 18277 21329 18603 21329 Sln
702
+ 18743 21329 19069 21329 Sln
703
+ 19208 21329 19534 21329 Sln
704
+ 19673 21329 19999 21329 Sln
705
+ 20138 21329 20464 21329 Sln
706
+ 20604 21329 20929 21329 Sln
707
+ 21069 21329 21395 21329 Sln
708
+ 21534 21329 21860 21329 Sln
709
+ 21999 21329 22325 21329 Sln
710
+ 22464 21329 22790 21329 Sln
711
+ 22930 21329 23256 21329 Sln
712
+ 23395 21329 23721 21329 Sln
713
+ 23860 21329 24186 21329 Sln
714
+ 24325 21329 24651 21329 Sln
715
+ 24791 21329 25117 21329 Sln
716
+ 25256 21329 25582 21329 Sln
717
+ 25721 21329 26047 21329 Sln
718
+ 26186 21329 26512 21329 Sln
719
+ 26652 21329 26977 21329 Sln
720
+ 27117 21329 27443 21329 Sln
721
+ 27582 21329 27908 21329 Sln
722
+ 28047 21329 28373 21329 Sln
723
+ 28512 21329 28838 21329 Sln
724
+ 28978 21329 29304 21329 Sln
725
+ 29443 21329 29769 21329 Sln
726
+ 29908 21329 30234 21329 Sln
727
+ 30373 21329 30699 21329 Sln
728
+ 30839 21329 31165 21329 Sln
729
+ /Slrgb {1.000 0.000 0.000} def
730
+ /Ssrgb {1.000 0.000 0.000} def
731
+ 20098 9007 449 0 1 Sdia
732
+ 20098 9007 400 1 0 Sdia
733
+ 20479 12087 449 0 1 Sdia
734
+ 20479 12087 400 1 0 Sdia
735
+ 30466 15168 449 0 1 Sdia
736
+ 30466 15168 400 1 0 Sdia
737
+ 29698 18248 449 0 1 Sdia
738
+ 29698 18248 400 1 0 Sdia
739
+ 20586 21329 449 0 1 Sdia
740
+ 20586 21329 400 1 0 Sdia
741
+ /Slrgb {0.000 0.000 1.000} def
742
+ /Ssrgb {0.000 0.000 1.000} def
743
+ 16081 9007 318 0 1 Scc
744
+ 16081 9007 283 1 0 Scc
745
+ 21797 12087 318 0 1 Scc
746
+ 21797 12087 283 1 0 Scc
747
+ 28143 15168 318 0 1 Scc
748
+ 28143 15168 283 1 0 Scc
749
+ 23338 18248 318 0 1 Scc
750
+ 23338 18248 283 1 0 Scc
751
+ 19590 21329 318 0 1 Scc
752
+ 19590 21329 283 1 0 Scc
753
+ /Slrgb {0.000 0.376 0.000} def
754
+ /Ssrgb {0.000 0.376 0.000} def
755
+ 17253 8689 17889 9325 0 1 Srect
756
+ 17288 8724 17854 9290 1 0 Srect
757
+ 21796 11769 22432 12405 0 1 Srect
758
+ 21831 11804 22397 12370 1 0 Srect
759
+ 26187 14850 26823 15486 0 1 Srect
760
+ 26222 14885 26788 15451 1 0 Srect
761
+ 25822 17930 26458 18566 0 1 Srect
762
+ 25857 17965 26423 18531 1 0 Srect
763
+ 18844 21011 19480 21647 0 1 Srect
764
+ 18879 21046 19445 21612 1 0 Srect
765
+ /Slrgb {1.000 0.498 0.000} def
766
+ /Ssrgb {1.000 0.498 0.000} def
767
+ 15997 9007 447 0 1 Stri
768
+ 15997 9007 377 1 0 Stri
769
+ 23305 12087 447 0 1 Stri
770
+ 23305 12087 377 1 0 Stri
771
+ 24840 15168 447 0 1 Stri
772
+ 24840 15168 377 1 0 Stri
773
+ 24632 18248 447 0 1 Stri
774
+ 24632 18248 377 1 0 Stri
775
+ 18699 21329 447 0 1 Stri
776
+ 18699 21329 377 1 0 Stri
777
+ /Slrgb {0.000 0.000 0.000} def
778
+ /Ssrgb {0.000 0.000 0.000} def
779
+ 16963 9007 318 0 1 Scc
780
+ 16963 9007 283 1 0 Scc
781
+ 24360 12087 318 0 1 Scc
782
+ 24360 12087 283 1 0 Scc
783
+ 27209 15168 318 0 1 Scc
784
+ 27209 15168 283 1 0 Scc
785
+ 24132 18248 318 0 1 Scc
786
+ 24132 18248 283 1 0 Scc
787
+ 19720 21329 318 0 1 Scc
788
+ 19720 21329 283 1 0 Scc
789
+ /Slrgb {0.502 0.000 0.502} def
790
+ /Ssrgb {0.502 0.000 0.502} def
791
+ 17295 9007 257 Scro
792
+ 25889 12087 257 Scro
793
+ 30672 15168 257 Scro
794
+ 25387 18248 257 Scro
795
+ 21981 21329 257 Scro
796
+ /Slw 0.576 def
797
+ /Slrgb {0.000 0.000 0.000} def
798
+ 15486 6031 15486 22457 Sln
799
+ 15324 8696 0
800
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
801
+ (Imm. not a problem) stringwidth pop add
802
+ xratio div
803
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
804
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
805
+ 0.000 889
806
+ (Imm. not a problem) Stxtl
807
+ (Imm. not a problem) stringwidth pop xratio div
808
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
809
+ pop pop pop pop
810
+ 15324 11777 0
811
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
812
+ (Imm. should get benefits soon) stringwidth pop add
813
+ xratio div
814
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
815
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
816
+ 0.000 889
817
+ (Imm. should get benefits soon) Stxtl
818
+ (Imm. should get benefits soon) stringwidth pop xratio div
819
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
820
+ pop pop pop pop
821
+ 15324 14857 0
822
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
823
+ (Imm. allowed to get citiz. soon) stringwidth pop add
824
+ xratio div
825
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
826
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
827
+ 0.000 889
828
+ (Imm. allowed to get citiz. soon) Stxtl
829
+ (Imm. allowed to get citiz. soon) stringwidth pop xratio div
830
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
831
+ pop pop pop pop
832
+ 15324 17938 0
833
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
834
+ (American upon citiz. or before) stringwidth pop add
835
+ xratio div
836
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
837
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
838
+ 0.000 889
839
+ (American upon citiz. or before) Stxtl
840
+ (American upon citiz. or before) stringwidth pop xratio div
841
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
842
+ pop pop pop pop
843
+ 15324 21018 0
844
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
845
+ (Govt. should care about everyone) stringwidth pop add
846
+ xratio div
847
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
848
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
849
+ 0.000 889
850
+ (Govt. should care about everyone) Stxtl
851
+ (Govt. should care about everyone) stringwidth pop xratio div
852
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
853
+ pop pop pop pop
854
+ 15486 6031 31184 6031 Sln
855
+ 16270 6031 16270 5707 Sln
856
+ 16270 4980 0
857
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
858
+ (.2) stringwidth pop add
859
+ 2 div xratio div
860
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
861
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
862
+ 0.000 808
863
+ (.2) Stxtl
864
+ (.2) stringwidth pop xratio div
865
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
866
+ pop pop pop pop
867
+ 20745 6031 20745 5707 Sln
868
+ 20745 4980 0
869
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
870
+ (.4) stringwidth pop add
871
+ 2 div xratio div
872
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
873
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
874
+ 0.000 808
875
+ (.4) Stxtl
876
+ (.4) stringwidth pop xratio div
877
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
878
+ pop pop pop pop
879
+ 25219 6031 25219 5707 Sln
880
+ 25219 4980 0
881
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
882
+ (.6) stringwidth pop add
883
+ 2 div xratio div
884
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
885
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
886
+ 0.000 808
887
+ (.6) Stxtl
888
+ (.6) stringwidth pop xratio div
889
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
890
+ pop pop pop pop
891
+ 29694 6031 29694 5707 Sln
892
+ 29694 4980 0
893
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
894
+ (.8) stringwidth pop add
895
+ 2 div xratio div
896
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
897
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
898
+ 0.000 808
899
+ (.8) Stxtl
900
+ (.8) stringwidth pop xratio div
901
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
902
+ pop pop pop pop
903
+ 23335 4091 0
904
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
905
+ (Share Answering Yes) stringwidth pop add
906
+ 2 div xratio div
907
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
908
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
909
+ 0.000 808
910
+ (Share Answering Yes) Stxtl
911
+ (Share Answering Yes) stringwidth pop xratio div
912
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
913
+ pop pop pop pop
914
+ /Ssrgb {1.000 1.000 1.000} def
915
+ 17512 1094 29159 3408 0 1 Srect
916
+ 17535 1117 29136 3385 1 0 Srect
917
+ /Slw 0.864 def
918
+ /Slrgb {1.000 0.000 0.000} def
919
+ /Ssrgb {1.000 0.000 0.000} def
920
+ 18144 2776 449 0 1 Sdia
921
+ 18144 2776 400 1 0 Sdia
922
+ /Slrgb {0.000 0.000 1.000} def
923
+ /Ssrgb {0.000 0.000 1.000} def
924
+ 21356 2776 318 0 1 Scc
925
+ 21356 2776 283 1 0 Scc
926
+ /Slrgb {0.000 0.376 0.000} def
927
+ /Ssrgb {0.000 0.376 0.000} def
928
+ 25612 2458 26248 3094 0 1 Srect
929
+ 25647 2493 26213 3059 1 0 Srect
930
+ /Slrgb {1.000 0.498 0.000} def
931
+ /Ssrgb {1.000 0.498 0.000} def
932
+ 18144 1806 447 0 1 Stri
933
+ 18144 1806 377 1 0 Stri
934
+ /Slrgb {0.000 0.000 0.000} def
935
+ /Ssrgb {0.000 0.000 0.000} def
936
+ 21356 1806 318 0 1 Scc
937
+ 21356 1806 283 1 0 Scc
938
+ /Slrgb {0.502 0.000 0.502} def
939
+ /Ssrgb {0.502 0.000 0.502} def
940
+ 25930 1806 257 Scro
941
+ 18911 2589 2 copy
942
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
943
+ 0.000 535
944
+ (US) Stxtl
945
+ (US) stringwidth pop xratio div
946
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
947
+ pop pop pop pop
948
+ 22124 2589 2 copy
949
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
950
+ 0.000 535
951
+ (UK) Stxtl
952
+ (UK) stringwidth pop xratio div
953
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
954
+ pop pop pop pop
955
+ 26778 2589 2 copy
956
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
957
+ 0.000 535
958
+ (France) Stxtl
959
+ (France) stringwidth pop xratio div
960
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
961
+ pop pop pop pop
962
+ 18911 1619 2 copy
963
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
964
+ 0.000 535
965
+ (Italy) Stxtl
966
+ (Italy) stringwidth pop xratio div
967
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
968
+ pop pop pop pop
969
+ 22124 1619 2 copy
970
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
971
+ 0.000 535
972
+ (Germany) Stxtl
973
+ (Germany) stringwidth pop xratio div
974
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
975
+ pop pop pop pop
976
+ 26778 1619 2 copy
977
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
978
+ 0.000 535
979
+ (Sweden) Stxtl
980
+ (Sweden) stringwidth pop xratio div
981
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
982
+ pop pop pop pop
983
+ S showpage
984
+ %%EOF
37/replication_package/Out/Figures/Figure_8_B.eps ADDED
@@ -0,0 +1,1012 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %!PS-Adobe-2.0 EPSF-2.0
2
+ %% This is a Stata generated postscript file
3
+ %%BoundingBox: 0 0 396 288
4
+ %%HiResBoundingBox: 0.000 0.000 396.000 288.000
5
+ %%DocumentNeededResources: font Helvetica
6
+ /xratio 0.012375 def
7
+ /yratio 0.012375 def
8
+ /Sbgfill {
9
+ /y1 exch def
10
+ /x1 exch def
11
+ /y0 exch def
12
+ /x0 exch def
13
+ x0 y0 moveto
14
+ x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto
15
+ fill
16
+ } def
17
+ /Spt {
18
+ yratio mul
19
+ /yp exch def
20
+ xratio mul
21
+ /xp exch def
22
+ Slrgb setrgbcolor
23
+ xp yp .5 0 360 arc fill
24
+ } def
25
+ /Sln {
26
+ yratio mul
27
+ /y1p exch def
28
+ xratio mul
29
+ /x1p exch def
30
+ yratio mul
31
+ /y0p exch def
32
+ xratio mul
33
+ /x0p exch def
34
+ Slw setlinewidth
35
+ Slrgb setrgbcolor
36
+ x0p y0p M x1p y1p lineto S
37
+ } def
38
+ /Scrv {
39
+ yratio mul
40
+ /y3p exch def
41
+ xratio mul
42
+ /x3p exch def
43
+ yratio mul
44
+ /y2p exch def
45
+ xratio mul
46
+ /x2p exch def
47
+ yratio mul
48
+ /y1p exch def
49
+ xratio mul
50
+ /x1p exch def
51
+ Slw setlinewidth
52
+ Slrgb setrgbcolor
53
+ x1p y1p x2p y2p x3p y3p curveto
54
+ S
55
+ } def
56
+ /Stxtl {
57
+ /sp exch def
58
+ yratio mul
59
+ /sizep exch def
60
+ dup
61
+ /anglep exch def
62
+ 0 exch sub
63
+ /angle2p exch def
64
+ yratio mul
65
+ /y0p exch def
66
+ xratio mul
67
+ /x0p exch def
68
+ Strgb setrgbcolor
69
+ x0p y0p M anglep rotate sizep fntsize sp show stroke angle2p rotate
70
+ } def
71
+ /Stxtc {
72
+ /sp exch def
73
+ yratio mul
74
+ /sizep exch def
75
+ dup
76
+ /anglep exch def
77
+ 0 exch sub
78
+ /angle2p exch def
79
+ yratio mul
80
+ /y0p exch def
81
+ xratio mul
82
+ /x0p exch def
83
+ Strgb setrgbcolor
84
+ x0p y0p M anglep rotate sizep fntsize sp stringwidth exch -2 div exch rm sp show stroke angle2p rotate
85
+ } def
86
+ /Stxtr {
87
+ /sp exch def
88
+ yratio mul
89
+ /sizep exch def
90
+ dup
91
+ /anglep exch def
92
+ 0 exch sub
93
+ /angle2p exch def
94
+ yratio mul
95
+ /y0p exch def
96
+ xratio mul
97
+ /x0p exch def
98
+ Strgb setrgbcolor
99
+ x0p y0p M anglep rotate sizep fntsize sp stringwidth 1 index -1 mul exch rm pop sp show stroke angle2p rotate
100
+ } def
101
+ /Srect {
102
+ /sfill exch def
103
+ /sstroke exch def
104
+ yratio mul
105
+ /y1 exch def
106
+ xratio mul
107
+ /x1 exch def
108
+ yratio mul
109
+ /y0 exch def
110
+ xratio mul
111
+ /x0 exch def
112
+ newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto x0 y0 lineto closepath
113
+ sfill Sfill
114
+ sstroke Sstroke
115
+ } def
116
+ /Sellipse {
117
+ /sfill exch def
118
+ /sstroke exch def
119
+ yratio mul
120
+ /yrad exch def
121
+ xratio mul
122
+ /xrad exch def
123
+ yratio mul
124
+ /y exch def
125
+ xratio mul
126
+ /x exch def
127
+ /savematrix matrix currentmatrix def
128
+ x y translate
129
+ xrad yrad scale
130
+ 0 0 1 0 360 arc
131
+ savematrix setmatrix
132
+ sfill Sfill
133
+ sstroke Sstroke
134
+ } def
135
+ /Stri {
136
+ /sfill exch def
137
+ /sstroke exch def
138
+ xratio mul
139
+ /r exch def
140
+ yratio mul
141
+ /y0 exch def
142
+ xratio mul
143
+ /x0 exch def
144
+ /xcen x0 def
145
+ y0 r add
146
+ /ytop exch def
147
+ r 2 div
148
+ y0 exch sub
149
+ /ybot exch def
150
+ r 3 sqrt 2 div mul dup
151
+ xcen exch sub
152
+ /xleft exch def
153
+ xcen add
154
+ /xright exch def
155
+ newpath xcen ytop moveto xright ybot lineto xleft ybot lineto xcen ytop lineto closepath
156
+ sfill Sfill
157
+ sstroke Sstroke
158
+ } def
159
+ /Soldtri {
160
+ /sfill exch def
161
+ xratio mul
162
+ /r exch def
163
+ yratio mul
164
+ /y0 exch def
165
+ xratio mul
166
+ /x0 exch def
167
+ x0 r sub
168
+ /x1 exch def
169
+ y0 r sub
170
+ /y1 exch def
171
+ x0 r add
172
+ /x2 exch def
173
+ y0 r sub
174
+ /y2 exch def
175
+ /x3 x0 def
176
+ y0 r add
177
+ /y3 exch def
178
+ newpath x1 y1 moveto x2 y2 lineto x3 y3 lineto x1 y1 lineto closepath
179
+ sfill 1 eq {
180
+ Ssrgb setrgbcolor
181
+ gsave
182
+ fill
183
+ grestore
184
+ } if
185
+ Slw setlinewidth
186
+ Slrgb setrgbcolor
187
+ S
188
+ } def
189
+ /Sdia {
190
+ /sfill exch def
191
+ /sstroke exch def
192
+ xratio mul
193
+ /r exch def
194
+ yratio mul
195
+ /y exch def
196
+ xratio mul
197
+ /x exch def
198
+ x r sub
199
+ /x0 exch def
200
+ /y0 y def
201
+ /x1 x def
202
+ y r sub
203
+ /y1 exch def
204
+ x r add
205
+ /x2 exch def
206
+ /y2 y def
207
+ /x3 x def
208
+ y r add
209
+ /y3 exch def
210
+ newpath x0 y0 moveto x1 y1 lineto x2 y2 lineto x3 y3 lineto closepath
211
+ sfill Sfill
212
+ sstroke Sstroke
213
+ } def
214
+ /Scc {
215
+ /sfill exch def
216
+ /sstroke exch def
217
+ xratio mul
218
+ /r0 exch def
219
+ yratio mul
220
+ /y0 exch def
221
+ xratio mul
222
+ /x0 exch def
223
+ x0 y0 r0 0 360 arc closepath
224
+ sfill Sfill
225
+ sstroke Sstroke
226
+ } def
227
+ /Spie {
228
+ /sfill exch def
229
+ /salign exch def
230
+ /a1 exch def
231
+ /a0 exch def
232
+ xratio mul
233
+ /r exch def
234
+ yratio mul
235
+ /y exch def
236
+ xratio mul
237
+ /x exch def
238
+ /Pie {
239
+ x y moveto x y r a0 a1 arc closepath
240
+ } def
241
+ newpath Pie
242
+ sfill Sfill
243
+ Slrgb setrgbcolor
244
+ salign 0 eq {
245
+ gsave
246
+ Slw 2 mul setlinewidth
247
+ clip
248
+ S
249
+ grestore
250
+ } if
251
+ salign 1 eq {
252
+ Slw setlinewidth
253
+ S
254
+ } if
255
+ salign 2 eq {
256
+ gsave
257
+ Slw 2 mul setlinewidth
258
+ strokepath
259
+ pathbbox
260
+ /ury exch def
261
+ /urx exch def
262
+ /lly exch def
263
+ /llx exch def
264
+ newpath llx lly moveto llx ury lineto urx ury lineto urx lly lineto closepath
265
+ Pie
266
+ eoclip
267
+ newpath Pie
268
+ S
269
+ grestore
270
+ } if
271
+ newpath
272
+ } def
273
+ /Splu {
274
+ xratio mul
275
+ /r exch def
276
+ yratio mul
277
+ /y exch def
278
+ xratio mul
279
+ /x exch def
280
+ x r sub
281
+ /x0 exch def
282
+ x r add
283
+ /x1 exch def
284
+ x0 y M x1 y L
285
+ y r sub
286
+ /y0 exch def
287
+ y r add
288
+ /y1 exch def
289
+ x y0 M x y1 L
290
+ } def
291
+ /Scro {
292
+ xratio mul
293
+ /r exch def
294
+ yratio mul
295
+ /y exch def
296
+ xratio mul
297
+ /x exch def
298
+ x r sub
299
+ /x0 exch def
300
+ y r sub
301
+ /y0 exch def
302
+ x r add
303
+ /x1 exch def
304
+ y r add
305
+ /y1 exch def
306
+ x0 y0 M x1 y1 L
307
+ x r add
308
+ /x0 exch def
309
+ y r sub
310
+ /y0 exch def
311
+ x r sub
312
+ /x1 exch def
313
+ y r add
314
+ /y1 exch def
315
+ x0 y0 M x1 y1 L
316
+ } def
317
+ /Sm {
318
+ yratio mul
319
+ /y exch def
320
+ xratio mul
321
+ /x exch def
322
+ x y M
323
+ } def
324
+ /Sl {
325
+ yratio mul
326
+ /y exch def
327
+ xratio mul
328
+ /x exch def
329
+ x y L
330
+ } def
331
+ /SPl {
332
+ yratio mul
333
+ /y exch def
334
+ xratio mul
335
+ /x exch def
336
+ x y PL
337
+ } def
338
+ /Sarr {
339
+ /sfill exch def
340
+ xratio mul
341
+ /r exch def
342
+ yratio mul
343
+ /y exch def
344
+ xratio mul
345
+ /x exch def
346
+ y r add
347
+ /ytop exch def
348
+ y r sub
349
+ /ybot exch def
350
+ gsave
351
+ Slrgb setrgbcolor
352
+ sfill 0 eq {
353
+ r 2 mul 3 div dup
354
+ x exch sub
355
+ /xleft exch def
356
+ x add
357
+ /xright exch def
358
+ newpath xleft y moveto x ytop lineto xright y lineto x ytop moveto x ybot lineto
359
+ Lcs
360
+ 1 setlinejoin
361
+ } {
362
+ r 2 div dup
363
+ x exch sub
364
+ /xleft exch def
365
+ x add
366
+ /xright exch def
367
+ newpath xleft y moveto x ytop lineto xright y lineto x ytop closepath moveto x ybot lineto
368
+ gsave
369
+ fill
370
+ grestore
371
+ } ifelse
372
+ Slw setlinewidth
373
+ S
374
+ grestore
375
+ } def
376
+ /Spipe {
377
+ xratio mul
378
+ /r exch def
379
+ yratio mul
380
+ /y exch def
381
+ xratio mul
382
+ /x exch def
383
+ y r sub
384
+ /y0 exch def
385
+ y r add
386
+ /y1 exch def
387
+ x y0 M x y1 L
388
+ } def
389
+ /Sv {
390
+ xratio mul
391
+ /r exch def
392
+ yratio mul
393
+ /y0 exch def
394
+ xratio mul
395
+ /x0 exch def
396
+ /xcen x0 def
397
+ y0 r add
398
+ /ytop exch def
399
+ r 2 div
400
+ y0 exch sub
401
+ /ybot exch def
402
+ r 3 sqrt 2 div mul dup
403
+ xcen exch sub
404
+ /xleft exch def
405
+ xcen add
406
+ /xright exch def
407
+ newpath xleft ytop moveto xcen ybot lineto xright ytop lineto
408
+ Slw setlinewidth
409
+ Slrgb setrgbcolor
410
+ S
411
+ } def
412
+ /Lcs {
413
+ currentlinecap
414
+ 1 setlinecap
415
+ } def
416
+ /Lcr {
417
+ setlinecap
418
+ } def
419
+ /Sbp {
420
+ newpath
421
+ } def
422
+ /Sep {
423
+ /sfill exch def
424
+ closepath
425
+ /salign exch def
426
+ Lcs
427
+ salign 0 eq {
428
+ sfill Sfill
429
+ gsave
430
+ Slw 2 mul setlinewidth
431
+ clip
432
+ Slrgb setrgbcolor
433
+ S
434
+ grestore
435
+ } if
436
+ salign 1 eq {
437
+ sfill Sfill
438
+ Slw setlinewidth
439
+ Slrgb setrgbcolor
440
+ S
441
+ } if
442
+ salign 2 eq {
443
+ gsave
444
+ Slw 2 mul setlinewidth
445
+ Slrgb setrgbcolor
446
+ S
447
+ grestore
448
+ sfill Sfill
449
+ } if
450
+ newpath
451
+ Lcr
452
+ } def
453
+ /Sbpa {
454
+ newpath
455
+ } def
456
+ /Sepa {
457
+ Slw setlinewidth
458
+ Slrgb setrgbcolor
459
+ currentlinejoin
460
+ 1 setlinejoin
461
+ S
462
+ setlinejoin
463
+ newpath
464
+ } def
465
+ /Stransrot {
466
+ /anglep exch def
467
+ yratio mul
468
+ /y exch def
469
+ xratio mul
470
+ /x exch def
471
+ x y translate
472
+ anglep rotate
473
+ x neg y neg translate
474
+ } def
475
+ /cp {currentpoint} def
476
+ /M {moveto} def
477
+ /rm {rmoveto} def
478
+ /S {
479
+ Slw 0.000 eq {
480
+ newpath
481
+ } if
482
+ Slw 0.000 ne {
483
+ stroke
484
+ } if
485
+ } def
486
+ /L {Slw setlinewidth Slrgb setrgbcolor lineto Lcs S Lcr} def
487
+ /PL {Slw setlinewidth Slrgb setrgbcolor lineto} def
488
+ /MF-Helvetica {
489
+ /newfontname exch def
490
+ /fontname exch def
491
+ /fontdict fontname findfont def
492
+ /newfont fontdict maxlength dict def
493
+ fontdict {
494
+ exch dup /FID eq {pop pop} {exch newfont 3 1 roll put} ifelse
495
+ } forall
496
+ newfont /FontName newfontname put
497
+ newfont /Encoding ISOLatin1Encoding put
498
+ newfontname newfont definefont pop
499
+ } def
500
+ /Helvetica /Helvetica-0 MF-Helvetica
501
+ /Slw 0.120 def
502
+ 0.918 0.949 0.953 setrgbcolor
503
+ 0 0 396.000 288.000 Sbgfill
504
+ /Sfill {
505
+ /sfill exch def
506
+ sfill 1 eq {
507
+ Ssrgb setrgbcolor
508
+ gsave
509
+ fill
510
+ grestore
511
+ } if
512
+ } def
513
+ /Sstroke {
514
+ /sstroke exch def
515
+ sstroke 1 eq {
516
+ Slw setlinewidth
517
+ Slrgb setrgbcolor
518
+ S
519
+ } if
520
+ newpath
521
+ } def
522
+ /Slrgb {1.000 1.000 1.000} def
523
+ /Strgb {1.000 1.000 1.000} def
524
+ /Ssrgb {1.000 1.000 1.000} def
525
+ /Slw 0.576 def
526
+ 0 0 31999 23272 0 1 Srect
527
+ 23 23 31976 23249 1 0 Srect
528
+ 14310 7485 31184 22457 0 1 Srect
529
+ 14333 7508 31161 22434 1 0 Srect
530
+ /Slrgb {0.000 0.000 0.000} def
531
+ /Strgb {0.000 0.000 0.000} def
532
+ /Slw 0.864 def
533
+ /Slrgb {1.000 1.000 1.000} def
534
+ 14310 10229 31184 10229 Sln
535
+ /Slw 0.576 def
536
+ /Slrgb {0.000 0.000 0.000} def
537
+ /Slw 0.864 def
538
+ /Slrgb {1.000 1.000 1.000} def
539
+ 14310 13019 31184 13019 Sln
540
+ /Slw 0.576 def
541
+ /Slrgb {0.000 0.000 0.000} def
542
+ /Slw 0.864 def
543
+ /Slrgb {1.000 1.000 1.000} def
544
+ 14310 15808 31184 15808 Sln
545
+ /Slw 0.576 def
546
+ /Slrgb {0.000 0.000 0.000} def
547
+ /Slw 0.864 def
548
+ /Slrgb {1.000 1.000 1.000} def
549
+ 14310 18598 31184 18598 Sln
550
+ /Slw 0.576 def
551
+ /Slrgb {0.000 0.000 0.000} def
552
+ /Slw 0.864 def
553
+ /Slrgb {1.000 1.000 1.000} def
554
+ 14310 21388 31184 21388 Sln
555
+ /Slw 0.576 def
556
+ /Slrgb {0.000 0.000 0.000} def
557
+ /Slw 0.864 def
558
+ /Slrgb {0.878 0.878 0.878} def
559
+ 14310 10229 14636 10229 Sln
560
+ 14775 10229 15101 10229 Sln
561
+ 15240 10229 15566 10229 Sln
562
+ 15706 10229 16032 10229 Sln
563
+ 16171 10229 16497 10229 Sln
564
+ 16636 10229 16962 10229 Sln
565
+ 17101 10229 17427 10229 Sln
566
+ 17567 10229 17892 10229 Sln
567
+ 18032 10229 18358 10229 Sln
568
+ 18497 10229 18823 10229 Sln
569
+ 18962 10229 19288 10229 Sln
570
+ 19427 10229 19753 10229 Sln
571
+ 19893 10229 20219 10229 Sln
572
+ 20358 10229 20684 10229 Sln
573
+ 20823 10229 21149 10229 Sln
574
+ 21288 10229 21614 10229 Sln
575
+ 21754 10229 22080 10229 Sln
576
+ 22219 10229 22545 10229 Sln
577
+ 22684 10229 23010 10229 Sln
578
+ 23149 10229 23475 10229 Sln
579
+ 23615 10229 23940 10229 Sln
580
+ 24080 10229 24406 10229 Sln
581
+ 24545 10229 24871 10229 Sln
582
+ 25010 10229 25336 10229 Sln
583
+ 25475 10229 25801 10229 Sln
584
+ 25941 10229 26267 10229 Sln
585
+ 26406 10229 26732 10229 Sln
586
+ 26871 10229 27197 10229 Sln
587
+ 27336 10229 27662 10229 Sln
588
+ 27802 10229 28128 10229 Sln
589
+ 28267 10229 28593 10229 Sln
590
+ 28732 10229 29058 10229 Sln
591
+ 29197 10229 29523 10229 Sln
592
+ 29663 10229 29988 10229 Sln
593
+ 30128 10229 30454 10229 Sln
594
+ 30593 10229 30919 10229 Sln
595
+ 31058 10229 31184 10229 Sln
596
+ 14310 13019 14636 13019 Sln
597
+ 14775 13019 15101 13019 Sln
598
+ 15240 13019 15566 13019 Sln
599
+ 15706 13019 16032 13019 Sln
600
+ 16171 13019 16497 13019 Sln
601
+ 16636 13019 16962 13019 Sln
602
+ 17101 13019 17427 13019 Sln
603
+ 17567 13019 17892 13019 Sln
604
+ 18032 13019 18358 13019 Sln
605
+ 18497 13019 18823 13019 Sln
606
+ 18962 13019 19288 13019 Sln
607
+ 19427 13019 19753 13019 Sln
608
+ 19893 13019 20219 13019 Sln
609
+ 20358 13019 20684 13019 Sln
610
+ 20823 13019 21149 13019 Sln
611
+ 21288 13019 21614 13019 Sln
612
+ 21754 13019 22080 13019 Sln
613
+ 22219 13019 22545 13019 Sln
614
+ 22684 13019 23010 13019 Sln
615
+ 23149 13019 23475 13019 Sln
616
+ 23615 13019 23940 13019 Sln
617
+ 24080 13019 24406 13019 Sln
618
+ 24545 13019 24871 13019 Sln
619
+ 25010 13019 25336 13019 Sln
620
+ 25475 13019 25801 13019 Sln
621
+ 25941 13019 26267 13019 Sln
622
+ 26406 13019 26732 13019 Sln
623
+ 26871 13019 27197 13019 Sln
624
+ 27336 13019 27662 13019 Sln
625
+ 27802 13019 28128 13019 Sln
626
+ 28267 13019 28593 13019 Sln
627
+ 28732 13019 29058 13019 Sln
628
+ 29197 13019 29523 13019 Sln
629
+ 29663 13019 29988 13019 Sln
630
+ 30128 13019 30454 13019 Sln
631
+ 30593 13019 30919 13019 Sln
632
+ 31058 13019 31184 13019 Sln
633
+ 14310 15808 14636 15808 Sln
634
+ 14775 15808 15101 15808 Sln
635
+ 15240 15808 15566 15808 Sln
636
+ 15706 15808 16032 15808 Sln
637
+ 16171 15808 16497 15808 Sln
638
+ 16636 15808 16962 15808 Sln
639
+ 17101 15808 17427 15808 Sln
640
+ 17567 15808 17892 15808 Sln
641
+ 18032 15808 18358 15808 Sln
642
+ 18497 15808 18823 15808 Sln
643
+ 18962 15808 19288 15808 Sln
644
+ 19427 15808 19753 15808 Sln
645
+ 19893 15808 20219 15808 Sln
646
+ 20358 15808 20684 15808 Sln
647
+ 20823 15808 21149 15808 Sln
648
+ 21288 15808 21614 15808 Sln
649
+ 21754 15808 22080 15808 Sln
650
+ 22219 15808 22545 15808 Sln
651
+ 22684 15808 23010 15808 Sln
652
+ 23149 15808 23475 15808 Sln
653
+ 23615 15808 23940 15808 Sln
654
+ 24080 15808 24406 15808 Sln
655
+ 24545 15808 24871 15808 Sln
656
+ 25010 15808 25336 15808 Sln
657
+ 25475 15808 25801 15808 Sln
658
+ 25941 15808 26267 15808 Sln
659
+ 26406 15808 26732 15808 Sln
660
+ 26871 15808 27197 15808 Sln
661
+ 27336 15808 27662 15808 Sln
662
+ 27802 15808 28128 15808 Sln
663
+ 28267 15808 28593 15808 Sln
664
+ 28732 15808 29058 15808 Sln
665
+ 29197 15808 29523 15808 Sln
666
+ 29663 15808 29988 15808 Sln
667
+ 30128 15808 30454 15808 Sln
668
+ 30593 15808 30919 15808 Sln
669
+ 31058 15808 31184 15808 Sln
670
+ 14310 18598 14636 18598 Sln
671
+ 14775 18598 15101 18598 Sln
672
+ 15240 18598 15566 18598 Sln
673
+ 15706 18598 16032 18598 Sln
674
+ 16171 18598 16497 18598 Sln
675
+ 16636 18598 16962 18598 Sln
676
+ 17101 18598 17427 18598 Sln
677
+ 17567 18598 17892 18598 Sln
678
+ 18032 18598 18358 18598 Sln
679
+ 18497 18598 18823 18598 Sln
680
+ 18962 18598 19288 18598 Sln
681
+ 19427 18598 19753 18598 Sln
682
+ 19893 18598 20219 18598 Sln
683
+ 20358 18598 20684 18598 Sln
684
+ 20823 18598 21149 18598 Sln
685
+ 21288 18598 21614 18598 Sln
686
+ 21754 18598 22080 18598 Sln
687
+ 22219 18598 22545 18598 Sln
688
+ 22684 18598 23010 18598 Sln
689
+ 23149 18598 23475 18598 Sln
690
+ 23615 18598 23940 18598 Sln
691
+ 24080 18598 24406 18598 Sln
692
+ 24545 18598 24871 18598 Sln
693
+ 25010 18598 25336 18598 Sln
694
+ 25475 18598 25801 18598 Sln
695
+ 25941 18598 26267 18598 Sln
696
+ 26406 18598 26732 18598 Sln
697
+ 26871 18598 27197 18598 Sln
698
+ 27336 18598 27662 18598 Sln
699
+ 27802 18598 28128 18598 Sln
700
+ 28267 18598 28593 18598 Sln
701
+ 28732 18598 29058 18598 Sln
702
+ 29197 18598 29523 18598 Sln
703
+ 29663 18598 29988 18598 Sln
704
+ 30128 18598 30454 18598 Sln
705
+ 30593 18598 30919 18598 Sln
706
+ 31058 18598 31184 18598 Sln
707
+ 14310 21388 14636 21388 Sln
708
+ 14775 21388 15101 21388 Sln
709
+ 15240 21388 15566 21388 Sln
710
+ 15706 21388 16032 21388 Sln
711
+ 16171 21388 16497 21388 Sln
712
+ 16636 21388 16962 21388 Sln
713
+ 17101 21388 17427 21388 Sln
714
+ 17567 21388 17892 21388 Sln
715
+ 18032 21388 18358 21388 Sln
716
+ 18497 21388 18823 21388 Sln
717
+ 18962 21388 19288 21388 Sln
718
+ 19427 21388 19753 21388 Sln
719
+ 19893 21388 20219 21388 Sln
720
+ 20358 21388 20684 21388 Sln
721
+ 20823 21388 21149 21388 Sln
722
+ 21288 21388 21614 21388 Sln
723
+ 21754 21388 22080 21388 Sln
724
+ 22219 21388 22545 21388 Sln
725
+ 22684 21388 23010 21388 Sln
726
+ 23149 21388 23475 21388 Sln
727
+ 23615 21388 23940 21388 Sln
728
+ 24080 21388 24406 21388 Sln
729
+ 24545 21388 24871 21388 Sln
730
+ 25010 21388 25336 21388 Sln
731
+ 25475 21388 25801 21388 Sln
732
+ 25941 21388 26267 21388 Sln
733
+ 26406 21388 26732 21388 Sln
734
+ 26871 21388 27197 21388 Sln
735
+ 27336 21388 27662 21388 Sln
736
+ 27802 21388 28128 21388 Sln
737
+ 28267 21388 28593 21388 Sln
738
+ 28732 21388 29058 21388 Sln
739
+ 29197 21388 29523 21388 Sln
740
+ 29663 21388 29988 21388 Sln
741
+ 30128 21388 30454 21388 Sln
742
+ 30593 21388 30919 21388 Sln
743
+ 31058 21388 31184 21388 Sln
744
+ /Slrgb {0.510 0.753 0.914} def
745
+ /Ssrgb {0.510 0.753 0.914} def
746
+ 20210 9910 20846 10546 0 1 Srect
747
+ 20245 9945 20811 10511 1 0 Srect
748
+ 25831 12700 26467 13336 0 1 Srect
749
+ 25866 12735 26432 13301 1 0 Srect
750
+ 30354 15490 30990 16126 0 1 Srect
751
+ 30389 15525 30955 16091 1 0 Srect
752
+ 27936 18279 28572 18915 0 1 Srect
753
+ 27971 18314 28537 18880 1 0 Srect
754
+ 22908 21069 23544 21705 0 1 Srect
755
+ 22943 21104 23509 21670 1 0 Srect
756
+ /Slrgb {0.565 0.208 0.231} def
757
+ /Ssrgb {0.565 0.208 0.231} def
758
+ 15375 10228 449 0 1 Sdia
759
+ 15375 10228 400 1 0 Sdia
760
+ 20527 13018 449 0 1 Sdia
761
+ 20527 13018 400 1 0 Sdia
762
+ 26698 15808 449 0 1 Sdia
763
+ 26698 15808 400 1 0 Sdia
764
+ 24667 18597 449 0 1 Sdia
765
+ 24667 18597 400 1 0 Sdia
766
+ 17760 21387 449 0 1 Sdia
767
+ 17760 21387 400 1 0 Sdia
768
+ /Slrgb {0.000 0.376 0.000} def
769
+ /Ssrgb {0.000 0.376 0.000} def
770
+ 20024 10228 318 0 1 Scc
771
+ 20024 10228 283 1 0 Scc
772
+ 24665 13018 318 0 1 Scc
773
+ 24665 13018 283 1 0 Scc
774
+ 30021 15808 318 0 1 Scc
775
+ 30021 15808 283 1 0 Scc
776
+ 28236 18597 318 0 1 Scc
777
+ 28236 18597 283 1 0 Scc
778
+ 21801 21387 318 0 1 Scc
779
+ 21801 21387 283 1 0 Scc
780
+ /Slrgb {0.769 0.769 0.000} def
781
+ /Ssrgb {0.769 0.769 0.000} def
782
+ 16990 10228 447 0 1 Stri
783
+ 16990 10228 377 1 0 Stri
784
+ 23143 13018 447 0 1 Stri
785
+ 23143 13018 377 1 0 Stri
786
+ 28109 15808 447 0 1 Stri
787
+ 28109 15808 377 1 0 Stri
788
+ 25597 18597 447 0 1 Stri
789
+ 25597 18597 377 1 0 Stri
790
+ 19974 21387 447 0 1 Stri
791
+ 19974 21387 377 1 0 Stri
792
+ /Slw 1.296 def
793
+ /Slrgb {1.000 0.498 0.000} def
794
+ /Ssrgb {1.000 0.498 0.000} def
795
+ 16095 10228 364 Splu
796
+ 22878 13018 364 Splu
797
+ 27380 15808 364 Splu
798
+ 25077 18597 364 Splu
799
+ 19110 21387 364 Splu
800
+ /Slrgb {0.000 0.000 0.000} def
801
+ /Ssrgb {0.000 0.000 0.000} def
802
+ 19660 10228 400 Scro
803
+ 25303 13018 400 Scro
804
+ 30415 15808 400 Scro
805
+ 28263 18597 400 Scro
806
+ 21963 21387 400 Scro
807
+ /Slrgb {0.102 0.278 0.435} def
808
+ /Ssrgb {0.102 0.278 0.435} def
809
+ 19047 10228 364 Spipe
810
+ 23727 13018 364 Spipe
811
+ 29292 15808 364 Spipe
812
+ 27074 18597 364 Spipe
813
+ 21290 21387 364 Spipe
814
+ /Slw 0.576 def
815
+ /Slrgb {0.000 0.000 0.000} def
816
+ 14310 7485 14310 22457 Sln
817
+ 14148 9918 0
818
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
819
+ (Imm. not a problem) stringwidth pop add
820
+ xratio div
821
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
822
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
823
+ 0.000 889
824
+ (Imm. not a problem) Stxtl
825
+ (Imm. not a problem) stringwidth pop xratio div
826
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
827
+ pop pop pop pop
828
+ 14148 12708 0
829
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
830
+ (Imm. should get benefits soon) stringwidth pop add
831
+ xratio div
832
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
833
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
834
+ 0.000 889
835
+ (Imm. should get benefits soon) Stxtl
836
+ (Imm. should get benefits soon) stringwidth pop xratio div
837
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
838
+ pop pop pop pop
839
+ 14148 15497 0
840
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
841
+ (Imm. allowed to get citiz. soon) stringwidth pop add
842
+ xratio div
843
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
844
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
845
+ 0.000 889
846
+ (Imm. allowed to get citiz. soon) Stxtl
847
+ (Imm. allowed to get citiz. soon) stringwidth pop xratio div
848
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
849
+ pop pop pop pop
850
+ 14148 18287 0
851
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
852
+ (American upon citiz. or before) stringwidth pop add
853
+ xratio div
854
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
855
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
856
+ 0.000 889
857
+ (American upon citiz. or before) Stxtl
858
+ (American upon citiz. or before) stringwidth pop xratio div
859
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
860
+ pop pop pop pop
861
+ 14148 21077 0
862
+ /Helvetica-0 findfont 889 yratio mul scalefont setfont
863
+ (Govt. should care about everyone) stringwidth pop add
864
+ xratio div
865
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
866
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
867
+ 0.000 889
868
+ (Govt. should care about everyone) Stxtl
869
+ (Govt. should care about everyone) stringwidth pop xratio div
870
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
871
+ pop pop pop pop
872
+ 14310 7485 31184 7485 Sln
873
+ 14822 7485 14822 7162 Sln
874
+ 14822 6434 0
875
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
876
+ (.1) stringwidth pop add
877
+ 2 div xratio div
878
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
879
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
880
+ 0.000 808
881
+ (.1) Stxtl
882
+ (.1) stringwidth pop xratio div
883
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
884
+ pop pop pop pop
885
+ 19418 7485 19418 7162 Sln
886
+ 19418 6434 0
887
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
888
+ (.3) stringwidth pop add
889
+ 2 div xratio div
890
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
891
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
892
+ 0.000 808
893
+ (.3) Stxtl
894
+ (.3) stringwidth pop xratio div
895
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
896
+ pop pop pop pop
897
+ 24015 7485 24015 7162 Sln
898
+ 24015 6434 0
899
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
900
+ (.5) stringwidth pop add
901
+ 2 div xratio div
902
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
903
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
904
+ 0.000 808
905
+ (.5) Stxtl
906
+ (.5) stringwidth pop xratio div
907
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
908
+ pop pop pop pop
909
+ 28611 7485 28611 7162 Sln
910
+ 28611 6434 0
911
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
912
+ (.7) stringwidth pop add
913
+ 2 div xratio div
914
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
915
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
916
+ 0.000 808
917
+ (.7) Stxtl
918
+ (.7) stringwidth pop xratio div
919
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
920
+ pop pop pop pop
921
+ 22747 5545 0
922
+ /Helvetica-0 findfont 808 yratio mul scalefont setfont
923
+ (Share Answering Yes) stringwidth pop add
924
+ 2 div xratio div
925
+ dup 4 3 roll exch 0.000 cos mul sub 3 1 roll 0.000 sin mul sub 2 copy
926
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
927
+ 0.000 808
928
+ (Share Answering Yes) Stxtl
929
+ (Share Answering Yes) stringwidth pop xratio div
930
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
931
+ pop pop pop pop
932
+ /Ssrgb {1.000 1.000 1.000} def
933
+ 14589 1094 30905 4863 0 1 Srect
934
+ 14612 1117 30882 4840 1 0 Srect
935
+ /Slw 0.864 def
936
+ /Slrgb {0.510 0.753 0.914} def
937
+ /Ssrgb {0.510 0.753 0.914} def
938
+ 14953 3913 15589 4549 0 1 Srect
939
+ 14988 3948 15554 4514 1 0 Srect
940
+ /Slrgb {0.565 0.208 0.231} def
941
+ /Ssrgb {0.565 0.208 0.231} def
942
+ 19843 4231 449 0 1 Sdia
943
+ 19843 4231 400 1 0 Sdia
944
+ /Slrgb {0.000 0.376 0.000} def
945
+ /Ssrgb {0.000 0.376 0.000} def
946
+ 26210 4231 318 0 1 Scc
947
+ 26210 4231 283 1 0 Scc
948
+ /Slrgb {0.769 0.769 0.000} def
949
+ /Ssrgb {0.769 0.769 0.000} def
950
+ 15271 3059 447 0 1 Stri
951
+ 15271 3059 377 1 0 Stri
952
+ /Slw 1.296 def
953
+ /Slrgb {1.000 0.498 0.000} def
954
+ /Ssrgb {1.000 0.498 0.000} def
955
+ 19843 3059 364 Splu
956
+ /Slrgb {0.000 0.000 0.000} def
957
+ /Ssrgb {0.000 0.000 0.000} def
958
+ 26210 3059 400 Scro
959
+ /Slrgb {0.102 0.278 0.435} def
960
+ /Ssrgb {0.102 0.278 0.435} def
961
+ 15271 1806 364 Spipe
962
+ 16046 4052 2 copy
963
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
964
+ 0.000 512
965
+ (Left-Wing) Stxtl
966
+ (Left-Wing) stringwidth pop xratio div
967
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
968
+ pop pop pop pop
969
+ 20619 4052 2 copy
970
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
971
+ 0.000 512
972
+ (Right-Wing) Stxtl
973
+ (Right-Wing) stringwidth pop xratio div
974
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
975
+ pop pop pop pop
976
+ 27171 4052 2 copy
977
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
978
+ 0.000 512
979
+ (College) Stxtl
980
+ (College) stringwidth pop xratio div
981
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
982
+ pop pop pop pop
983
+ 16046 2880 2 copy
984
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
985
+ 0.000 512
986
+ (No College) Stxtl
987
+ (No College) stringwidth pop xratio div
988
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
989
+ pop pop pop pop
990
+ 20619 2880 2 copy
991
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
992
+ 0.000 512
993
+ (H Imm, No college) Stxtl
994
+ (H Imm, No college) stringwidth pop xratio div
995
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
996
+ pop pop pop pop
997
+ 27171 2880 2 copy
998
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
999
+ 0.000 512
1000
+ (H Imm, College) Stxtl
1001
+ (H Imm, College) stringwidth pop xratio div
1002
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
1003
+ pop pop pop pop
1004
+ 16046 1627 2 copy
1005
+ /fntsize {/Helvetica-0 findfont exch scalefont setfont } def
1006
+ 0.000 512
1007
+ (No H Imm) Stxtl
1008
+ (No H Imm) stringwidth pop xratio div
1009
+ dup 4 3 roll exch 0.000 cos mul add 3 1 roll 0.000 sin mul add 2 copy
1010
+ pop pop pop pop
1011
+ S showpage
1012
+ %%EOF
37/replication_package/Out/Figures/Figure_9.png ADDED

Git LFS Details

  • SHA256: 9010e77799b02b5adbafe6216cabd38ade2b998d77e4b6ae7de1113e2e1606e8
  • Pointer size: 131 Bytes
  • Size of remote file: 129 kB
37/replication_package/Out/Figures_data/figure_2_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd4087f539d8e489e474a36d37af83927ddd0ffbba4f420bbe8fc8db20fe1b46
3
+ size 796
37/replication_package/Out/Figures_data/figure_2_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1030d3d29f95f753e565d178fc302ad791a2d214966f90dbe7c0a1023e949d09
3
+ size 1323
37/replication_package/Out/Figures_data/figure_3_a_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69667da753d97d3eff35c7b40d71b8574b8489d1a43c41c1c06abc60425c18b7
3
+ size 788
37/replication_package/Out/Figures_data/figure_3_a_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4687ee4bf802f5a63b5087f1bf9b390238a93a05257141e00d087d2c057f2ce
3
+ size 1299
37/replication_package/Out/Figures_data/figure_3_b_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dde8e196e7d45c5029603b3a057c88bc1c47564a5e87400da2b845f43b1bcaf2
3
+ size 789
37/replication_package/Out/Figures_data/figure_3_b_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60b8ec421e56b23b86a5a01aa2255e1682230020a3fb3c3b017468626c3c9ba4
3
+ size 1335
37/replication_package/Out/Figures_data/figure_4_a_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2bb8a6c3930f2ddf615ec577460145df533b71c43fc1b1e1d08bbb2c66ddaca5
3
+ size 1166
37/replication_package/Out/Figures_data/figure_4_a_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6db5373b60bc04518319a25f028c8bcc47462e51fda65cb8e1af9643b410a79
3
+ size 2056
37/replication_package/Out/Figures_data/figure_4_b_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e2a2cf523dc741038b9708b118b82e74cc1413458b3881e3d3e83158dd76579
3
+ size 1106
37/replication_package/Out/Figures_data/figure_4_b_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95bb5ead4e422fe00114df0e74cff355b0451713a045c0c9aff3d97ee8ff26ed
3
+ size 2003
37/replication_package/Out/Figures_data/figure_5_a_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72905b29247b82d4460e10cd9da441c660f6c9f76a9390e3232e61bac13cf37f
3
+ size 797
37/replication_package/Out/Figures_data/figure_5_a_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db7eaf13651c0674400d9248ea00d0b19c537dc7110a29737ad9cf5b9da8238b
3
+ size 1296
37/replication_package/Out/Figures_data/figure_5_b_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b97095d6730b73717268f0dffc4a45d8aec354a5295d2394b66536eee60bfe32
3
+ size 802
37/replication_package/Out/Figures_data/figure_5_b_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4356043377052e96517881be34d0d06e2e32b1029b3f8604e2634592f23313c7
3
+ size 1298
37/replication_package/Out/Figures_data/figure_6_a_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68c36f6af057a69c9e8c0a28e31f81bdac67cce5264e6ac604cf8ba7d8a3aefd
3
+ size 762
37/replication_package/Out/Figures_data/figure_6_a_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95993d8557189c6c0a2bb6c097b9d4d14a67ba403fe9a69cc9f327701c1ffd8a
3
+ size 1297
37/replication_package/Out/Figures_data/figure_6_b_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a57382fc11acb2acdb1dd84ca31da357e659f8e596aff894d18868e712b719b9
3
+ size 761
37/replication_package/Out/Figures_data/figure_6_b_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0157efb894dfa858d04b6f8b77fb362d243814ddaf2b012ac60d23a1b860503
3
+ size 1292
37/replication_package/Out/Figures_data/figure_7_l_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2426af609319a5974735255146cabcb85ac469b00eb78e1112214f32f22961cc
3
+ size 1091
37/replication_package/Out/Figures_data/figure_7_r_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d2e8c7e85cf06e06d1810196719086f0e32a1a4ba5b21b25c179a9e7384aa02
3
+ size 2011
37/replication_package/Out/Figures_data/figure_9_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57c3d5d52419a944962c17b7118700c8b1a40a37f0539384d67e16af74f1e754
3
+ size 875
37/replication_package/Out/Tables/corr_matrix.tex ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ \begin{tabular}{lcccccccccc}
2
+ & \multicolumn{8}{l}{\textbf{Panel A: Correlation of Perceived Immigrants Characteristics with Actual Immigrants Characteristics}} \\
3
+ & Share of & Imm. from Latin & Imm. from & Imm. from & Imm. from & Unemployment & No High & College-educated & Poverty & Muslim \\
4
+ & Immigrants & America & Africa & Asia & Europe & Imm. & School Imm. & Imm. & Imm. & Imm. \\
5
+ & (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) \\ \hline
6
+ \addlinespace
7
+ Local correlation& 0.203\sym{***}& 0.0859\sym{***}& 0.155\sym{***}& 0.139\sym{***}& 0.155\sym{***}& 0.585\sym{***}& 0.0718 & 0.0600 \\
8
+ & (0.0453) & (0.0303) & (0.0566) & (0.0295) & (0.0280) & (0.147) & (0.0545) & (0.0457) \\
9
+ \addlinespace
10
+ 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{***}\\
11
+ & (0.118) & (0.0146) & (0.0171) & (0.0207) & (0.0146) & (0.0743) & (0.0327) & (0.0225) & (0.0502) & (0.0236) \\
12
+ \\ & \multicolumn{10}{l}{\textbf{Panel B: Correlation of Perceived Immigrants Characteristics with Actual Non-immigrants Characteristics}} \\
13
+ & Unemployment & No High & College-educated & Poverty \\
14
+ & Imm. & School Imm. & Imm. & Imm. \\
15
+ & (1) & (2) & (3) & (4) \\ \hline
16
+ \addlinespace
17
+ Local correlation& 0.896\sym{***}& 0.110 & 0.0974\sym{**} & 0.440\sym{***}\\
18
+ & (0.132) & (0.0858) & (0.0418) & (0.0711) \\
19
+ \addlinespace
20
+ National correlation& 1.503\sym{***}& 0.486\sym{***}& 0.640\sym{***}& 0.0376 \\
21
+ & (0.142) & (0.0403) & (0.0351) & (0.132) \\
22
+ \\ & \multicolumn{10}{l}{\textbf{Panel C: Correlation of Perceived Immigrants Characteristics with Actual Immigrants - Non-immigrants Differences}} \\
23
+ & Unemployment & No High & College-educated & Poverty \\
24
+ & Imm. & School Imm. & Imm. & Imm. \\
25
+ & (1) & (2) & (3) & (4) \\ \hline
26
+ \addlinespace
27
+ Local correlation& -0.468\sym{***}& 0.0354 & -0.0413 \\
28
+ & (0.142) & (0.0660) & (0.0433) \\
29
+ \addlinespace
30
+ National correlation& 1.287\sym{***}& 0.768\sym{***}& 0.256\sym{***}& 0.438\sym{***}\\
31
+ & (0.106) & (0.0443) & (0.0477) & (0.0582) \\
32
+ \\ & \multicolumn{10}{l}{\textbf{Panel D: Correlation of Perceived Non-immigrants Characteristics with Actual Non-immigrants Characteristics}} \\
33
+ & Unemployment & No High & College-educated & Poverty \\
34
+ & Nat. & School Nat. & Nat. & Nat. \\
35
+ & (1) & (2) & (3) & (4) \\ \hline
36
+ \addlinespace
37
+ Local correlation& 0.782\sym{***}& 0.232\sym{***}& 0.0692\sym{*} & 0.350\sym{***}\\
38
+ & (0.104) & (0.0821) & (0.0419) & (0.0614) \\
39
+ \addlinespace
40
+ National correlation& 1.941\sym{***}& 0.535\sym{***}& 0.160\sym{***}& -0.462\sym{***}\\
41
+ & (0.112) & (0.0386) & (0.0384) & (0.113) \\
42
+ \hline \end{tabular}
37/replication_package/Out/Tables/summary_stats_sample_by_country_final.tex ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ \begin{tabular}{lcccccccccccc}
2
+ \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}\\
3
+ \hline & Sample & Pop & Sample & Pop & Sample & Pop & Sample & Pop & Sample & Pop & Sample & Pop\\
4
+ & (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12)\\
5
+ \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\\
6
+ 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\\
7
+ 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\\
8
+ 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\\
9
+ 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\\
10
+ 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\\
11
+ 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\\
12
+ 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\\
13
+ 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\\
14
+ 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\\
15
+ 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\\
16
+ 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\\
17
+ 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\\
18
+ 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\\
19
+ \noalign{\smallskip}\hline\end{tabular}\\
37/replication_package/Out/Tables/table_1stage.tex ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ \begin{tabular}{lccccccc}
2
+ & All & Accurate Perception & M. East and & N. America, W. and & Muslim & Christian & Lack of Effort \\
3
+ & Immigrants & All Immigrants & N. Africa & E. Europe & & & Reason Poor \\
4
+ & (misp.) & & (misp.) & (misp.) & (misp.) & (misp.) & \\
5
+ & (1) & (2) & (3) & (4) & (5) & (6) & (7) \\ \hline
6
+ \addlinespace
7
+ T: Share of Immigrants& -4.864\sym{***}& 0.227\sym{***}& -0.248 & 0.173 & 0.00857 & 0.144 & 0.000297 \\
8
+ & (0.411) &(0.00691) & (0.313) & (0.357) & (0.419) & (0.397) &(0.00921) \\
9
+ \addlinespace
10
+ T: Origin of Immigrants& 2.315\sym{***}& 0.00251 & -4.794\sym{***}& 1.827\sym{***}& -1.829\sym{***}& 2.456\sym{***}&-0.000234 \\
11
+ & (0.426) &(0.00411) & (0.295) & (0.356) & (0.405) & (0.397) &(0.00925) \\
12
+ \addlinespace
13
+ T: Hard Work & 0.709\sym{*} & -0.00420 & -0.385 & 0.378 & -0.869\sym{**} & 0.796\sym{**} & -0.0535\sym{***}\\
14
+ & (0.409) &(0.00396) & (0.308) & (0.352) & (0.404) & (0.393) &(0.00899) \\
15
+ \addlinespace
16
+ Observations & 19735 & 19735 & 19747 & 19728 & 19761 & 19757 & 19721 \\
17
+ Control mean & 17.02 & 0.04 & 12.60 & -5.56 & 11.30 & -23.98 & 0.36 \\
18
+ \hline \end{tabular}