Economic conditions and perceptions of immigrants as an economic threat in Europe: Temporal dynamics and mediating processes

This article addresses the extent to which economic downturns influence the perception of immigrants as an economic threat and through which channels this occurs. Our primary objective is an investigation of the specific mechanisms that connect economic conditions to the perception of immigrants as a threat. We therefore also contribute to theoretical discussions based on group threat and realistic group conflict theory by exposing the dominant source of competition relevant to these relationships. Furthermore, we investigate whether people react more sensitive to short-term economic dynamics within countries than to the long-term economic circumstances. Our database comprises all waves of the European Social Survey from 2002 to 2017. The macro-economic indicators we use include GDP per capita, unemployment, and national debt levels, covering the most salient economic dimensions. We furthermore control for the country’s migration situation and aggregate party positions toward cultural diversity. Our results show that the dynamic short-term developments of the economy and migration within countries are of greater relevance for perceived immigrant threat than the long-term situation. In contrast, the long-term political climate appears to be more important than short-term changes in the aggregate party positions. Further mediation analyses show that objective economic conditions influence anti-immigrant attitudes primarily through individual perceptions of the country’s economic performance and that unemployment rates are of primary importance.


Introduction
The economic developments after 2007 had an enormous impact across the world. Numerous countries faced a diverse and shifting set of economic challenges, and only some of them have thus far fully recovered. Since roughly the same time, several types of societal pressures seem to increase. An upsurge in right-wing populist party presence across many countries (Dennison and Geddes, 2018), various public debates about immigration, and increasingly hostile attitudes toward immigrants in several European countries (Isaksen, 2019;Turner and Cross, 2015) exemplify such societal pressures. However, whether such societal pressures are related to economic downturns taking place within those countries or whether they develop independently of these remains open for scrutiny. We approach this issue by focusing on the perception of immigrants as an economic threat and ask the following research questions: Are perceptions of immigration being bad for the economy a reaction to countries' economic conditions? If so, through which channels does this relationship unfold?
Migration is a lasting demographic trend, and denigration directed toward immigrants has become a primary challenge for the social cohesion and solidarity within European countries. Given our focus on economic developments since 2002, we will specifically investigate whether perceiving immigrants as an economic threat is related to objective measures of economic developments in a macro-longitudinal perspective. In doing so, we aim to contribute to the literature in various ways.
First, our focus on a specific type of perceived threat contributes to the nascent subfield of investigating and sometimes comparing different types of perceived immigrant threat (Callens and Meuleman, 2017;Ceobanu, 2011;Heizmann, 2015;Stephan et al., 2005;Stephan and Stephan, 2000), restrictiveness toward immigration (Ben-Nun Bloom et al., 2015;Green, 2009;Heizmann, 2016), far-right party success (Halikiopoulou and Vlandas, 2020), and outgroup attitudes (Meuleman et al., 2019) rather than using broad and general composite indicators of immigration attitudes per se (Ceobanu and Escandell, 2010;Van Setten et al., 2017). The general lesson from this literature is that different types of threat indeed have divergent causes and consequences. This is in line with theoretical models like the Intergroup Threat Theory (Stephan and Stephan, 2000) and other approaches distinguishing realistic and symbolic threat such as group threat and realistic group conflict (Blalock, 1967;Blumer, 1958;Bobo, 1983;LeVine and Campbell, 1972). On a more conceptual level, a focus on specific indicators serves as an important complementary perspective to the equally important investigations of general forms of anti-immigrant animus that still dominate the literature. Such a perspective also has a high societal relevance, as immigration debates also usually focus on specific topics such as economic consequences or security issues.
Second, we investigate whether perceived immigrant threat relates to short-term changes or long-term circumstances by modeling dynamic changes in the country's economic and financial situation. Whereas many previous studies in this field used cross-sectional data, longitudinal designs are scarce (Bobo, 1983;Meuleman et al., 2009Meuleman et al., , 2018Semyonov et al., 2006;Van Setten et al., 2017;Wright, 2011). This appears to mirror the general state of affairs in quantitative-comparative sociology (Giesselmann and Schmidt-Catran, 2019). Even fewer studies looked at differentiated types of perceived immigrant threats as outcomes across time (Meuleman et al., 2018). Previous studies mainly compared the effects of the overall level and contextual changes regarding the immigrant population's share (Czymara, 2021;Kaufmann, 2017;Newman and Velez, 2014). However, their findings suggest that the population reacts more sensitively to changes within contexts than to the general long-term contextual situation. Therefore, our study's second analytical aspect refers to the temporal dynamics of the national economic and financial situation, 1 for which we use year-to-year measures on the country level. We investigate GDP per capita, unemployment, and public debt developments. The latter is another crisis-related indicator that receives considerable political and public attention in recent years but less scholarly consideration so far (Van Setten et al., 2017). We therefore also contribute to a broader view of economic factors and their potential relationship with economic immigration-related attitudes.
Finally, we will identify mediating factors using stepwise multilevel modeling and multilevel structural equation modeling (SEM) techniques. These analyses will expose to what extent other factors such as socioeconomic background and individual evaluations of the country's economy channel the link between macro-economic dynamics and perceiving immigrants as an economic threat. This investigation provides further insights into the cognitive mechanisms that translate macro-level economic strain into individual perceptions. Therefore, our study contributes to group threat and realistic group conflict theory in that we show through which channels the objective factors emphasized in those theories influence corresponding immigrant threat perceptions.
Our SEM mediation models reveal that individual evaluations of the country's economy indeed mediate how macro-economic fluctuations influence perceived economic threat. Furthermore, the results show that the national populations investigated here are more sensitive to developments in the labor market than to developments of the general economy or the country's debt.

Economic conditions and perceived immigrant threat
Objective competition, conceptualized and measured as economic scarcity or immigrant presence, figures as a prominent contextual driver of animosity toward outgroups both in the theoretical and the empirical literature on anti-immigrant or outgroup attitudes (Blalock, 1967;Blumer, 1958;Ceobanu and Escandell, 2010;Gorodzeisky, 2010;Kuntz et al., 2017;Olzak, 1992;Quillian, 1995Quillian, , 1996Scheepers et al., 2002). While these aspects are part of a long research tradition (Ceobanu and Escandell, 2010), there is a renewed interest in economic implications as just witnessed during a period of widespread economic anxiety and notable economic downturns (Czymara and Schmidt-Catran, 2017;Kuntz et al., 2017;Meuleman et al., 2018). Events and circumstances that threaten the social order, such as economic crises, foster the feeling that one's group position is threatened and pose a breeding ground for scapegoating, and eventually prejudice (Blumer, 1958;Quillian, 1995). Moreover, other approaches emphasize the competitive aspect of such environments and view perceived threat as an outcome of struggles over scarce resources between in-and outgroups (Blalock, 1967;Olzak, 1992;Scheepers et al., 2002).
Several theoretical approaches suggest that anti-immigrant attitudes are multidimensional and differentiate between divergent types of perceived immigrant threats. For instance, the integrated threat theory (Stephan et al., 2008;Stephan and Stephan, 2000) distinguishes realistic and symbolic types of threats, which relates to earlier formulations of realistic group conflict theory (Bobo, 1983;LeVine and Campbell, 1972). They furthermore suggest that these types of threats arise from different antecedents (Stephan et al., 2009). Accordingly, scholars usually map these distinct threats to empirical indicators of economic and cultural concerns about immigration. Given our focus on the economic developments across Europe, these macro-and micro-level theories taken together suggest that such economic anxiety is primarily related to economic concerns about immigration, as the economy is the salient context under pressure in such circumstances. We build on this theoretical approach and take a distinct perspective on economic factors regarding individuallevel threat perceptions of immigration to investigate its underlying mechanisms in detail.
In addition to the literature mentioned above, studies differentiating these types of concerns use them both as outcome measures (Heizmann, 2015;Meuleman, 2011;Meuleman et al., 2018;Pichler, 2010) as well as predictors of other, more action-oriented indicators such as social distance or policy preferences (Ben-Nun Bloom et al., 2015;Bridges and Mateut, 2014;Callens and Meuleman, 2017;Heizmann, 2016;Van Setten et al., 2017). From these studies, we can infer that individuals take a somewhat nuanced view on different immigration-related arguments, suggesting distinct results for economic situation indicators. In sum, based on the contextual theories mentioned above, we suggest that a decreasing GDP, growing unemployment, and growing public debt are associated with individual perceptions of immigration having negative consequences for the economy.
However, through which mechanisms are economic developments related to perceived economic threat? We can suggest at least three channels that potentially link objective economic circumstances with subjective perceptions. One is a direct linkage in the form of a competitive or threatening environment generating the perception of immigrants as an economic threat, as the competition and conflict theories mentioned above suggest. A potential psychological mechanism may unfold, for example, through a form of scapegoating (Allport, 1954;Becker et al., 2011;Glick, 2005). This mechanism implies that adverse economic conditions may lead people to search for targets to blame for the frustrating situation and lead to the perception that immigrants are responsible for these conditions. Previous experimental studies provide evidence that macro-economic threats may increase ethnic prejudice (Becker et al., 2011;Butz and Yogeeswaran, 2011), and anti-Semitism (Becker et al., 2011). Accordingly, the public can perceive an economic crisis per se as a problem that broadly leads to exclusive tendencies toward immigration (Goldstein and Peters, 2014).
Besides such a direct effect, there may also be simultaneously operating processes of mediation. Therefore, a second potential mechanism operates through the material consequences of such economic developments. Financial insecurity in the household and individual unemployment episodes may be more prevalent in times of economic downturns. Both are primary individual-level factors related to anti-immigrant sentiments (e.g. Heizmann, 2015Heizmann, , 2016Kunovich, 2004;Polavieja, 2016;Schneider, 2008). The samples that form the empirical basis for our analyses would also reflect this higher prevalence. For example, country-year samples with a high unemployment rate may feature higher numbers of respondents reporting to be unemployed. In other words, an influence of macro-economic factors may merely be due to compositional differences between the countries concerning these socioeconomic factors, with the latter serving as mediators between macro-economic factors and perceiving immigrants as an economic threat (Jetten et al., 2017). However, economic downturns may not only lead to more unemployment episodes, but they can also lead to moving to a lower level on the labor market or being confronted with income difficulties. The psychological underpinnings of such individual socioeconomic changes mandate the inclusion of several potential sources of composition effects regarding economic anxiety (Billiet et al., 2014;Heizmann, 2015;Kunovich, 2004;Schneider, 2008): Personal economic anxiety and personal helplessness due to job losses or fear of falling down the social ladder can lead to compensatory responses such as derogating outgroups and exclusionary immigrant attitudes (Fritsche and Jugert, 2017). Psychologically, such a response to personal economic anxiety may stem from coping strategies in reaction to a threatened sense of control and self-esteem (Bukowski et al., 2016;. Searching for simplified causes for the anxious situation can be viewed as a strategy to regain certainty in threatening situations and restore personal self-esteem and a sense of control. Finally, a third mechanism may operate via the individual perception and assessment of the country's economy. In times of an economic crisis, such an assessment should be more negative, even if certain downturns may not directly implicate the economy's functioning, for instance, when it comes to the national debt level. One important channel through which such a perception can emerge is news media, which extensively and continuously report on various economic conditions and indicators, which is so even when the development of these indicators is positive. Therefore, we can suspect a strong linkage between objective conditions and subjective perceptions of the national economy. A negative perception of the national economy, in turn, may act as a mediator and generate perceptions of immigrants being bad for the economy. This argument can be related to theoretical models that focus on group-level deprivation rather than personal disadvantage, as the economy is a form of collective societal asset (Blumer, 1958;Bobo, 1983;Sears and Kinder, 1985). However, we know little about the corresponding mechanisms regarding the perceived economic situation and objective measurements of the economy. Only a fraction of studies investigated perceptions versus objective economic measures (Kuntz et al., 2017). Therefore, we will test to what extent the perception of the country's economy mediates the different aspects of the economic situation covered here.
These three mechanisms need not be mutually exclusive. They can all generate country-level differences across time. By conducting stepwise analyses, we will first provide an approximate test of these mechanisms. This approach also allows us to examine the relative importance of objective vs. subjective indicators of the economic situation. In a second step, we additionally calculate several multilevel SEM mediation models regarding the strongest identified mediating process.

Additional contextual factors: immigrant presence and the political climate
Besides economic factors, other theoretical approaches suggest further predictors that influence public attitudes toward immigrants and need to be considered as controls. First, a crucial macrolevel influence that we need to account for is immigration numbers, that is, immigrant stocks. Here we can name two divergent mechanisms of how immigration numbers may translate into public attitudes toward immigrants. The first mechanism relates to the intergroup threat approaches mentioned above (Blalock, 1967;Blumer, 1958;Bobo, 1983;Ceobanu and Escandell, 2010). These approaches state that a higher level of immigrant presence is associated with anti-immigrant attitudes and, therefore, potentially with perceived economic threat.
In contrast, the so-called contact hypothesis (Allport, 1954;Pettigrew, 1998) assumes that a higher level of immigrant presence reduces perceived economic threat through familiarization and more opportunities for direct positive contact. The empirical approaches for assessing this hypothesis differ strongly, as scholars originally conceptualized contact as an individual-level phenomenon and only later on applied it to aggregate levels. Previous studies that focus on the country level provide a mixed picture, but more often they report results in line with the threat assumptions (Ceobanu and Escandell, 2010;Heizmann, 2015Heizmann, , 2016Heizmann and Ziller, 2019;Heizmann et al., 2018;Quillian, 1995;Schneider, 2008;Semyonov et al., 2006Semyonov et al., , 2008. However, the situation is different for lower levels of analysis, where there tend to be more findings that are in line with the contact hypothesis (Weber, 2015(Weber, , 2016(Weber, , 2019. In this vein, the metaanalysis performed by Pettigrew and Tropp (2006) focuses on empirical approaches dealing with actual contact. 2 They identify overall evidence in favor of the original contact hypothesis. Furthermore, there is evidence that both contact and conflict mechanisms can act in a simultaneous or complementary fashion. For example, Weber (2015) reports findings in line with the conflict hypothesis for the country level and simultaneously a negative effect in line with contact theory on the regional level. Similarly,  identify both contact and group threat effects on the regional level. Finally, there is evidence that the size of immigrant proportion and changes in this proportion have different effects on public attitudes toward immigrants (Kaufmann, 2017). Citizens tend to be more sensitive to drastic changes in the local immigrant population size than to the general level of the immigrant population (Newman and Velez, 2014). In his analysis for the United Kingdom, Kaufmann (2017) shows that rapid ethnic changes increase anti-immigration attitudes, whereas diversity levels have a threat-reducing effect.
In sum, although studies show a mixed picture, the general pattern of results at the country level suggests that the immigrant population size relates to higher levels of perceived immigrant threat. At lower levels of analysis such as the regional level, the contact effect appears more dominant (Weber, 2015). Since our focus lies on economic factors and our contextual factors are restricted to an over-time investigation at the country level only, immigration stock changes are merely a control dimension. Therefore, we cannot attempt to adjudicate between both aspects; yet the available evidence for the country level suggests that rising immigration stocks will be associated with rising perceived economic threats. 3 The second control dimension we include here is the country's political climate. 4 Especially in times of social challenges, such as during economic tensions, the political rhetoric influences the extent to which the public sees immigrants as a threat and the source of the problematic situation (Blumer, 1958). The boundary-making approach provides the theoretical reasoning behind this, where institutional factors provide a framing of boundary-related issues of immigration (Wimmer, 2013). Political elites, such as political parties, have the power and public reach to influence the public discussion and its framing. This framing may reflect on individual-level processes and perceptions (Heizmann, 2016;Schlueter et al., 2013;Wimmer, 2013).
To address the political climate, we employ data from the Manifesto Project Database (Volkens et al., 2020), which captures party policy positions based on the parties' electoral manifestos. More specifically, we employ a measure related to the stance parties take on diversity issues. The aggregate view on the country provides an estimate of the overall political landscape across the timespan covered in our analyses. The prior empirical record regarding the influence of these manifestos on public attitudes is mixed. Some studies do find that political party rhetoric influences the formation of national identities (Helbling et al., 2016) and attitudes toward immigration in general (Bohman, 2015), toward specific immigrant groups (Czymara, 2019), and toward climate change (Sohlberg, 2016). Some studies find no (Steele and Abdelaaty, 2018) or only partial support for such an influence (Abdelaaty and Steele, 2020;Hadler and Flesken, 2018). Taken together, we hypothesize that a more negative stance toward diversity is associated with a higher perceived immigrant threat. Moreover, due to these manifestos' discursive and public character, they arguably also have the power to shape other aspects of public discourse (see also Note 14). Therefore, we will also investigate whether the political climate moderates the influence of macro-economic factors on perceiving immigrants as an economic threat.

Data
To test our theoretical assumptions, we draw on data from eight rounds of the European Social Survey 2002-2017(ESS, 2018. This data set has several advantages for our study. First, the European Social Survey (ESS) is a high-standard multi-country survey covering 36 predominantly European countries. This property of the data set enables us to investigate how between-country differences in their economic and financial situation can explain public attitudes toward immigrants. Second, the data set covers several years before and after the 2007 global economic and financial crisis. This additionally allows us to examine economic upturns and downturns within countries. Third, in each of these countries, respondents were explicitly asked whether they perceive immigrants as an economic threat or as beneficial for the national economy-our dependent variable of interest.
Since we are interested in the majority group's attitudes toward immigrants, we excluded nonnationals and respondents with a migration background (who were themselves or whose parents were born in another country). We restricted the sample to countries with the necessary macrolevel information on the economic and migration situation. Furthermore, we excluded the outliers Luxembourg and Switzerland due to their particular characteristics regarding foreign population and GDP, and Ireland from 2015 onward due to its particular GDP development. 5 We used listwise deletion of missing cases, as we suspect that most instances of missing values are not missing at random (Pepinsky, 2018). The final data set for our analysis consists of 26 countries, 260 countryyears, and 225,791 respondents. Tables A5 and A6 in the Online Appendix present the list of countries and further information on the analysis sample.
In line with the theoretical approaches discussed above, we seek to quantify the relationships of different country-level variables instead of providing an in-depth description of individual countries. Put differently, we take a comparative interest in the properties of countries rather than the countries themselves. Nonetheless, we also take a broader comparative view by illustrating our descriptive findings by referring to exemplary countries.

Measurements
For our dependent variable, respondents rated the extent to which they see immigrants as an economic threat or as a valuable contribution to the country's economy. 6 To facilitate the interpretation, we reverse coded the 11-point scale of the original question. Accordingly, the value 10 indicates the strong perception of immigrants as an economic threat, and the value 0 indicates the strong perception of immigrants as beneficial for the national economy.
To investigate whether an influence of macro-economic factors is due to compositional differences of the countries' socioeconomic characteristics, we incorporate both the respondents' labor force status and financial situation. We include the individual financial situation in our model using the respondents' feelings about their household's income. 7 The indicator ranges from 1 "Living comfortably on present income" to 4 "very difficult on present income." To assess the respondents' labor force status, we distinguished respondents currently in education, unemployed persons, respondents in paid work, and an additional category covering retired persons, disabled persons, and homemakers. We additionally divided employed respondents into three subcategories using the European socioeconomic classification (Harrison and Rose, 2006): "higher occupations," "intermediate occupations," and "lower occupations." The European socioeconomic classification is an occupation-based measure of the socioeconomic position using the International Standard Classification of Occupations (ISCO) and additional information regarding employment status, the number of employees, and whether a worker is a supervisor. Therefore, this coding also addresses vertical labor market stratification.
We coded the respondents' personal view of the national economy on an 11-point scale. The value 0 indicates extreme dissatisfaction and the value 10 extreme satisfaction with the national economy's present state. Besides these primary individual-level predictors, we included several control variables in our models: the respondent's age (grand-mean centered), gender (0 "female" and 1 "male"), and educational level based on the International Standard Classification of Education 97 (ISCED) with following categories: (1) "Less than lower secondary education (ISCED 0-1)," (2) "Lower secondary education completed (ISCED 2)," (3) "Upper secondary education completed (ISCED 3)," (4) "Post-secondary non-tertiary education completed (ISCED 4)," and (5) "Tertiary education completed (ISCED 5-6)." As immigration is a politicized issue in many European countries and people's attitudes toward immigration usually differ between the political left and the political right (Ceobanu and Escandell, 2010), we include the respondents' political orientation. This also introduces an element of cultural identity, as left-right-distinctions also carry an identity component, especially regarding fundamental societal issues and worldviews. 8 A specific challenge of the political orientation is the notable level of missing values for this variable due to the category "Don't know" with 12.3 percent of the full sample. Furthermore, our dependent variable's response patterns suggest that non-response on the left-right scale correlates with anti-immigrant attitudes. To avoid losing so many respondents and introducing bias in our analysis due to excluding these cases, we added a category that subsumes these missing cases. Accordingly, we coded the original 11-point left-right scale into a 4-point indicator. Thus, the variable of political orientation comprises the categories 1 "left," 2 "middle," 3 "right," and 4 "don't know." Since there is evidence that the effect of people's political orientation on interethnic attitudes differs between countries (Citrin and Sides, 2008), that is, left and right may have different meanings across countries, we include random slopes for the political orientation (Heisig et al., 2017).
In addition to these individual-level explanatory factors, our study focuses on how dynamics in the country's economic context affect the perception of immigrants as an economic threat. We include three yearly measured macro-economic variables provided by the Organization for Economic Co-operation and Development (OECD) 9 and the statistical office of the European Union (Eurostat) 10 : the GDP per capita (current purchasing power parities) provided by the OECD (2019b), the unemployment rate (as a percentage of the labor force) provided by Eurostat (2019d), and the public debt (general government debt as a share of the GDP) provided by both Eurostat (2019b) and OECD (2019a). Since Eurostat does not provide information on Norway's government debt, we supplemented Eurostat's missing information with OECD information. Furthermore, we operationalized immigration as the number of foreign immigrants per 1,000 inhabitants (provided by Eurostat (2019aEurostat ( , 2019c and the OECD (2019c)). In the Online Appendix (Tables A11-A14), we provide detailed information about which source we used for which year.
We operationalized the political party positions on cultural diversity analogously to Helbling et al. (2015). For each country and election year, we collapsed the positive and negative party positions regarding the dimensions of multiculturalism and the national way of life. We created a ratio indicator that measures the difference between the share of anti-diversity and pro-diversity mentions of all diversity-related mentions. 11 Accordingly, the indicator measures the average party positions toward cultural diversity with negative values indicating pro-diversity manifestos and positive values indicating anti-diversity manifestos. This means that our measure is an aggregate of anti-diversity party positions. We obtained the information from the Manifesto Project Dataset (Volkens et al., 2020). The project covers party positions on various issues based on party manifestos related to national election campaigns in over 50 countries. The variables needed are available for all countries and at several points in time (election years) (see Online Appendix Table A15). We filled in the missing data points using linear inter-and extrapolation.

Methods
In consideration of the hierarchical structure of the data and to investigate both country differences and dynamic within-country change, we apply a three-level random intercept and slope model (respondents nested within country-years nested within countries (Schmidt-Catran and Fairbrother, 2016)) plus random slopes for left-right self-placement (see above) plus a time trend (Fairbrother, 2014). As the European Social Survey (ESS) is a cross-sectional survey conducted in several years, we can examine changes over time on the country level only. Although the ESS is a two-yearly survey, the fieldwork period of a given wave covers both the first and second year of the ESS wave (e.g. ESS round 2006 covers interviews in 2006 and 2007). Accordingly, we have observations for each year and can examine yearly changes over time. Using the interview date, we include the yearly indicators of the country's current financial and economic situation. Thus, we assess the annual country situation of the respondents and the temporal development of the circumstances. 12 We country-mean-centered the macro indicators regarding the countries' economic, financial, migration, and political situations to differentiate between within-and between-country effects (Fairbrother, 2014;Rabe-Hesketh and Skrondal, 2012: 152 ff.). The decomposition of the withinand between-variance allows us to investigate whether the yearly contextual changes within countries or whether the long-term differences between countries are more relevant for anti-immigrant sentiments (Schmidt-Catran, 2016). Accordingly, we consider the overall long-term economic and immigration level of a country and its overall political party positions on cultural diversity. At the same time, we also consider the short-term temporal dynamics within countries regarding these macro-level indicators. To ease the comparison of the effects for each macro-level variable, we rescaled the macro indicators to a scale ranging from 0 to 1.
According to the variance partition coefficients (VPCs), the major part of the response variance regarding the dependent variable lies at the individual level (91.3%). Furthermore, 6.4% of the total response variance lies between countries, and 2.3% of the variance lies at the country-yearlevel. All three variance components are statistically significant.
To test the mediation hypothesis and gain unconflated estimates of the indirect effects, we use the multilevel mediation model introduced by Preacher et al. (2010). As the complexity necessary for three-level mediation models leads to convergence problems, we apply a two-level model with country dummies accounting for time-constant differences across countries for this analytical step. This mediation model enables us to simultaneously estimate direct and indirect relationships within a multilevel framework (Preacher et al., 2010(Preacher et al., , 2011. Because the economic indicators strictly vary on the macro level, we model the mediation process on the country-year level. Therefore, we differentiate between the variance on the individual level and country-year level of the mediator variable and the dependent variable. To consider the asymmetric nature of the indirect effect's sampling distribution and obtain accurate confidence intervals for the indirect effect, we apply the Monte Carlo method using R (Preacher et al., 2010(Preacher et al., , 2011Selig and Preacher, 2008).
We conduct our models in four steps and introduce the following individual-level variables in a stepwise fashion: in the baseline model (M1), we control for time effects, the respondents' demographics, and political orientation (including a random slope on the country level). In our second model (M2), we also control for the respondents' labor force status. Model (M3) additionally includes the respondents' feelings about the household's income. In the full model (M4), we additionally control for the respondents' satisfaction with the national economic situation. Finally, we test whether, and to what degree, the satisfaction with the national economy mediates the effect of the countries' economic situation on perceiving immigrants as an economic threat (M5A-M5D), as this variable emerged as the most important potential mediator.
The analyses of these models are based on 26 countries. Hence, we keep the models parsimonious at higher levels of analysis. Therefore, we first examine a series of models within each step (M1-M4): we control for the stock of foreign population, and the aggregate political party positions on cultural diversity, and additionally test the within-and between-effects of each economic indicator for one indicator at a time.

Descriptive results
Before we turn to the multilevel analyses, we first display the country-level associations between the three economic indicators, the macro control variables, and perceived economic threat aggregated for countries and country-years. Figure 1 shows the association between perceived economic threat and the three macro-economic indicators, and the macro control variables of the foreign population share and aggregate party positions toward cultural diversity. On the left-hand side, the time-constant between-portion of the respective indicator is visible. On the right-hand side, we display the same relationship for the yearly within-deviations.
The regression line in Figure 1(a) suggests a negative relationship between GDP and perceived economic threat for both the country-level (right-hand side) and the temporal changes within a country (left-hand side). The difference in aggregated perceived threat for the highest and lowest point of the regression line equals −.74 (country means) and −.58 (country-year deviation) scale points. Thus, perceiving immigrants as an economic threat tends to be less pronounced in countries and in times with a higher GDP per capita. Similarly, the regression lines for the country's unemployment rate (b) and public debt (c) suggest that perceived immigrant threat is less pronounced in countries and times with better labor markets and financial conditions. We find a minimum-maximum point difference for perceived threat of .48 (country means) and 1.42 (country-year deviation) scale points for the unemployment rate. For government debt, the minimum-maximum point difference equals .81 for the country perspective and .64 for the country-year deviation. Accordingly, in countries and in times with a high unemployment rate or high public debt, the population tends to perceive immigrants more strongly as a threat to the economy. The population in economically prosperous times and places is inclined to evaluate the economic impact of immigration on the country more positively. Furthermore, in countries with a higher foreign population stock (d), the perception of immigrants as an economic threat tends to be more pronounced (minimum-maximum point difference of .64). However, the regression line on the right does not show a similar pattern for the countryyear deviation (minimum-maximum point difference of .19).
Finally, a more negative framing of cultural diversity (e) seems to correlate with higher antiimmigrant attitudes (minimum-maximum point difference of 1.18). However, the regression line on the right-hand side does not suggest an association between temporal changes of the political framing within countries and public attitudes toward immigrants (minimum-maximum point difference of .04).
As Figure 1 shows, European countries differ in their economic, financial, and migration situation; their party positions toward cultural diversity (x-axis); and how the population views immigrants (y-axis). When we take a closer look at the mean attitudes toward immigrants' impact on the economy (y-axis), we see that the mean attitudes toward immigrants appear to be relatively positive. However, some country differences are apparent: Greece, Hungary, and Cyprus report higher mean scores on immigration being bad for the economy than other European countries. On average, Sweden, Norway, and Romania reported the lowest perception of immigrant threat.
Whereas some countries, exemplified by Norway and the Netherlands, show a relatively good economic condition and relatively modest debt levels, other countries report higher unemployment levels and lower GDP levels, exemplified by Latvia and Poland. Besides, the countries also differ in their political framing of cultural diversity. While party manifestos in Spain tend to frame cultural diversity positively, parties in Eastern European countries, such as Poland and the Czech Republic, tend to be more critical of cultural diversity (Figure 1(e)). Overall, the countries show a heterogeneous picture regarding the macro-indicators, which underlines the necessity for the joint analysis we will perform below.
Despite these country differences, the regression lines and the minimum-maximum point differences indicate systematic relationships between the countries' economic, migration, and political situation and the public attitudes toward immigrants: a poor economic situation in a country indeed correlates with a higher mean perception of threat. However, these descriptive analyses do not take additional individual-level variables into account, leaving open questions of potential composition effects that may overlay these bivariate relationships. Therefore, and also to investigate mediation processes, we next turn to our multivariate analyses.

The macro level
Earlier in the article, we expected that contextual economic factors are related to perceived economic threat, and we presumed this happens via various channels. To investigate this, we first trace the effect of the national economic situation and its temporal dynamics across various model specifications. To do this, we use the country's GDP per capita (Table 1, models M1A-M4A), unemployment rate (Table 1, models M1B-M4B), and public debt (Table 1, models M1C-M4C) as macro-level indicators. 13 We additionally take the country's stock of foreign population and the level of anti-diversity party positions into account as control variables. Table 1 shows the macrolevel results for the different modeling steps (M1-M4). For a better understanding of the modeling steps, the information below the footer of Table 1 and the individual-level results in Table 2 show the individual-level characteristics taken into account in the respective model.
On the macro level, we see that the national economic situation is relevant to the perception of immigrants as an economic threat in various ways. In general, it appears that the temporal dynamics of the economic situation within the countries are indeed more important than the time-constant overall differences in the economic levels between the countries. Accordingly, we find more significant effects for the within-components than for the between-components of the macro indicators across the various model specifications (Table 1). This finding suggests that economic shifts rather than the country's general economic situation lead to macro-level differences in the perception of immigrants as an economic threat.
Model 1 (A, B, and C) includes only standard controls, political orientation, and technical variables. The model shows the macro-level effects before accounting for compositional differences between the countries and country-years. Therefore, our substantive interpretation begins with the models that include the respondents' labor force status (Model 2), and their financial situation (Model 3). In model M2A and M3A, the significant negative effects of the between-and withincomponents of the country's wealth (GDP per capita) suggest that the perception of immigrants as an economic threat is less pronounced in wealthier countries (between-component) and the economic improvement within a country reduces this perceived threat (within-component). In addition to the countries' wealth, the results suggest a significant impact of unemployment (M2B and M3C) and government debt (M2C and M3C) dynamics within countries. An increasing unemployment rate leads respondents to evaluate the impact of immigration on the national economy more negatively.
Similarly, an increasing government debt within a country is associated with a higher perception of immigrants as an economic threat. The macro-level results of models M2 and M3 suggest that the influence of macro-economic factors is not solely due to compositional differences in the socioeconomic characteristics of the countries' population. Although the coefficients (especially the between-component of GDP) decrease when controlling for the socioeconomic variables, these macro-level effects remain statistically significant (except the between-component of GDP).
Furthermore, the results reveal that the migration stock's temporal changes have a robust and significant threat-increasing effect in the models controlling for the GDP per capita (M1A-M3A), and government debt (M1C-M3C). Controlling for the unemployment rate, changes in the foreign population are marginally statistically significant (M1B-M3B). This finding is in line with the group threat theory: More immigration leads to a stronger perception of competition and, therefore, to a higher perceived threat due to immigration. Besides, the results show that party landscapes with more negative positions toward cultural diversity lead to a stronger perception of immigrants as an economic threat (M1-M4). The perception of immigrants as an economic threat is more likely to emerge in countries with a more prevalent anti-diversity party rhetoric (between-effect only). 14 This finding suggests that differences in public attitudes toward immigrants can be explained by long-term differences in the political framing of ethnic diversity, not by short-time changes of party positions within countries. In the models M4 (A, B, and C), we introduce the respondents' satisfaction with the national economy. This leads to insignificant macro effects of most economic indicators (with the exception of the within-component of GDP). The changes from significant to insignificant effects may indicate that the evaluation of the country's economic situation strongly mediates the relationship between the objective economic situation and the subjective evaluation of immigrants.
To address this more directly, we investigate the relationship between the country's economic situation, the subjective evaluation of the national economic situation, and the perception of immigrants as an economic threat in greater detail in the following section. More specifically, we test the assumption that the respondents' perception of how well the country performs economically mediates the relationship between the country's economic situation and perceived economic immigrant threat. For this purpose, as noted above, we apply multilevel mediation modeling in an SEM framework. Figures 2-4 show the mediation models for each macro indicator separately (M5A, M5B, and M5C). Model M5A reveals that a higher level of GDP per capita (relative to the country-average) is associated with a more positive average satisfaction with the national economy, which decreases the average perception of immigrants as an economic threat. Similarly, M5B and M5C show an indirect path from unemployment and public debt to the perception of immigrants as a threat. A more negative average evaluation of the country's economic situation mediates both effects. Furthermore, the direct effects' coefficients and significances suggest that economic satisfaction strongly mediates the influence of the respective economic indicator. The indirect effects suggest that unemployment rates have the strongest bearing on perceived economic threat, followed by public debt and GDP per capita.
To investigate the people's sensitivity toward different aspects of the national economy simultaneously, we run a joint mediation analysis for the three macro indicators (Model M5D in Figure 5). The path diagram ( Figure 5) shows the mediating paths on the country-year level. We can see that the people's evaluation of the national economic situation fully mediates the effects of changes in the country's economy on perceived economic threat. However, whereas we find statistically significant paths from GDP per capita and the unemployment to the mediator variable, the corresponding path of public debt is only marginally significant. Comparing these coefficients indicates that the population is most sensitive to the country's labor market situation: The unemployment rate has the strongest impact on the average evaluation of the national economy. Furthermore, the indirect effects support our hypothesis that the subjective satisfaction with the country's economy mediates the effects of temporal changes in GDP per capita and unemployment rate. Overall, our analyses reveal that the subjective evaluation of the country's economy mediates the effect of short-time changes in GDP per capita and the unemployment rate. Although this relationship is less pronounced for the country's financial performance, we can conclude that a better economic performance indeed predicts a more positive perception of the country's economy among the national population. This shows that the public is indeed sensitive to economic developments, but not so much to public debt changes. This subjective economic evaluation, in turn, influences the public evaluation of immigration as an economic threat.

The individual level
We now briefly turn to the individual-level results in Table 2, which displays our individual-level findings without the addition of macro-level variables. 15 Here we see that the personal economic situation is statistically significantly related to evaluating immigration's impact on the national economy. More specifically, individuals in a more challenging economic situation or a lower occupational position are more likely to view immigrants as economically threatening. Model 3 also suggests that some labor force status effects flow from feelings about the household income. The results show that respondents with difficulties living on their current household income are more likely to hold negative immigrant views. The effects are also substantively important. For instance, in Model 3, the overall income effect is larger than is the difference between respondents selfidentifying as politically right vs. those identifying as left.
Model 4 finally adds satisfaction with the country's economy as a predictor. The labor market position's effect is more pronounced for individuals in lower occupations than for unemployed individuals. This finding suggests that a lower level occupation correlates with job insecurity, which triggers fears of increasing competition on the labor market due to immigration (Heizmann, 2015). Several previous studies also show labor market position effects (Kunovich, 2004;Schneider, 2008). However, as Hainmueller and Hopkins (2014) suggest, such a finding may not be due to labor market competition as a cognitive mechanism but express other types of insecurities. In any event, these results underline the importance of including a differentiated measurement of labor market participation.
Besides the individual financial and employment situation, we can see that the satisfaction with the country's economy also strongly correlates with the perception of immigrants as an economic threat. Individuals with a more positive view of the national economy are less likely to develop such negative perceptions of immigrants. The variable's influence is also substantively very strong, with a maximum effect of more than two scale points between the most positive and negative evaluation of the economy even after controlling for a host of other socioeconomic factors.
In sum, the individual-level findings indicate that various aspects of what can be called an adverse individual economic situation lead to a stronger perception of immigrants as an economic threat. As noted above, this may be due to the hardships and insecurities these positions entail, rather than direct labor market competition. At the same time, the strong association between the individual's satisfaction with the country's economic state and perceived economic threat suggests that, in addition to the individual economic situation, the perception of the country's economic situation plays an essential role.

Discussion
Following our research objectives, a first aspect to note is that focusing on a particular type of threat clearly is beneficial when theorizing and analyzing the influence of specific types of societal strains such as economic ones. This is not only suggested by public debates on immigration issues, in which the purported positive or negative effects of immigration are discussed extensively for specific contexts. It is also evident when looking at prior theorizing and research (e.g., Meuleman, 2011;Meuleman et al., 2019;Stephan and Stephan, 2000;Van Setten et al., 2017). The relevance of economic issues is also evident across the analytical levels of our analyses: on the macro level, we clearly see expected results for the perception of immigrants as an economic threat, and it is also evident when looking at the influence of individual-level factors, where we find economic factors to have large coefficients. These strong associations suggest that research on attitudes toward immigrants would be well-advised to take more interest in these and other sub-facets of individual expressions.
Regarding the types of economic aspects investigated here, our addition of public debt as a further indicator yielded the insight that this dimension also can play a role in attitudes toward migration, even though its final net effect was only marginally statistically significant. Nevertheless, the overall results suggest that this readily available indicator could augment future analyses of anti-immigrant animus. This is especially the case when the country context involves a large set of countries experiencing this type of economic hardship, as has been the case in various places in recent years. For instance, it may well be that levels of debt are more influential when it comes to public opinion toward redistributing welfare resources toward immigrants: high levels of debt may increase welfare chauvinism, that is, the idea that immigrants should not partake from welfare resources (Heizmann et al., 2018;Kitschelt, 1995;Reeskens and Van Oorschot, 2012), because debt itself may pose a strain on public finances. Again, such a focus on more concrete outcomes and policy issues can be beneficial because it allows us to articulate the theoretical links much more precisely than is the case with composite indices of immigration-related sentiments.
Furthermore, our results confirm earlier findings which indicate that it is crucial to investigate changes within contexts compared with the long-term contextual situation (Czymara, 2021;Kaufmann, 2017;Patana, 2018). Rather than the baseline level of the national economic and financial situation, it is the shifts in these contexts that shape differences in public attitudes.
Our investigations into the mechanisms linking economic developments and the perception of immigrants as an economic threat revealed that material consequences of economic downturns explain only a fraction of their relationship to our outcome variable: When we enter labor market position and respondents' household income evaluation, we still find an influence of our macro-level indicators. However, once we also control for respondents' appraisal of the economy's state, these relationships disappear. This strongly suggests that objective economic effects have a notable perceptual component regarding their linkages to perceived economic threat. To address this issue more directly, we performed a multilevel mediation analysis in an SEM framework to see to what extent satisfaction with the country's economy mediates the net relationships between the macro-economic indicators and the perception of immigrants as an economic threat. These results show that satisfaction with the national economic situation is an important mediator between objective economic conditions and perceived economic threat. These findings imply that group threat and realistic group conflict theory provide an excellent explanatory model of perceived economic threat. Our investigation of the mechanisms behind this suggests that the competition presumed by this theory is more strongly related to collective rather than individual resources: The assessment of the country's economy as the decisive mediating factor is a dominant competitive aspect at play in the formation of perceived economic threat.
Besides this, we found that the unemployment rate is the most important factor when it comes to these mechanisms. The second strongest statistically significant path emerged for GDP per capita, while the results for public debt are less clear. This suggests that unemployment and GDP per capita, and only to a lesser extent the national government debt levels, are salient and therefore matter for public opinion. It appears that the aggregate party position does not moderate these relationships, which implies that the competitive mechanisms proposed in group threat and realistic group conflict theories are independent of such political factors. However, the political climate of a country can be measured in various ways, so the question of political moderators of intergroup conflict represents an opportunity for further research.
Furthermore, we can say that perceived threat appears to originate in a notable part from perceptions relating to the economy, which is clearly a collective asset. Together with our macro-level results, this finding is in line with Quillian's (1995) conceptual assertion that group threat emerges and operates on the collective level. However, this not only applies to the relationship between perceived threat and prejudice but also to the formation of perceived threat itself.

Conclusion
The economic crises of recent years left a notable legacy in many ways. Tensions within countries persist, and new social and economic insecurities emerge throughout the world as the current economic situation appears fragile in many places. With our analysis, we provide a view of the consequences that different and salient types of economic developments have for an important aspect of social cohesion: The perception that immigration is bad for the economy is not only an important indicator for measuring anti-immigrant attitudes, it is also a hallmark of public and political discussion when it comes to arguments about regulating immigration. By juxtaposing this indicator with decidedly (socio)economic factors on both the country and the individual level, we were able to arrive at several important findings. In contrast to employing more general outcome measures such as preferences for many or few immigrants, we could formulate a conceptually clear mediation model, focusing on objective economic conditions and subjective economic perceptions. This would hardly be possible when it comes to general composite attitudes. Taken together, this also underlines that taking a distinct perspective on the economy can be fruitful, as it enabled an investigation of concordant perceptual channels in the first place.
However, further issues remain open for future investigations, as there are limitations to the analysis presented above. One is that our data are not individual-level panels, so that our longitudinal investigations are restricted to the macro levels of analysis. Second, an even larger time frame would be necessary to be sure of any crisis-attitude relationship, as we arguably cannot claim to have a sufficient database to capture a fully realized post-crisis-rebound in attitudes across a large set of countries. Finally, while we were able to capture a significant portion of structural and political aspects, we do not investigate whether there are social policies or other institutions that may mitigate some or all of these relationships (Careja and Andreß, 2013;Crepaz and Damron, 2009;Heizmann, 2015Heizmann, , 2016Nagayoshi and Hjerm, 2015;Schlueter et al., 2013;Weldon, 2006). Given the complexities and dimensions of the various social and economic policies that could be relevant here, such an investigation is clearly beyond the scope of the present article. Transcending the issue of economic downturns, future research should investigate whether other cross-nationally varying phenomena such as the current COVID-19 pandemic have implications for attitudes toward immigrants as well. To what extent these go beyond the pandemic's concurrent economic effects can only be settled once such additional data are collected.
In conclusion, we can say that a notable and important link exists between objective economic downturns and perceived economic threat. At the same time, the subjective individual perception of strain in the country's economy seems to matter most in producing these relationships, which shows that economic upheavals have societal consequences beyond their more direct material implications (Goldstein and Peters, 2014). This exemplifies the advantage of moving beyond general composite outcome measures such as broad immigration preferences or general prejudice: When we focus on a specific societal aspect or institution, the opportunities for spelling out precise conceptual linkages and testing such linkages increase considerably. Such a perspective is also much more aligned with the arguments put forward in societal discourse about immigration. These arguments usually circle around the purported consequences of immigration for several different aspects of society, and the economy is one of the most pertinent of these aspects. We are witnessing a growth of political actors seeking to capitalize on such dynamics of many other immigration-related popular perceptions, for example, perceived cultural threat. Further investigations of such processes thus are of utmost importance for the social sciences and beyond.

Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the German Federal Ministry of Education and Research.

Supplemental material
Supplemental material for this article is available online.

Notes
1. Most macro-longitudinal empirical analyses employ yearly or survey-round data when operationalizing economic and other factors. To a large extent, this may be a simple matter of data availability. However, some of the recent literature on terrorist events and anti-immigrant attitudes (Jungkunz et al., 2019;Legewie, 2013) and another study on the effect of the most recent U.S. presidential election on Euroscepticism (Minkus et al., 2019) suggest that respondents in surveys are aware of what has happened right before their interview or completion of the questionnaire. In an early phase of the project, we also investigated the possibility of using quarterly figures assigned to the quarter in which the respective survey interview took place. However, the correlation between yearly and quarterly figures of the indicators we investigate here had ranged between .863 and .989, which implies that quarterly fluctuations add little information over and above year-to-year dynamics. We therefore chose to focus solely on yearly averages. 2. At lower levels of analysis, issues of prejudice-driven self-selection into neighborhoods or friendships become more pertinent, which makes the causal relationship between contact and threat more ambiguous (e.g. Maxwell, 2019). 3. There is also evidence that individual contact can moderate the influence of personal economic situations (Thomsen and Birkmose, 2015). Since we lack appropriate indicators for this for most of our countryyears, we cannot include this perspective here. 4. We thank an anonymous reviewer for the suggestion to include Manifesto Project data in our analyses. 5. As a robustness check, we re-estimated the models based on the sample including these outlier countries (Tables A1-A4 in the Online Appendix). However, the results are similar to the results discussed in this article. One deviation that needs to be pointed out on the macro level is that the between-component of the GDP shows stronger effects in the robustness check than in the models presented here. Moreover, the effect of the between-component of the foreign population turns negative and significant, which underlines the outlier status of the excluded countries regarding this variable. Apart from this, the effect sizes only slightly differ at both the macro and micro level. The overall substantive picture therefore remains identical. 6. This dependent variable is based on responses to the following question: "Would you say it is generally bad or good for [country]'s economy that people come to live here from other countries?" 7. We decided against the operationalization of personal financial situation based on the household's net income due to missing value issues. Whereas 18 percent of the full sample refused to indicate or were uninformed about their household's income, only 1.5 percent did not rate their satisfaction with the household's income. 8. One anonymous reviewer suggested going further in the form of controlling for cultural threat. However, this would be difficult, as it would introduce endogeneity problems with respect to our dependent variable: Perceived threat is a causal antecedent to a host of other outgroup-related attitudes and behaviors (Blumer, 1958;Bogardus, 1925;Stephan and Stephan, 2000), and different forms of threat have, to the best of our knowledge, not been aligned in a causal sequence with each other. However, as a robustness check, we re-estimated the models M1 to M4 including the personal motivational values Conservation and Universalism that are closely related to immigrant attitudes (Davidov et al., 2019;Davidov and Meuleman, 2012). Values are of a more foundational nature and thus do not entail the same problems of reverse causality that other types of perceived immigrant threat have. According to Sagiv and Schwartz (1995), conservation describes the need to maintain the status quo and is composed of the subordinate values of security, tradition, and conformity. Universalism is composed of tolerance, the concern for others' well-being, and understanding also for people with diverging beliefs. However, the results are similar to the results discussed in this article. Although the effect sizes differ slightly at both the macro and micro level, the overall picture of the effects of interest remains identical. In the Online Appendix, we provide the models' full results including the values Universalism and Conservation (Online Appendix  Tables A7-A10). 9. https://data.oecd.org/ 10. https://ec.europa.eu/eurostat/data/database 11. Anti-diversity indicators include the enforcement or encouragement of cultural integration, appeals for cultural homogeneity in society, and favorable mentions of the manifesto country's nation, history, and general appeal. Pro-diversity indicators include opposition to patriotism, nationalism and other national ideas, and favorable mentions of cultural diversity and cultural plurality within domestic societies. 12. Since we divide the data set of the country-waves with a field period spanning over the turn of the year, one might argue whether respondent's completion of the survey earlier or later in the field period is correlated with specific respondents' characteristics. These characteristics, in turn, could be correlated with our dependent variables. Thus, we include an additional variable for the specific time of the field period in which the interview was conducted (month 1 to month 7), and thereby control for a possible bias in our database related to whether a person was reached early or late in the respective country's field period. 13. We re-estimated the models M1 to M4 as fixed-effects models including country dummies in our analysis. The results of these fixed-effects models are similar to the results of the three-level models based on annual data. On the individual level, we find some minor deviations in the effect sizes regarding age and political orientation. On the macro level (within-country component), we find some minor deviations in the effect sizes. Please consult the Online Appendix to view the full results of the fixed-effects models (Online Appendix Tables A16-A19). 14. As suggested by one anonymous reviewer, we also investigated the interaction between party positions and the macro-economic indicators (M3A-M3C). In line with the scapegoating hypothesis, it can be argued that in countries with a negative political framing of migration and cultural diversity, the economic situation more strongly translates into anti-immigrant attitudes of the population. As the model results in the Online Appendix (Table A20) suggest, all interaction terms tested turned out to be statistically insignificant. However, due to increasing model complexity, we could not test all interactions. For GDP and government debt, only the models including the interaction on the country-year level converged (within components). 15. Table A21 in the Online Appendix shows the final model M4 when we consider the different macrolevel variables. However, the individual-level results are robust and do not change when the macro-level indicators are included at the higher levels.