Queuing to leave: A new approach to immigration


 This paper uses queuing theory to examine the linkages between legal and illegal immigration. This approach is particularly appropriate for periods of mass migration and can be used to look at how the magnitude of people trying to migrate affects the choice between legal and illegal channels. An empirical illustration shows how origin-country conflict and past migration differently affect current legal and illegal flows. With data for Schengen countries from Eurostat for documented immigration and the European Agency for the Management of Operational Cooperation at the External Borders of the Member States of the European Union (Frontex) for illegal border crossings (IBCs), I implement a generalized method of moments (GMM) strategy using different estimates of conflict-related deaths and lagged flows of immigration as external and internal instruments, respectively. Violent conflict has a positive and significant effect on IBCs but not on documented migration flows. I find evidence of positive spillovers from the legal channel of immigration into the illegal channel but not vice versa.


Introduction
In 2015, 1.83 million irregular migrants arrived at Europe's external borders. 1 They came primarily from countries facing political unrest in the Middle East and Northern Africa.
The spate of revolutions known as the Arab Spring began around December 2010 but immigration from the region peaked much later in 2015. With this context of the highest migration flows since World War II, my paper applies an alternative framework to understand the dynamics of legal and illegal immigration and looks at the effect of violent conflict on both channels.
The central idea of this research is that illegal immigration emerges out of stringent controls in the parallel legal system. This idea is also contained in work by Auriol and Mesnard, 2016 where the authors consider the eligibility criteria of legal channels as "rationing mechanisms" that generate an illegal counterpart. Using a different methodology based on queuing systems (QS), my paper seeks to formalize this theory and present some empirical substance on it. Despite much journalistic attention, the current migration crisis has not received its due in academic work as yet. Further, the canonical models of migration are not specifically suited for crises of the sort recently witnessed and those that may arise in future due to political instability or climate change.
The QS framework is ideal for scenarios of shortage as it allows for two simultaneous allocation mechanisms -the price and the waiting cost to acquire the good or service (Sattinger, 2002). The theoretical framework in this paper focuses on the latter, such that the waiting cost of migration is proportional to the magnitude of people wanting to migrate (Jasso et al., 2010) . This allows individual migration choices to be dependent on the traffic or magnitude of people trying to migrate at a given time. Further, due to additional frictions caused by immigration policies, potential migrants may trade-off higher returns from legal immigration for the lower waiting costs and easier access from illegal entry. I consider three cases to depict frictions in the legal queue for immigration that are set by the host country: an arbitrary rejection rate, a minimum waiting time criteria that each migrant must meet, and a capacity limit on the total number of migrant applications. These immigration policy regimes have real-world counterparts, often in combination with each other. In the first two cases, the migrant chooses the number of attempts to migrate legally and the amount of time spent waiting to migrate, respectively. These endogenous choices vary based on overall traffic in the system, exogenous policy parameters, and individual time-preferences. Using simple comparative-statics results, I can thus identify the effects of changes in the legal QS on flows in the parallel illegal queue. I find that increased traffic, i.e., more people trying to immigrate, greater stringency in legal immigration, and higher levels of impatience to immigrate, all lead to an increase in illegal immigration flows. The third scenario illustrates a case of fixed immigration quotas set by the host country wherein the migrant cannot choose to remain in the QS for legal immigration once the limit capacity is reached. This baseline queuing model of immigration does not consider heterogeneity among migrants but instead focuses only on changes in the parameters that characterize the legal and illegal channels of immigration. Under perfect information, migrants would conceivably sort into many separate QS of her own "type," where the parameters would reflect that specific type. Such separation of queues is common, for example by skill, origin-country, or capital investments. 2 Due to the lack of data at the individual migrant level to illustrate the theoretical model, I apply a reduced-form empirical strategy using aggregate flows of legal and illegal immigration into the Schengen region. Aggregated annual data on legal migration is available from Eurostat; similarly, the number of detected illegal border-crossings (IBCs), disaggregated by migrants' country of origin, is available from the European Agency for the Management of Operational Cooperation at the External Borders of the Member States of the European Union (Frontex). 3 Applying a generalized method of moments (GMM) approach, I look at the effect of origin-country violent conflict on legal and illegal immigration into the Schengen region.
Conflict has been shown in related literature to increase the number of people willing to migrate (Bohra-Mishra and Massey, 2011), as well as alter individuals' time preferences, making them more impatient (Voors et al., 2012). As suggested by the queuing theory framework, the empirical section finds that violent conflict leads to an increase in illegal immigration and has no effect on legal immigrant flows. Further, I use the dynamic panel-data setting to examine spillovers between both types of immigration flows and persistence within each. I find evidence of positive spillovers from legal immigration flows to undocumented migration but not vice-versa. These findings, however, are not structural results but still illustrative of the model's predictions. This paper draws from and contributes to three branches of literature: (i) the economics literature on migration -which has focused on its causes and effects, along with optimal immigration policy, (ii) the impact of conflict on migration, and (iii) the literature on the application of queuing theory to economic phenomena.
Firstly, this paper adds to the vast literature on immigration choices. In my reading, I distinguish between studies that deal with the choice to migrate or not, 4 and those that deal with choices subsequent to that initial decision. The latter refers to choices of destination (Grogger and Hanson, 2011;Munshi, 2003), route, mode and duration. My paper also falls in this latter category as I take the decision to migrate as a given starting point and focus only on the choice between legal and illegal channels. It is related to extensive work by Djajić (2014), who looks at asylum seekers' choice between undocumented migration or the United Nations Refugee Agency (UNHCR) resettlement programs and the optimal duration of transit between source countries and the migrant's final destination (Djajić and Vinogradova, 2017;Djajić, 2017).
Analyses of the "effects" of immigration on host country populations or optimal policy responses are beyond the scope of this paper, as I focus on immigrant choices. Dustmann et al. (2016) provide an extremely cogent review and critique of the empirical specifications used in recent works. Studies on the "effect" of immigration on host populations are characterized by contradictory empirical findings -some have found negative effects (Borjas, 2003) while others almost no effects (Card, 1990(Card, , 2009 or even benefits (Ottaviano and Peri, 2012;Chassamboulli and Peri, 2015). This and an earlier review of the "effect" literature, Friedberg and Hunt, 1995, find more support against negative effects of immigration on host populations. The economics literature on migration has also focused on optimal immigration policy (Benhabib and Jovanovic, 2012) and Meyers (2000) gives a non-technical classification and summary of migration policy theory. 5 With regard to the ongoing refugee crisis, a relevant and contemporary policy background and description of ground realities is given by Dustmann et al. (2017). While I do not study the issue of optimal immigration policy from the host-country's perspective, it is necessary to incorporate the feedback costs of increased traffic and illegal immigration as a result of stringent acceptance rates or waiting-time criteria. 6 The Dublin Regulation states that asylum seekers must apply for refugee status in the first European country they enter -placing a large part of the processing burden on Europe's southern border countries. Although European Union (EU) countries have agreed to common principles, there is great variance in the waiting time and acceptance rates across countries, depending on processing capacity, migrant origin-country, and political pressure in the host-country (Connor, 2017). One omission in the migration literature that I try to address is the influence of "heavy traffic" or large flows of people trying to migrate at the same time on migrant choices. Most existing works focus on individual decisions between alternative channels and neglect the effect of the magnitude of flows in one channel on the other.
The second contribution of this paper is to examine the impact of conflict on migration, where the economics literature is as yet relatively sparse. Political scientists have, on the other hand, contributed much to this issue (Davenport et al., 2003;Neumayer, 2005;Bohra-Mishra and Massey, 2011). 7 Substantial literature in economics and conflict deals with the effect of conflict on income growth (Rodrik, 1999;Davis andWeinstein, 2008, 2002) often via individual components of the production function (Humphreys [2003]). Research in Sierra Leone by Bellows andMiguel (2006, 2009) looks at the effect of civil-war on institutions and individuals' political participation. A related but novel study in Burundi by Voors et al. (2012) looks at how conflict influences time and risk preferences. The authors find that even temporary shocks, such as conflict, can lead to persistent changes in behavior, making people more pro-social, risk seeking, and impatient, thereby altering savings and investment decisions. However, there is limited work in economics on the effect of source-country conflict on migration flows and how the effect differs between legal and illegal channels. This is another omission that this paper tries to address.
Finally, this paper aims to add to the growing literature in economics using queuing theory. Queuing theory involves the study of input and service processes along specific disciplines, e.g., first-come-first-serve. 8 The seminal contributions in economics are by Naor (1969) and Lui (1985) to describe the optimal provision of public goods and bribery, respectively. Market models based on queuing can operate in or outside of equilibrium unlike Walrasian models.
An important application of queuing theory has been to search and matching models in labor markets (Sattinger, 2010;Stevens, 2007). The scope of this paper extends to conceptualizing immigration as a QS with an "in-between" or waiting period, during which the migrant incurs costs. This liminal feature of immigration has not received due attention in the literature. 9 Some notable exceptions are works by Djajić (2014Djajić ( , 2017, Friebel and Guriev (2006), Hainmueller et al. (2016), andTamura (2010).
In Section 2 of this paper, I present the theoretical framework of two parallel queues for legal and illegal immigration. The section considers three different immigration policy regimes chosen by the host country. Section 3 and 4 provide a reduced-form empirical strategy to illustrate the model and its results, respectively. The final section concludes with possible extensions and limitations of my work.

Theoretical Framework
I begin by explaining the intuition behind the theory, which can be easily understood without formal proofs. Consider migration as occurring along two parallel channels or queues, one of which is legal and the other is illegal, respectively denoted by subscripts l and i (Figure 1). Migrants enter the QS and are processed for travel by immigration authorities in the legal channel or by migrant smugglers in the illegal channel, according to some stochastic processes. In the legal queue, migrants are either rejected or accepted based 9 In anthropology, the concept of liminality has been used to characterize subjects undergoing transformative and 'inbetween' experiences (Gennep, 1960;Turner, 1987). on some exogenous destination-country criteria. 10 These criteria reflect the stringency of legal immigration and are illustrated in the following cases that I will examine in detail: (I) An arbitrarily fixed rate of acceptance ν ∈[0,1] in the legal channel, (i.e., ν -(1 ) share of all entrants are not accepted to travel legally).
(II) A minimum waiting period ( ) c l W that the migrant should spend in the queue to be allowed legal entry.
(III) A finite limit K on the number of migrants allowed within the legal QS.
In Cases I and II, if migrants are unsuccessful in the legal channel, they can re-enter the legal queue and attempt again or they can enter the parallel illegal QS where acceptance is guaranteed but less-preferred. In Case III, migrants above the quota are diverted automatically to the illegal queue. In each of these stylized cases, migrants are not endowed with personalized attributes. In this respect, a specific QS can refer to a particular category of migrants and there may exist multiple such systems for each type of migrant (e.g., skilled and unskilled). The results in the following cases pertain to how changes in queue parameters influence choices of migrants who share the same observable characteristics. I proceed by using some established results from queuing theory (Medhi [2002]) and perform simple comparative statics analyses where feasible. All three aforementioned cases characterizing stringency in legal migration illustrate the central idea that ceteris paribus, larger flows of illegal migration arise out of greater legal stringency. This is denoted in Kendall's notation as an M/M/1 queue where the M stands for Markovian and I restrict attention to a single or centralized server in each channel for simplicity. The average arrival rate of migrants to the legal queue is the sum of the rate of initial entry (λ o ) and re-entry (λ r ) into the legal queue, i.e., λ l = λ o + λ r . The corresponding average rate of arrivals to the illegal queue (λ i ) will be discussed later. This setup also assumes no balking, i.e., once a migrant decides to migrate, she does not leave the QS but only chooses among the two channels and the number of attempts to make in the legal queue. 12 Service discipline is first-infirst-out (FIFO).
10 Successful exit from the QS means acceptance for the journey and not necessarily entry into the destination country.
While undocumented immigration is not necessarily successful, there are fewer (or no) criteria to fulfill to undertake the journey other than monetary payment. 11 The rate of service in the illegal channel may be better characterized as a function of the rate of entry, i.e., m i = m i (λ i ) since smugglers adapt to demand for their services. I avoid this notation for tractability and the already standing assumption that m i > λ i . This assumption needs to hold to ensure that the QS is not explosive. 12 This assumption does not change the main implications of the model because comparing the expected utility between legal and illegal migration to a third alternative (of not migrating) would not change the preferences between the first two. For further reference, Yue et al., 2009 relax this assumption and present model performance indicators using numerical simulations. Now, I define P n as the probability of there being n people in the QS. In the steady state, the rate up from n to n + 1 people in the queue must be equal to the rate down from n + 1 to n: where the rate of re-entry is λ ν µ λ --= (1 ) r l i : i.e., the total proportion of migrants who are unsuccessful l minus the fraction who switch over to the illegal queue (λ i ). Queuing theory allows us to calculate standard performance indicators, such as the expected number of migrants in the legal QS (refer to Appendix A2). Eq.
(2) gives the expected length 〈 〉 Q and we can then calculate the expected waiting time 〈 〉 l W of the queue for legal migration.

Assumption 2 The queuing system is stable with positive expected waiting times and queue
length. This is contained in the condition This assumption follows from a technical requirement for the first moments of the queue content (Eq. (2)) and waiting time (Eq. (4)) to be positive and to ensure that the queue is stable, i.e., does not explode. When this is violated, we cannot conduct comparative statics deriving from the stability condition, as the queue increases infinitely. Intuitively, the condition imposes that on average, the traffic in the legal queue must be less than the rate at which migrants exit the QS by being accepted or by switching into the illegal queue.
Migrants have a planning horizon [0,T] and incur a cost C per unit of time that they remain in their origin countries. All migrants are taken to be exponential discounters with a discount rate a. The cost C may be thought of as an opportunity cost or the cost of facing negative circumstances in their home country (such as conflict, unemployment, famine, etc.).
The cost is incurred in both legal and illegal queues while the migrant is "waiting" to leave.
The cost and discount rate are the same for all migrants in the QS. Benefits from successfully exiting the legal and illegal QS are mR l and R i per unit of time respectively (R l > R i ), where m is the maximum number of attempts made to migrate. The key idea behind this requirement is that "something" is gained even from unsuccessful attempts; it may be in the form of experience or know-how about the destination country, which yields higher rewards once the destination is reached. There is no rejection in the illegal QS and all agents are accepted for the journey in their first attempt. Benefits from exiting each queue successfully are the same for all migrants. 13 13 The benefits (R l and R i ) can be conceived as expected benefits of reaching the destination country safely net of the traveling costs, inclusive of risk differentials. While legal travel is almost certain to deliver the migrant to the destination country, it is not so for illegal journeys.
The optimization problem involves choosing the maximum number of attempts (m) the migrant makes to travel legally. The total expected return to a migrant who makes m attempts to migrate legally is the expected return from failing all m times (first term of Eq. (5)) plus the expected return from failing (m -1) times and succeeding in the m th try (second term of Eq. (5)). 14 The first and second-order condition are given in Appendix A4 and evaluating the SOC at the optimum (m*) shows us that it is a local maximum as long as the benefits from migrating legally are high enough relative to the cost of waiting. However, if expected returns from migrating illegally are higher, migrants would switch until the indifference condition is met for the incoming entrant to the system: where 〈 〉 14 Migrants only make an additional attempt if they have failed in all previous attempts. Further, the 'no balking' assumption implies that λ o is given. This-along with migrant homogeneity-rule out binding credit constraints for all entrants into the QS. 15 Some standard results from queuing theory are given in Appendix A1. For a more detailed discussion refer to Medhi (2002).
The detailed proof in Appendix A5 shows that Result 2 holds as long as the returns from legal entry relative to the cost of waiting is high enough and Figure 2 illustrates this graphically using specific parameter values. 16

Comparative Statics Result 3 Ceteris paribus, higher impatience in the form of higher discount rates (a) of the migrants leads to higher average rates of arrival (λ i ) into the illegal QS.
The intuition behind this proof is that as migrants become more impatient, they are more likely to switch over to the illegal queue. The higher gains from migrating legally would be worth less as they discount the future more. The formal proof given in Appendix A5 rests on precisely this condition that the absolute loss in expected utility from legal immigration * ( ) l E U due to higher impatience is larger than that for the corresponding loss of expected utility from illegal immigration: Figure 3 illustrates that the optimal number of attempts (m*) increases as agents are more patient, i.e., have lower discount rates.

Case II
Cases II and III illustrate similar findings as Case I but by using different aspects of QS.
The previous case considered immigration policy to be comprised of an arbitrary acceptance rate, which is not always realistic. This case expresses the stringency of legal immigration in terms of a minimum waiting time ( ) c l W and thereby a minimum cost that the migrant should incur. I assume that this is specified exogenously by the destination country. The waiting time criteria may be thought of as the due diligence towards acquiring the requisite documents, skills, networks, money, etc., necessary for the journey. The expected return from legal migration after m attempts is: where | is the indicator function equal to 1 if the migrant has "waited" more than the critical amount specified by the destination country and 0 otherwise. The corresponding expected returns from illegal migration, where there is no minimum criteria, is: where mR l , R i and C are the homogeneous benefits and waiting cost per unit of time as described earlier, applicable to all migrants.
is a monotonically decreasing function of the discount rate defined in Case 1. This patience parameter represents the maximum number of times a migrant is willing to re-attempt legal migration before switching to illegal routes. 19 In this case, it is analytically infeasible to calculate the moments of the queue content and waiting time in the parallel systems. However, a simulation illustrates how queue content varies with * c l W and P.
The simulations (Figures 4 and 5) show that: • The relative magnitude of illegal migration increases as the minimum waiting criteria, * c l W is increased (from 18 to 40) or the patience parameter, P is decreased (from 4 to 1).
The converse is true for the relative share of legal migration.
• The queue content exhibits cycles, accumulating and reaching a peak before periodically emptying out once enough potential migrants achieve the minimum waiting criteria. 20 This behavior is similar to that of a syphon studied in detail by Filliger and Hongler (2005). 17 https://www.nber.org/digest/nov16/immigrants-play-key-role-stem-fields (Accessed: March 25, 2021) 18 If a request for refugee status is rejected, there is an appeal process in the EU which would involve another round of waiting. 19 This is similar to m* described in Case I but it will not have the same functional form. 20 Figure 6 illustrates that cycles of immigration flows exhibit such cycles over time. However, this must be interpreted with caution because cyclic behavior in the queue content induced by the waiting time criteria is not possible to distinguish in the data from changes in immigration policy, seasonality and changes in origin-country circumstances.

Case III
This case models the stringency of legal channels of immigration in the form of limited waiting area capacity ( Figure 6). It is similar to quotas -e.g., those imposed yearly on residence permits and short term permits in Switzerland. 21 This is an application of a textbook queuing regime and has been studied in depth by Naor (1969) in the context of imposing tolls to optimize social welfare. The derivations of the QS averages follow similarly with a capacity constraint K (refer to Appendix A3, Case III).
The analysis is simplified in this case since migrants do not really have a choice about which route to take. 22 Both queues operate in parallel with expected returns from legal and illegal migration given below: 21 https://www.ge.ch/moe/uk/autorisation.asp (Accessed: September 12, 2018) 22 Another matter of interest may be to find the optimal K for the destination country by considering the cost of border control. Since optimal immigration policy itself is not the subject of this paper, I do not attempt it here.
As expected, an increase in the waiting area capacity (K) decreases the rate of arrivals (λ i ) into the illegal QS. Refer to Appendix A3, Eq. (19).
Before moving on to the empirical section, I summarize the implications of the theory below: • Given an increase in the number of people attempting to migrate from an origin country and fixed parameters of the legal QS, there will be a spillover into illegal immigration.
• Greater stringency in the measures controlling legal immigration, holding the flow of overall potential migrants fixed, would lead to an increase in illegal immigration.
• Higher levels of impatience among potential migrants would lead to more "switchingover" to the illegal channel.

Empirical Model
Due to the lack of and limitations in existing data, a structural estimation of the model is not  also makes people more impatient to leave (i.e., increases the discount factor a). Regarding impatience, I rely on existing results of Voors et al. (2012), which show that incidences of conflict have the effect of altering individuals' time preferences, making them more impatient. The dataset refers to immigration into the Schengen region, which is comprised of many different countries; so, destination-country immigration policy is hard to capture. Year fixed effects are included to control for changes that occur at the Schengen region level.
Thus, the two main effects I look for in the data are of origin-country shocks of conflict and inter-QS effects. The equations to be estimated are: α λ β π γ δ ε --- where the dependent variable k it and its lag refer to the log of IBCs into the Schengen region from country i in year t, and l it the corresponding log of inflow of documented or legal migrants. 23 The variable c it-1 refers to the log of conflict-related deaths occurring 1 year prior to the year of migration. The lag is used to account for the fact that migration requires preparation or waiting time before the journey can be undertaken. Relevant covariates (x it ) and year (λ t ) and country (a i ) specific fixed effects are included. e it and η it are the pure error terms.

Data sources
Available data on the EU refer to migrants who have successfully, either legally or illegally, entered the EU. The data on the inflow of migrants with legal status are from Eurostat, the statistical office of the EU. These data are disaggregated by country of citizenship and are available yearly. The definition of a "legal migrant" varies from country to country. 24 Schengen countries usually require an actual or intended stay of 12 months and report the data to Eurostat from population registers, administrative records, and national surveys. was used by an organized actor against another organized actor, or against civilians, resulting 23 According to Massey et al. (1993), over time, migration becomes independent of the individual causes that started the process and becomes its own cause. Decreasing costs and risks, network effects and institutional factors (for example humanitarian and illegal agencies) perpetuate the flow of immigrants once started. Persistence in the dependent variables would demonstrate this. 24 Eurostat defines immigration as the action by which a person establishes his or her usual residence in the territory of a Member State for a period that is, or is expected to be, of at least 12 months, having previously been usually resident in another Member State or a third country. Illegal migration or asylum seekers without legal status are not included in this Eurostat immigration dataset. 25 While there is bound to be some measurement error in the Frontex data as many entries into the Schengen region go undetected, the error is unlikely to be specific to any origin countries.
in at least one direct death at a specific location and a specific date. The UCDP dataset records three values for the number of conflict-related deaths: a low, high, and a best estimate. All  Table 1. 26 The UCDP BRD dataset is an automatic filtering and aggregation of the UCDP GED and records deaths resulting from an armed conflict at multiple battle locations. I use only the BRDs which occurred solely within Syria. UCDP defines an armed conflict as a contested incompatibility that concerns government and/or territory over which the use of armed force between two parties, of which at least one is the government of a state, has resulted in at least 25 BRDs in 1 calendar year. 27 I use an estimate of rule of law from WGI which defines it as capturing perceptions of the extent to which agents have confidence in and abide by the rules of society, and in particular the quality of contract enforcement, property rights, the police, and the courts, as well as the likelihood of crime and violence. The estimate is a normalized indicator ranging from -2.5 to 2.5. 28 The inverse hyperbolic sine transformation transforms variable y i to + +  Source: Author's representation.

Identification strategy
The parameters of interest are the β ′s and γ ′s of Eqs (15) and (16). Due to potential endogeneity and the dynamic panel setting, I use a GMM approach to estimate the coefficients of interest using internal as well as external instruments. The external instrument to consistently estimate the effect of conflict arises from the dataset itself. The UCDP dataset records three values for the number of battle related deaths: a low, high, and a best estimate. The estimates are collected from third parties such as news agencies, international and non-governmental organizations.
In addition, the sources also include reports from the warring parties themselves (governments and opposing groups). Due to the difficulties in accessing accurate information during a violent conflict and the vested interests of governments or opposition parties in releasing accurate fatalities, there are discrepancies regarding the exact number of conflict-related deaths. This is even greater when conflicts are spread out geographically over a region, some locations of which are inaccessible. The discrepancies, measured by the difference between the high and the low estimate, are positively and strongly correlated with the level of the best estimate, thereby satisfying the criterion of instrument relevance. This should be unsurprising as it is harder for independent reporters or watchdogs to access locations during conflicts occurring at a massive scale (Themnér and Wallensteen, 2014). 29 The second criterion of the exclusion restriction is more complicated to support. The difference in the high and low estimates of death may actually be picking up the nature of institutions instead of the intensity of the conflict itself. To account for this, I control for the quality of institutions in the country by using the rule of law indicator. Further, if we consider the group of countries which have no discrepancies in the measurement of deaths in the presence of violent conflict, their mean score on the institutions indicator is negative (−0.61), which is clearly a counter to the argument that the instrument is picking up institutional quality.
In this dynamic panel setting of lagged effects and in the absence of sufficient external instruments, I use a GMM approach to exploit all available moment conditions using internal instruments. Due to the possibility of persistence and the high relative share of variance in fixed effects α ε σ σ 2 2 ( ), the first-differenced GMM estimates may suffer from poor finite sample properties, namely bias and imprecision, since lagged levels are weak instruments for firstdifferences (Blundell and Bond, 2000). Hence, I estimate the model using system GMM, which estimates the model using the equations in levels and differences to improve the strength of internal instruments. Lastly, another issue potentially compounding the endogeneity problem is the possibility of serially correlated errors. This is addressed by the common factor representation below given by Blundell and Bond, 2000 and also implemented by Arcand et al. (2008). (1 ) ( 2 1) Results using the above estimation techniques are presented in the next section.

Results
I focus first only on the effect of conflict and omit the lagged legal and illegal inflows from the right-hand side of the model. Results using pooled Ordinary Least Squares (OLS) and within-estimators are given in Tables 2 and 3. The significance of the positive conflict coefficient remains for IBCs after introducing controls and fixed effects but not for legal inflows. In Column 4 of Tables 2 and 3, I restrict the sample to only those countries with any present or past incidences of conflict within the panel length, to explore further the relationship between the two migration variables and conflict. The significance of the positive conflict coefficient remains for IBCs but not for legal inflows. This illustrates that the relationship between conflict and illegal migrant flows is not driven solely by the differences between countries that experience violent conflict and those that do not. Now, given that there are endogeneity issues, most obviously due to omission of lagged inter-queue variables, the coefficients in Tables 2 and 3 are likely to be inconsistent. As 29 Refer to Iraq Body Count studies: https://www.iraqbodycount.org/ mentioned in section 4.2, I use the difference between the high and low estimates of conflict deaths (CD) as an Instrumental Variables (IV) for its best estimate. This is driven by strong correlation between the level of discrepancy and the level of the conflict itself. Controlling for the quality of institutions, as measured by the rule of law indicator, this discrepancy should not be related to immigration in any other way.
Using the difference between high and low estimates of CD as an IV, Table 4 shows that lagged conflict in origin countries positively affects IBCs but has no effect on the legal inflow of Note: *p < 0.10, **p < 0.05, ***p < 0.01. Standard errors, given below coefficients in parentheses, are clustered at the country level. CD, conflict deaths. Note: *p < 0.10, **p < 0.05, ***p < 0.01. Standard errors, given below coefficients in parentheses, are clustered at the country level. CD, conflict deaths.
migrants into Schengen countries. The coefficient for conflict is relatively stable across specifications. There is a strong mechanical correlation between the IV and the endogenous conflict variable (refer to Table 4, Part B). This "relevance" of the difference in high and low estimates of CD to its best estimate is because for observations which have no conflict, the difference in estimates is also equal to zero. Thus, I restrict the sample to only those countries which see any present or past incidences of conflict within the panel length (Columns 3 and 6, Table 4) and find that the result still holds. The strength of the instrument does not rely on mechanical relevance alone (Columns 3 and 6, Table 4 Part B).
Finally, I turn to the complete model (Eqs (15) and (16)), which includes the inter-queue effects. 30 Table 5 uses lags -1 t to -3 t of endogenous variables as instruments and the external instrument mentioned earlier. All estimates are calculated using the two-step covariance matrices along with the finite-sample correction given by Windmeijer (2005), which makes two-step robust estimations more efficient in small T large N datasets. However, the results presented in Columns 5 and 6 of  Note: *p < 0.10, **p < 0.05, ***p < 0.01. Standard errors, given below coefficients in parentheses, are clustered at the country level. CD, conflict deaths.
From Table 5, there is evidence of positive spillovers from legal immigration flows on illegal flows but none in the opposite direction. There is also evidence of persistence of own queue effects. The previous results regarding the effect of conflict related deaths still hold, in that they positively affect illegal immigration flows and have no effect on legal flows.

Additional results
One drawback of the above results is that it does not account for the inherent differences between people attempting to migrate legally compared to those who do so illegally. Documented migration to Europe usually occurs under the following categories -remunerated activities, family reunification, education and humanitarian reasons. Differences within individuals from the same country would make some people more eligible to meet these criteria than others. Since I do not have data on individual level characteristics, I cannot control for them. However, the theory in Section 3 implies that given the same characteristics of individuals, migrating via the legal queue is likely to involve larger waiting costs that lead some people to switch over to the illegal channel. Looking at the effect of violent conflict on the flows of legally resettled people Note: *p < 0.10, **p < 0.05, ***p < 0.01. Standard errors, given below the coefficient in parentheses, are clustered by country. Columns 1-4 use the two-step and Columns 5 and 6 use the one-step co-variance matrix estimations. CD, conflict deaths; GMM, generalized method of moments.
who might share similar characteristics within the origin countries gives evidence to these waiting costs.
"Resettlement is one tool to help displaced persons in need of protection reach Europe safely and legally, and receive protection for as long as necessary. It is a durable solution which includes selection and transfer of refugees from a country where they seek protection to another country" EPRS, 2017. The UNHCR has to determine whether an applicant is a refugee according to the 1951 Geneva Convention, and has to identify resettlement as the most appropriate solution. From Table 6 we see that the relationship between violent conflict and the magnitude of resettled persons is not very robust within the dataset available. Only the third lag of CD is significant using the within estimator and this significance becomes weaker after introducing other covariates. The same goes for results from 2SLS estimation using the difference in estimates of CD as an IV for CD.

Discussion
This paper is addressed to two broad audiences. The first audience comprises of development economists who are working on immigration and would be interested in alternative frameworks to study mass migration and crises therein. The second audience includes those economists who work on stochastic processes and specifically, queuing theory, who would be interested in its application to real-world phenomenon such as migration. This paper provides a stylized  197 197 197 192 197 192 Note: *p < 0.10, **p < 0.05, ***p < 0.01. Standard errors, given below the coefficient in parentheses, are clustered by country. CD, conflict deaths.
model focusing on how migration crises emerge out of linkages between legal and illegal channels of entry and the dynamic nature of the same. However, it has several limitations. Firstly, it does not account for migrant heterogeneity and this is one research area with great potential for future work. 31 Secondly, the current framework is restrictive in that it does not allow for complete breakdowns of migration control services as we have witnessed in the recent past.
Under such circumstances of discontinuity, massive flows would, in fact, drive costs of illegal migration further down. Despite these limitations, this baseline illustrates how the migration choices of others may influence individual decisions beyond a certain threshold level of traffic.
Empirically, this paper attempts to study the effect of conflict on different channels of immigration. To the my knowledge, this has not been addressed as yet in the context of the recent crisis and particularly, has not made use of the Frontex dataset on IBCs into the Schengen region. While I cannot estimate the full structural model and the panel length of the data is only 8 years, the results show clearly the one-way inter-queue effects spilling over from legal to illegal flows and the lack of sensitivity of legal immigration to origin-country shocks such as conflict. It is however quite possible that the short length of the panel does not allow these effects to show up -but that is precisely support for the frictions that the theory assumes.
Although much attention has been given to South-North migration in the media, North-North and South-South migration together account for a majority (59%) of global immigration with South-South migration having the largest share (UNDESA, 2013). Crisis-like scenarios regarding South-North migration emerge due to the rigidity and slow-moving nature of legal processes of resettlement and assessment of asylum applications. A role for future research would be to shed light on immigration policies that account for inter-linkages between different channels instead of addressing individual channels as systems in isolation.

Availability of data and material
All data used in this paper are publicly available and can be found in the sources provided in the Data Sources section. Links are listed below. 1. Data on legal immigration flows are from Eurostat downloadable at: https://ec.europa.eu/eurostat/data/ database 2. I received data from Frontex on IBCs via email but they are now publicly available at: https://data.europa. eu/euodp/en/data/publisher/frontex 3. Conflict data is from UCDP is downloadable at: https://ucdp.uu.se/downloads/ 4. Covariates are from WDI and available at: https://datacatalog.worldbank.org/dataset/world-development-indicators So, average illegal queue length is given by:

A4. Case I -First-and second-order conditions
Migrants maximize expected utility with respect to the maximum number of attempts they make for legal entry (Eq. (5) rewritten below). Differentiating with respect to m again and evaluating at the optimum m* gives: