Explaining Attitudes Towards Immigration: The Role of Economic Factors

In this article, we investigate the determinants of individuals’ opinions concerning the economic impact of immigrants. Unlike most previous studies, we use a large sample of 61 countries (Joint WVS/EVS 2017–2020 dataset) that are either net receivers or net emitters of migrants. Using a multilevel model, we test the effect of individuals’ characteristics and of several macroeconomic variables on the assessment of immigrants’ impact on development. We highlight that natives’ evaluation of the economic consequences of immigration is more influenced by age, trust, education, and income than by contextual variables such as growth, inflation, inequalities, income level, or number of immigrants in the country. Our results match with the hypothesis that immigrants are considered substitutes for low‐ and medium‐skilled workers in capital‐abundant countries. However, neither labour‐market nor welfare‐state considerations can be considered as the main drivers of the appraisals made about the economic impact of immigration. Our results tend to confirm the prediction that greater contact with immigrants reduces anti‐immigrant opinions, in particular for skilled people. In contrast, immi‐ grant inflows lead low‐ and medium‐skilled people to make worse judgments concerning the economic consequences of immigration. All in all, our results validate the view that education comprises a major part of the cognitive assessment of the role played by immigrants in the economy, at least in high‐income countries.


Introduction
In the last few decades, politicians' standpoints on immigration policies have played a central role in election debates. In practice, immigration policy has proven to be influenced more by interest groups (Facchini & Mayda, 2008 than by public opinion towards immigration (Arregui & Creighton, 2018;Sides & Citrin, 2007). However, the position taken by candidates regarding immigration policy during campaigns is capable of influencing votes significantly (Hatton, 2021). Since attitudes partly reflect objective threats but also perceived threats (Kusow & DeLisi, 2020), there is no need to say that the narratives of far-right parties may increase negative atti-tudes towards some specific groups and, in particular, immigrants, undermining social trust and making the success of integration policies and the potential for social cohesion more unlikely. The topic is also timely because the functioning of democracy is changing considerably due to the abundant sources of information that substantially modify how individuals perceive reality and build their knowledge (Dahlgren, 2018). Even though immigration has been proven to have only small or negligible effects on the wages of native-born workers (Ottaviano & Peri, 2012), and to have a minimal or negligible impact on public finances (Dustmann et al., 2010;Nyman & Ahlskog, 2018), the perceived threat of competition for material resources may well influence native workers' opinions. Therefore, the success of immigration policies may well depend on our understanding of the elements shaping these individuals' attitudes.
The literature on attitudes towards immigration has focused on different theories. On the one hand, the group-threat theory posits that exposure to a higher proportion of ethnic outgroups (including immigrant populations) may lead individuals to increasingly perceive individuals from out-groups as a threat (Blalock, 1967). Furthermore, prejudice as a sense of group position would be primarily derived from feelings, and is therefore subjective in nature (Blumer, 1958). On the other hand, intergroup theory argues that interaction with immigrants could improve intergroup attitudes under "optimal conditions" (Allport, 1954). In contrast, the political economy approach explains attitudes toward immigration about individual personal economic interest. However, these attitudes may be connected to the perception of the economic, social, and cultural impact of immigration on the nation as a whole more than on the expected effect on the individual (Hainmueller & Hopkins, 2014).
The purpose of this study is to outline how the context of countries interplays with individuals' characteristics to explain whether they perceive immigrants as beneficial for the development of their country. To this end, we focus on a large and heterogeneous sample of 61 countries from the Joint WVS/EVS 2017-2021 dataset, unlike most studies, which focus only on developed countries (with the recent exception of Cooray et al., 2018, who investigates the "taste for discrimination" in 53 countries). Thanks to a multilevel approach, we investigate the effect of both individual-and country-level variables on individuals' attitudes towards immigrants. We focus on the relationship between these beliefs and macroeconomic contexts such as wealth, size of the migrant population (stock), the recent entry or exit of migrants (flows), and inequality level, a question mainly overlooked by the literature. To bring new elements into the understanding of cognitive mechanisms that translate macro-level appraisal into individual perceptions, we investigate whether education and personal income influence these attitudes in a different manner, depending on macro-economic contexts.
Among our most important results, we find that people's appreciation of the consequences of immigration for economic development is more closely related to age, trust, education, and income than to other socioeconomic characteristics. Our results tend to confirm the view that labour-market considerations cannot be considered the main drivers of the assessment of immigrants' economic impact, and neither do we find clear evidence that the impact on the welfare state influences these views. Contextual variables have no influence per se, but we do detect salient differences in sensitivity to the country's context between individuals with different levels of education. Overall, highly educated people are more conscious of the economic ben-efits brought by immigration, especially in high-income countries. Our results do not match with the in-group/ out-group theory that predicts that the higher the size of the out-group, the higher the feeling of threats by individuals of the in-group. In contrast, our results generally confirm the prediction of the intergroup contact theory, in particular for skilled people.
The structure of the article is as follows. In Section 2, we review the theory and evidence on attitudes toward immigration. In Section 3, we present an overview of the data used in this study and the hypotheses we aim to test. The empirical results are presented in Section 4, while we draw conclusions and discuss possible policy implications in Section 5.

Theoretical and Empirical Evidence Concerning Support for Immigration
Much of the research has approached the question of attitudes towards immigrants through the groupthreat versus intergroup-contact theoretical frameworks. The group-threat hypothesis is based on Blumer's (1958) theory of prejudice and leads to the conjecture that negative views about immigration are based on the threats perceived by natives. These threats are derived from the real or imagined differences between themselves and immigrants. This idea relates to the power-threat hypothesis of Blalock (1967), which posits that the larger the size of an out-group, the stronger the sense of threat experienced by the in-group. In contrast, according to intergroup-contact theory, increasing proximity to immigrants in one's environment under "optimal conditions" (Allport, 1954) can improve intergroup attitudes, via greater opportunities for interaction with immigrants. In short, contact between races or between natives and migrants could either foster mutual understanding, or breed conflict or negative views.
Researchers have found mixed results supporting both theories (for a meta-analysis of the intergroup contact theory see Pettigrew & Tropp, 2006; for a full discussion see Hainmueller & Hopkins, 2014, or Fussell, 2014. While Hatton (2016) and Gorodzeisky and Semyonov (2018) report that high immigration levels favour negative attitudes towards immigrants, other studies support the intergroup contact theory (Baláž et al., 2021;Cooray et al., 2018;Economidou et al., 2020) or find no evidence of stronger anti-immigrant opinions in high-immigration areas (Citrin et al., 1997;Citrin & Sides, 2008;Hood & Morris, 1997;Scheve & Slaughter, 2001;Sides & Citrin, 2007). Consistent with the intergroup contact hypothesis, Fussell (2014) emphasizes that racial diversity favours a more positive attitude if the education level of the area (county) is high, but that it would lead to the opposite outcome in low-education counties, consistent with the group-threat hypothesis. Citrin and Sides (2008) show that attitudes toward immigration are surprisingly unrelated to the number and composition of the foreign-born population, even when natives tend to overestimate the number of immigrants in their countries or have a distorted perception of the racial and ethnic composition (Alba et al., 2005). As a matter of fact, the literature has stressed the role of media, information, and narratives in shaping preference regarding immigration (Alesina et al., 2019;De Poli et al., 2017;Facchini et al., 2017;Grigorieff et al., 2018;Haaland & Roth, 2020;Héricourt & Spielvogel, 2014). However, Hopkins et al. (2019) find that providing accurate information about the size of minority populations does not significantly alter attitudes towards immigration. Change in the foreign-born population might be more relevant for attitudes to immigration than group size per se (see Kaufmann, 2017;Kaufmann & Goodwin, 2018, for a recent meta-analysis; and Laurence & Kim, 2021). This is in line with recent studies that state that recent changes in the environment, such as economic downturns (Davis & Deole, 2020;Heizmann & Huth, 2021) or migration crises (Baláž et al., 2021), exert a salient influence on group positioning and perceived prejudice.
Hostility towards "others" is related to the perceived interests and identity of the group that individuals consider they belong to. However, the features that identify a social group are eclectic and vary between individuals. Accordingly, attitudes towards immigrants are found to be related to education, income, social class, and gender, and some studies also identify other determinants such as cultural values, life experiences, worldviews, racial concerns, ideology, and social trust (Citrin & Sides, 2008;Dustmann & Preston, 2007;Economidou et al., 2020;Espenshade & Hempstead, 1996;Ferrera & Pellegata, 2018;Hellwig & Sinno, 2017;Sides & Citrin, 2007;Tabellini, 2020;Thomsen & Rafiqi, 2020;Valentino et al., 2017). However, each characteristic may exert different influences on individuals' attitudes, depending on where individuals live and on their cognitive and emotional assessment of the contexts. Hence, this literature does not always lead to clear and testable proposals (Hainmueller & Hopkins, 2014).
Education has a robust positive effect on reported attitude toward immigrants in all studies, but the underlying reason for this is not straightforward. Educated people may have a more realistic view of the economic benefits of immigration, because they interpret information from media with caution or select information more rationally. Education is also related to how and whether individuals consider immigrants as competition in the labour market. Indeed, the political economy approach, which explains attitudes to immigration in reference to personal economic interest, produces clear predictions derived from the effect of migrants on the labour market or on the welfare state.
As long as wages are mainly determined by skills, native workers might fear a drop in wages where new immigrants have similar skills, in line with the Heckscher-Ohlin model of international trade and the factor-proportions analysis model. Indeed, the labourmarket hypothesis has been successfully verified by sev-eral empirical studies (Facchini & Mayda, 2009Mayda, 2006;O'Rourke & Sinnott, 2006;Scheve & Slaughter, 2001). In addition, natives may fear that immigrants "take their jobs." Nonetheless, this hypothesis is not fully backed by evidence, since the effect of being unemployed on attitudes towards immigration is not robust (Cooray et al., 2018;Economidou et al., 2020;Hatton, 2016;Mayda, 2006). Moreover, higher-skilled immigrants are preferred to their lower-skilled counterparts, regardless of the native socio-economic status of respondents (Facchini & Mayda, 2012;Valentino et al., 2017), showing that labour market considerations are only part of the story. Moreover, most studies find the old to be more anti-immigrant than the young, which could reflect the belief that immigrants would lower pension benefits or, alternatively, that old people are more concerned about preserving social values (O'Rourke & Sinnott, 2006). Nonetheless, several studies lend support to the welfare hypothesis (Dustmann & Preston, 2007;Facchini & Mayda, 2009Hatton, 2016). Finally, d 'Hombres and Nunziata (2016) demonstrate that higher levels of education lead to a more positive reported attitude toward immigrants, both because they are less exposed to the negative effects of migration, and because they display more positive attitudes towards diversity and integration.
Our study is related to the aforementioned literature. However, our sample covers countries from almost all continents, with different economic structures, wealth levels, social structures, and institutional contexts. We revisit the main hypothesis of the literature in this broader context and examine the role played by education and income in individuals' assessment of the economic role of immigrants. Thanks to the heterogeneity of our sample and the wide range of characteristics considered, we aim to confirm these hypotheses in a more universal context and with a systematic approach.

Econometric Model and Data
We seek to explain differences in beliefs between countries and individuals regarding the economic impact of immigration. To this end, we use the Joint WVS/EVS 2017-2021 dataset, which provides information about socio-demographics characteristics, income, education level, societal attitudes, and tolerance towards immigrants (among other values) for 61 countries. Our dependent variable IMM_IMPACT is based on the following question: "Now we would like to know your opinion about the people from other countries who come to live in your country-the immigrants. How would you evaluate the impact of these people on the development of your country?" Answers range from 1 (very bad) to value 5 (very good). An alternative to this question focuses on people's opposition to having immigrants as neighbours or their "taste for discrimination" (with the questions, respectively, "On this list there are various groups of people. Could you please mention any that you would not like to have as neighbours? Immigrants/foreign workers," and "When jobs are scarce, should employers give priority to people of this country over immigrants?"). Since the first question explicitly refers to the impact on the development of the country, this question seems less biased towards cultural or security concerns about migrants. As the impact on development is more related to an assessment of economic mechanisms, we expect IMM_IMPACT to have a more robust relationship with macroeconomic factors. Card et al. (2012) show that compositional concerns (concerns about whether it is better to have common traditions, religion, language, or if immigration enriches cultural life or increases social tensions) explain more of the variation in individual attitudes toward immigration policy, while being less relevant in explaining opinions concerning the impact of immigration on the economy. Nonetheless, the answers to the three questions are highly correlated: Our dependent variable IMM_IMPACT is associated with the rejection of immigrants as neighbours (Pearson chisquared = 2038.51, p-value = 0.000) and with the rejection of people of a different race as neighbours (Pearson chi-squared = 3789.86, p-value = 0.000).
Since IMM_IMPACT is an ordered categorical variable, the natural way to estimate it is using ordinal models. However, as discussed in van Praag and Ferrer-i-Carbonell (2008), when a dependent variable relates to subjective scores, the use of linear models instead of ordinal models does not affect the basic results. In addition, the interpretation of interaction terms is easier.
The hierarchical nature of our data, individuals (i, first level) clustered into countries (c, second level) leads us to choose multilevel models as the most appropriate econometric method. Let IMM_IMPACT ic denote how individual i evaluates the impact of immigrants on the development on their country c. Null model specification of a multilevel model allows testing whether there are country differences in the evaluation of the impact of immigrants. The null model specification is: where u 0c represents the random intercept and e ic the individual level residuals. It is assumed that both residuals are independent and follow normal distribution. The Variance Partition Coefficient (VPC) of the null specification model is defined by: u is the between-country variance and 2 e is the within-country between-individual variance. The VPC measures the proportion of the total variance due to differences between countries. Initially the VPC of our sample is around 15.25%, so the use of multilevel specification is justified (in addition, the likelihood test also con-firms that differences by country are significantly different from zero).
The main model to explore is: where the vector X ic contains the individual characteristics and the vector Z c includes the contextual variables. A full description of the individuals' variables and their descriptive statistics are reported in the Supplementary Material. Several country-specific characteristics are considered. As a proxy of capital labour ratios, we include GDP per capita (in logarithms). We also control for macroeconomic contexts by including GDP growth rate, unemployment rate, and inflation. All these variables are obtained from the World Development Indicators for the year 2017. As a proxy for the social cohesion of the countries, we use the Gini index obtained from SWIID for the year 2017. We also consider the presence of immigrants by including the international migrant stock as a percentage of the total population for 2019 (UN, 2019a) and the net migration rate per 1,000 population averaged on the period 2015-2020 (UN, 2019b). Summary statistics for the contextual variables by countries (Table SM1) and correlation (Table SM2) are provided in the Supplementary Material.
To explore the idea that education level and household income may affect the view on immigrants differently depending on the context of the country, we include several interaction terms in the previous model, generating different models of this type: where I ic represents successively the interaction terms between educational level and GDP per capita, migrant stock, net immigration rate, and Gini index, respectively; or the interactions between household income and these four contextual variables, respectively.
As a robustness check, we have estimated multilevel logistic regressions using the positive opinion about the impact of immigrants (a dichotomous variable) as a dependent variable. The results obtained are similar to those presented below and are available upon request.

Hypotheses
We test the labour-market hypothesis. Following the prediction derived from the Heckscher-Ohlin model, skilled people would rate higher IMM_IMPACT in capital-abundant countries while unskilled people would rate higher IMM_IMPACT in labour-abundant countries. We hence expect a positive coefficient for the interaction between Education level and GDP per capita. This effect should be observed among working people while a non-significant effect should be obtained for people outside the workforce. Another perception based on labour-market considerations is that immigrants are taking natives' jobs, which should be confirmed by a negative coefficient of being unemployed.
Welfare state concerns are more difficult to isolate. A positive coefficient for retired people would point out a positive assessment of immigration on pensions funding or on access to cheap personal services, while a negative coefficient would reflect the belief that immigration may lower pension benefits. Finally, a non-significant coefficient would express that, on average, assessment of immigration is not related to pension-funding concerns. The welfare state is also based on redistribution from richest to poorest. As long as more equal countries perform higher redistribution, which translates into high income-tax rates, we expect a positive and significant sign for the interaction between GINI and household income. As long as income is driven by skills, a similar effect may be observed for the interaction between GINI and education level. Additionally, a negative effect of net immigration rate and migrant stocks would indicate that immigrants are considered a threat for public finance or a threat to social cohesion.
Based on the intergroup contact theory, greater contact with immigrants reduces threat perceptions and prejudice against immigrants. This hypothesis would be confirmed by a positive coefficient for stock of migrants. Conversely, a negative sign would give support to the hypothesis that the larger the "out-group" population, the larger the competition for scarce resources. For similar reasons, the signs of net immigration rate would have the same interpretation. For an overview of the data, we plot the average value of IMM_IMPACT over some selected contextual variables (Figure 1). The correlation between country income and the opinion concerning the impact of immigrants on the economy is not at all clear. In particular, the views in middle-income countries are quite heterogeneous. Most countries of the sample have a small stock of immigrants and display a huge heterogeneity in their beliefs concerning IMM_IMPACT, while the data tend to show that the higher the migrant stock, the higher the belief that immigration has a positive impact, on average. The heterogeneity of opinions is striking in countries that are net receivers of immigration rate, but also salient in countries that are a source of emigration.

Individual Versus Contextual Variables
In this section, we study the impact of individual and country characteristics on individual beliefs concerning the impact of immigration on the development of a person's country. Model 1 only includes individual characteristics. Model 2 includes only contextual variables, and Model 3 combines both types of determinants. The results are displayed in Table 2.
Given that immigration may have important effects on social, cultural, and political life, non-economic factors are found to play an important role in shaping attitudes towards immigrants. Most of the results of Model 1 are standard. Like other studies, we find that gender does not have a significant impact and neither do the number of children or marital status. As expected, people who are immigrants themselves, or whose mother or father immigrated, are more likely to support immigration. Also, like other studies, we find that older people evaluate the impact of immigration more negatively. We also discover that living in a larger town increases support for immigration. To the extent that the ratio of immigrants is higher in big cities, this would support the hypothesis that more contact with immigrant communities increases positive views about them. Concerning employment status, we find no evidence that unemployed people would most fear the competition of immigrants, nor that retired people would be more concerned while students would see      Notes: ** p-value < 0.05, *** p-value < 0.01; standard error into brackets. Source: Authors' calculations using SWIID (Solt, 2020), UN (2019aUN ( , 2019b, World Bank (2020), WVS/EVS (2021). immigration more positively than full-time workers (the reference group). Our results concerning unemployment are in line with Cooray et al. (2018), Gorodzeisky and Semyonov (2018), and Hatton (2016), but Economidou et al. (2020) and Mayda (2006), for instance, find a significant negative effect. To the extent that the age variable is significant, and retirement is not, consideration about the cohesion of social norms seems to have more weight than considerations on fiscal benefits for pension funding. We do not report results regarding ideology because this would considerably reduce our sample from 61 countries to 53 countries, but for this reduced sample, we find, as with other studies, that people placing themselves on the right of the political spectrum have a more negative opinion about the impact of immigration. Individuals who attend religious services are also more likely to consider the economic impact of immigration positively. Finally, all variables concerning trust (most people can be trusted, trust people from another nation, trust people of another religion) have positive and significant effects. As is common in the related literature, we also demonstrate that pro-immigration preferences are positively and robustly correlated with higher household income and individuals' level of human capital. We discuss these two findings in more detail below.
Model 3, including both individual and contextual variables, displays similar coefficients for both individual and contextual variables to Models 2 and 1, respectively. Models 2 and 3 reveal that none of the contextual variables have a significant effect on the opinion stud-ied. Indeed, the VPC only decreases slightly compared to Model 1. Wealth and other macroeconomic indicators such as growth, unemployment rates or inflation are not important determinants of individuals' opinion about immigration. This indicates that macroeconomic context does not explain much of the variation between countries in the attitude studied. The level of inequality does not play any role per se either. Of the variables related to the presence of immigrants in the economy, migrant stock has a positive effect.

Effect of Education According to the Context of the Country
We test whether education affects the view concerning the economic impact of immigration in a different way, depending on the context of the country. To this end, we interact the contextual variable of interest with the highest educational level attained by the individuals ( Table SM3 in the Supplementary Material and Figure 2). In most cases, the coefficients of the variable resulting from multiplying the education level with a contextual variable are significant, showing that education has a different influence between countries. These effects are illustrated through several graphs in Figure 2, which shows the marginal effects of each level of education on the opinion studied, for realistic values of each contextual variable.
The results are in line with the hypothesis derived from the Heckscher-Ohlin model, according to which wages of skilled people in capital-abundant countries would be less impacted by immigration (as long as  immigrants are less skilled than natives) than in poor countries. Accordingly, more-educated people in countries with higher GDP per capita tend to consider the impact of immigrants on the economy more positively than educated people in countries with less income per capita. The graph illustrates clearly that the opposite occurs for people with medium or low levels of education, who assess the economic role of immigrants in poorer countries more positively than in rich countries.
Since the interactions with migration stock and net immigration rate (only for the highest education level) are positive, the support of educated people also proves to be higher in countries that receive more immigrants. This confirms the hypothesis that the effect of education is not only driven by expected personal income but also by other processes enhanced by education. As demonstrated by the graph plotting the predictive margins according to the stock of migrants, this enhancing effect also exists for the other education levels, as suggested by the intergroup contact theory, but it is more salient for the highest category. The graph for net immigration rate shows the opposite phenomenon. The net entry of immigrants does not influence the judgements made by more-educated people but does decrease the support of other categories of individuals. Our results echo those for the UK from Kaufmann (2017), who highlights a different impact of education levels and changes in ethnic diversity.
Finally, Figure 2 shows that there is a huge disparity in countries with lower levels of inequality between the most educated and the rest, while the marginal effect is almost similar for all categories in highly unequal countries. Remarkably, the support of educated people is almost the same regardless of the inequality level. Again, the opinions of educated people prove to be less influenced by economic concerns than other categories of people. The support of people with a lower education level is considerably less than that of educated people in countries with low levels of inequalities and hence countries performing high redistribution. These results do not fit with the hypothesis that individuals with a high education level believe that immigration could translate into higher income tax levels (tax adjustment hypothesis). Conversely, our results could be compatible with a system in which public balance is guaranteed by adjusting benefits, meaning that people would compete with immigrants for welfare benefits. Our results are at odds with O' Rourke and Sinnott (2006), who find a positive interaction between skills and inequality. However, these authors do not include the variable inequality itself, which raises some doubts about the interpretation of the coefficient of the interaction. Additionally, the difference may be driven by their sample, which comprises mainly high-and middle-income countries. O' Rourke and Sinnott (2006) consider that their results are compatible with a trade model where technologies are different between countries and where inequality is a proxy for skill premium.

Effect of Income According to the Context of the Country
Turning to the influence of personal income depending on the context of the country, we perform a similar exercise as before (Table SM4 in the Supplementary Material and Figure 3 below). In all cases, the interacted variable is significant. However, considering realistic values of the variables, Figure 3 shows that behaviours appear similar across individuals of different income levels in different countries, regardless of the wealth of the country and inequality level.
Regarding the influence of the stock of migrants on individuals with different income, the differences are not salient either. If at all, the opinions of the poorest are less positive towards immigration, regardless of the stock of migrants, and the opinions of people living in countries with few migrants are less positive than the opinions of people living in countries with a high proportion of migrants. People with higher income are more aware of the positive impact of immigration and this is more overt where the stock of migrants is higher. All else being equal, people's opinion is more positive regarding immigrants in countries where the net immigration rate is negative, but household income does not matter.

Effect of Education for People Inside Versus Outside the Labour Force
We perform several robustness checks. First, we conjecture that if the effect of education is mainly driven by labour market channels, then the effect of education should be different for people who are employed or self-employed, compared to non-working people (unemployed, retired, students, housewives, etc.). Figure 4 illustrates the predicted effect of each education level according to GDP per capita (interaction between GDP per capita and education levels). To conserve space, we do not report all the coefficients (available upon request). Coefficients of individual and contextual variables are very similar for both subsamples, and similar to those obtained for Model 3 (Table 2) and 4A (Table SM3 in the Supplementary Material) for the whole sample. O'Rourke and Sinnott (2006) perform a similar exercise for a sample of 24 middle-and high-income countries but their results differ sharply from ours. Gender and age are only relevant for people outside the labour force while the results regarding skills are maintained for the sample in the labour force and not for the outside sample. In the study by O'Rourke and Sinnott (2006), the findings concerning the effect of skills seem to reflect only the functioning of labour markets. In contrast, our results, based on a much more heterogeneous sample and more recent data, require a more nuanced conclusion. Indeed, the graphs for people inside and outside the labour market are quite similar, thus confirming that labour market considerations may not be the main driver of individuals' assessment of the impact of immigrants on economic development.

Effect of Education in High-Versus Middle-Income Countries
We also explore the possibility that patterns concerning the interplay between education and national income may differ according to country development level. To this end, we split the sample into three income groups according to the World Bank classification: lower-middle, upper-middle, and high-income countries, which account, respectively, for 13, 22, and 26 countries. The results are presented in Table SM5 (in the Supplementary Material) and Figure 5. The patterns are similar for lower and higher middleincome countries but differ from the behaviour observed in high-income countries. In middle-income countries, the richer the country, the more people report more negative judgements about immigrants' contribution to economic development. The opposite occurs in rich countries where the richer the country the more people express more positive assessments. The marginal effect of education on these opinions, and its interaction with the country's level of development, is only significant for high-income countries. All in all, our results demonstrate that education only has an influence on opinion in rich countries and is higher the richer the country. Therefore, special attention should be paid to middle-income countries with positive net immigration rates (see table SM1 in the Supplementary Material). In countries such as Brazil, Russia, and Turkey, opinion regarding migrants is not influenced by macroeconomic contexts, and there is no difference between the low-and high-educated about how this context affects their decision. Opinion towards migrants in these countries is thus based more on social identity concerns, values, and beliefs, which are, by nature, more subjective.

Discussion and Conclusions
We estimate a multilevel model to disentangle the effects of individual-level characteristics and macro-level variables on individual attitudes towards the economic impact of immigration, for a wide sample of middleand high-income countries. We conclude that microlevel variables (such as age, being a student or from an immigrant's family, trust, income, and education) explain most of the variation between countries in the assessment of the economic impact of immigrants. Furthermore, our results show that opinions are not directly based on "objective" measures of wellbeing, inequality levels, migrant stock, and net immigration rate. Finally, our study emphasizes that education is a more important differentiating characteristic for studying attitude towards immigrants than personal income.
Our study does not validate the group-threat hypothesis. If at all, our results lend more support to the intergroup hypothesis, since we find that, the higher the share of migrants in the country, the more education increases positive views about immigrants. Obviously, we cannot be sure that a higher share of migrants in a country leads to greater contact with immigrants for respondents. Indeed, a higher share of immigrants may reflect historical and cultural ties with immigrants' countries of  origin, a more permissive policy towards immigration in the past, or a historical tradition of integration and tolerance of diversity that may also foster positive attitudes towards immigration. Nevertheless, if the current entry of immigrants is high, people with lower education levels have a less positive view. We find weak support for the welfare-state channel. Indeed, opinions of the richest and the poorest seem homogeneous across countries even if they provide very different welfare services. Older people judge the effect of immigration on development more negatively even if they are still working, while being retired has no significant effect. Therefore, the feelings of older people regarding immigration would seem to be guided more by their worries about preserving existing social norms. Additionally, the support of educated people (and the richest) for immigration is almost the same, regardless of the inequality level. However, the support of people with lower education levels is considerably lower in more equal countries than in unequal countries.
Our results are in line with the hypothesis derived from trade models, according to which the wages of skilled people in capital-abundant countries would be less impacted by immigration than in labour-abundant countries, while the opposite occurs for people who have attained a lower level of education. However, education (and other individual characteristics) proves to have the same impact on the opinion of individuals regardless of their employment status. Therefore, our findings are compatible with the labour-market hypothesis but also highlight the fact that personal economic interest is not the main determinant of natives' assessment, even when we include low-and middle-income countries in the sample. We thus extend the results of the literature that highlights the limited role of self-interest in attitude formation-mostly based on studies for North America and Western Europe-to a broader context. Immigrationrelated attitudes are mostly driven by perceptions of the impact of immigration on the nation, which are not accurately captured by "objective" measures such as the ones included in this study.
All in all, our results give more support to sociopsychological approaches to immigration attitudes such as subjective appreciation of the consequences of immigration moderated by education rather than to politicaleconomy approaches to immigration attitudes. Formal education therefore appears to be an effective tool for creating conditions for the better integration of newcomers. This study also highlights that individuals with a lower level of formal education are also more sceptical when immigration increases or are more concerned about preserving redistribution. Thus, a sine qua non for integration policies to succeed is to devote more effort to addressing the worries of less-educated people. This is especially challenging nowadays since the way people build their knowledge is changing considerably, due to the mass of information received through new technologies. Policymakers must therefore rethink strategies to increase social trust and consider how to communicate these strategies to deal with the social and political consequences of large inflows of immigrants.
Obviously, our data does not allow us to address important concerns such as ethnic or racial considerations, as suggested by the group-threat theory, or to test the positive and negative mechanisms that may emerge from intergroup contacts. However, cross-sectional studies such as ours naturally complement more detailed studies. This study draws attention to the overlooked case of middle-income countries registering positive net immigration rates, such as Brazil, Russia, and Turkey. There, opinion towards immigrants is not explained by education level or macroeconomic context. This is a worrisome situation that presages significant conflicts in the future. More work is needed to understand attitudes towards immigrants in emergent countries to enhance the basis of social cohesion in the future.