The Relationship between Economic Complexity and the Pattern of Foreign Direct Investment Flows among Mexican States

Identifying factors that explain the regional distribution patterns of Foreign Direct Investment (FDI) flows into an economy is no simple task, since they depend on a range of factors. In the case of Mexico, previous studies have documented the role of diverse characteristics in attracting FDI to the country’s states. This study shows that economic complexity - a variable that indicates the productive capabilities or productive knowledge that exist in a given economy's economic structure - can explain the distribution of FDI among Mexican states. Similar to previous studies, we document the spillover effects of economic complexity, i.e., we show how states surrounded by states with a high level of economic complexity tend to receive more FDI. Moreover, we document how FDI flows to manufacturing industries are positively correlated with their level of economic complexity. This result, to the best of our knowledge, has not been documented before in this literature.


INTRODUCTION
A relatively recent strand of economic literature has shed new light on our understanding of the determinants of economic growth. One determinant, economic complexity, which is a proxy for economic growth, indicates the productive capabilities or productive knowledge that exists in a given economy's economic structure (Hidalgo and Hausmann, 2009). 1 These productive capabilities are measured indirectly by looking at the mix of products that countries export. In other words, economic complexity is computed using information on the relative productive structures of different economies. Empirical evidence suggests that economic complexity can be used to anticipate future economic growth (Hidalgo and Hausmann, 2009;Jarreau and Poncet, 2012;Coniglio et al., 2016;Chávez et al., 2017). Some studies indicate that economic complexity does a better job than other variables at predicting economic growth, because it better captures the productive capacity embedded in an economy (Fukuyama, 1996;Hidalgo, 2015). The information on the productive structures of economies that is used to compute the economic complexity measure 2 conveys more detail than the aggregate economic variables traditionally used for the same purpose. 3 Given the evidence of the relationship between economic growth and economic complexity, we investigate if the latter is also correlated with the distribution of Foreign Direct Investment (FDI) flows geographically or by industry in the Mexican economy over the period 1999-2018. 4 We believe that economic complexity is related to FDI given the empirical evidence of: i) the positive correlation between economic growth and economic complexity (both internationally and intranationally), as previously mentioned, and ii) the well-documented long-term relationship between economic growth and FDI. FDI is often regarded as having a significant positive productive impact, both directly and indirectly, on the economic growth of the host countries. This effect occurs through factors such as the adoption of foreign technology and know-how (technology transfer), which occurs via the incorporation of new inputs and/or new technologies in the host economy (licensing agreements, imitation, and the introduction of new processes and products, etc.), the stimulation of physical capital accumulation, improvements in human capital and institutions, and the creation of linkages between foreign and domestic firms. Studies that have documented this relationship at the international level include Balasubramanian et al. (1996), Weinhold and Nair-Reichert (2001), Jong (2003), Chowdhury and Mavrotas (2006), and Ericsson and Irandoust (2010), while Griffiths and Sapsford (2004) have done the same for the Mexican economy.
Why might economic complexity be correlated with the distribution of FDI flows by state and manufacturing industry group? One explanation is that foreign investors prefer to place their resources in those state economies with higher measures of complexity not only because they have more productive knowledge, but also, as Hartmann et al. (2017) point out, because higher levels of complexity are an indicator of social capital, the quality of 1 Productive capabilities or productive knowledge encompass every single piece of expertise, know-how, skill, and so on required by an economy to enable it to produce a single product. For example, cars embody a whole set of productive capacities, such as mechanical engineering, metallurgy, electronics, design, human resource management, and marketing. 2 Details of the distribution and/or localization of economic activities, such as the economic activities in which economies specialize and the ubiquity of those economic activities are included in this measure. 3 Traditionally, economists have sought to explain future economic growth by taking into account all productive inputs that an economy possesses, such as the endowment of resources, human capital (average years of schooling, percentage of population with some level of education), physical capital (capital stock, public investment, etc.), infrastructure (communications, transportation, etc.), level of technology, quality of institutions, and rule of law. 4 Economic complexity has also been used to predict income inequality; see Hartmann et al. (2017). institutions, and the ability of the population to create social and professional networks in the state they live in. Additionally, and more straightforwardly, states with higher levels of economic complexity are generally more diverse economies specializing in more sophisticated economic activities. Therefore, these economies could be expected to provide superior (i.e., more profitable) and more diverse investment opportunities.
This article contributes to two strands of economic literature. First, we add to the literature that investigates the determinants of FDI attraction. We begin by explaining the regional distribution of FDI flows into Mexican states and the manufacturing industry by documenting how the amount of productive capacity or knowledge (economic complexity) embedded in them stimulates FDI inflows. We specify a more parsimonious model for predicting FDI allocation than those suggested in previous studies, which employ a larger number of variables, such as regional demand, labor-related production costs, physical infrastructure, and human capital. Second, we contribute to the extensive literature on spillovers, specifically on FDI and economic complexity spillovers. 5 Multinational firms prefer to locate in Mexican states with superior economic structures (i.e., with a higher degree of economic complexity), which benefit both newly arriving firms and those already established in the host economy. In an economy with firms engaged in more diverse economic activities and producing more sophisticated products, it is easier to create upstream and downstream linkages. Understanding these types of spillover effects matters for the design of public policy on FDI attraction, which should ideally consider the regional context and not just local factors.
The remainder of the article is organized as follows. Section 2 summarizes the results of previous studies that have attempted to determine the relevant factors in the regional distribution of FDI in Mexico, as well as previous studies that examine the link between economic complexity and FDI worldwide. Section 3 presents an overview of the evolution of FDI in Mexico by state and by economic sector. Section 4 describes the so-called "method of reflections" used to calculate the economic complexity of the various Mexican states and of different manufacturing industry groups. In Section 5, we present the results of various models that indicate the existence of a robust and strong correlation between economic complexity and FDI. Section 6 contains final remarks.

REVIEW OF THE LITERATURE ON THE DETERMINANTS OF FDI ATTRACTION
A number of previous studies on Mexico have attempted to identify the relevant factors that determine the distribution of (total or manufacturing) FDI among the country's states, Table 1 summarizes them. The distinct studies employ as a dependent variable either the number of newly FDI-funded firms or the flow of FDI in monetary units. Previous works have studied the link between FDI and economic complexity. Eck and 5 An additional advantage of using economic complexity rather than other macroeconomic variables when looking at spillover effects is that the issue of sample size is less important. When using multiple independent variables, the researcher would have to include the spatial lag of every single variable. Using one variable in our study allows us to capture many of the characteristics of the economic structures of states. To measure spillover effects, we only need to include one additional independent variable: the spatial lag of economic complexity. c Southern Regional Science Association 2021.  Pernet (2015) studies the entry of foreign firms into Chinese cities in the years 1998-2007. His results suggest that the economic complexity of a city is a key determinant of its ability to attract FDI flows. He estimates that an increment of one percent in a city's complexity is associated with a 10 percent increase in its FDI inflows. Javorcik et al. (2017) analyze firm-product-level data from the Turkish economy for the period 2006-2009. Their results allow them to affirm that attracting inflows of FDI foster the upgrading of the productive structure in an emerging economy.
Our study contributes to the literature by showing the importance economic complexity as an important factor for explaining the distribution of FDI flows. Moreover, as far as we know, our study is the first that examines the distribution of FDI by industry. SECTORS, 1999SECTORS, -2018 3.1. Dynamics of Total FDI in Mexico, 1980 The Mexican Ministry of the Economy data on FDI begins in 1980. Based on this data, it is clear that FDI flows were following an upward trend -except in those years associated with macroeconomic problems, such as 1982 and 1988 -even before the North American Free Trade Agreement (NAFTA) came into effect. Nevertheless, the annual flows of FDI increased notably with NAFTA. This agreement had a positive effect on the flow of FDI into the country, not only due to the economic benefits of having formal and long-run access to the greatest market in the world, but also because all investment in Mexico was guaranteed due to the existence of obligations under international law, agreements on the promotion and reciprocal protection of investment, and the existence of dispute resolution methods. As shown in Figure 1, prior to 1994 the annual flow of FDI into Mexico was below 5,000 million United States dollars (MUSD). The reforms that opened up previously protected sectors stimulated and sped up the growth of these inflows. From 1994 to 2000, the annual flows were between 10,000 and 20,000 MUSD. 6 From 2000 onwards, FDI flows exceeded 20,000 MUSD annually, except in 2003 and 2009. 7 3.2. FDI Flows by State 8 6 Only in three years (1995, 1996, and 1998) were they below 10,000 MUSD. 7 The years mentioned -1995, 1996, 1998, 2003, and 2009 -can be associated with economic crises, whether in Mexico, the U.S., or elsewhere in the world, which may have hindered the arrival of more of this kind of investment. 8 The description of the distribution by state and economic sector includes the 1999-2018 period only. We cannot employ the data for 1980 to 1998 because a different methodology was used. c Southern Regional Science Association 2021. The inflows of FDI were distributed very heterogeneously among the 32 Mexican states. Mexico City obtained 105,956 MUSD or 21.09 percent of all FDI received by the country during the period 1999-2018; Mexico State received 48,333 MUSD or 9.62 percent and Nuevo León 46,336 MUSD or 9.22 percent. These three together received more than 40 percent of all FDI, while the seven most important states (i.e., these three plus Chihuahua, Jalisco, Baja California, and Guanajuato) received over 60 percent of all FDI received by the country during this period. In contrast, the states of Guerrero, Tabasco, Durango, Hidalgo, Yucatán, Nayarit, Campeche, Tlaxcala, Chiapas, and Colima each received less than 1 percent of the FDI received by the country. These ten states received less than 6 percent of all FDI. Figure  2 shows the distribution of FDI by state during this period. Figure 3 shows the distribution of FDI flows by state during one of the four periods considered in this study.

FDI Flows by Economic Sector
Analogously, the allocation of FDI flows by economic sector is also heterogeneous. The manufacturing sector received 49 percent of all inflows into the country during this period, while financial and insurance services obtained almost 15 percent. Wholesale and retail trade received 7.5 percent and mining 5.3 percent. The remaining sectors are shown in Figure 4.

CALCULATING THE ECONOMIC COMPLEXITY OF MEXICAN STATES AND ECONOMIC ACTIVITIES
The measures of economic complexity of states and of economic activities are computed using information on the relative economic structures of Mexican states that is summarized in a matrix denoted as, M s,a . The dimension of this matrix is 32 × n, with 32 being the number of Mexican states and n the number of economic activities considered. The element m s,a of the matrix indicates the number of people employed (PE) in state s by economic activity a. 9 The matrix M s,a is transformed into a binary matrix that reflects the specialization of states or the localization of economic activities. If a specific cell of the matrix takes the value of 1, m s,a = 1, this implies that state s is specialized in economic activity a or that it has a significant number of people employed in that activity, otherwise it takes a value of 0. 10 We use the binary matrix to define the two variables, diversification and ubiquity, required by the method of reflections to compute the measures of complexity. The first approximation of the complexity of the states, diversification, is the sum of each row of the binary matrix.
The entries of the resulting vector show the number of economic activities in which each state specializes: The vector of ubiquity (or the number of states that specialize in each economic activity) is obtained by summing each of the columns of the binary matrix:

The Method of Reflections
The method of reflections (MR) consists of iteratively calculating the next values of the diversification and ubiquity measures based on their previous-level measures, starting with the initial values as defined in Equations (1) and (2). The iterative process is defined as follows: where N represents the number of iterations; the iterations stop when a fixed point is reached. 11 The complexity of Mexican states is given by the vector κ s, N and the complexity of economic activities by the vector κ a, N .

Data Used to Calculate Economic Complexity
The data on PE comes from the 1999, 2004, 2009, and 2014 economic censuses conducted by Mexico's National Institute of Statistics and Geography (INEGI). 12 In this study, we employ data at the four-digit level of aggregation (industry groups) rather than the six-digit level (classes of economic activity) used by (Chávez et al., 2017) because at the most disaggregated level (six-digit), most economic activities receive no FDI flows. The level of economic complexity of each state is calculated in two different ways. First, using all industry groups in the economy and second, using only the manufacturing sectors. 13 Figure 5 shows the estimated economic complexity in 2014, based on all industry groups in the economy. All other estimated levels of economic complexity by state and economic activity (industry group) are shown in Appendix 2. 14

RESULTS
Since the economic complexity measure reflects the productive knowledge embedded in the productive structures of the states and the sophistication of economic activities, we expect FDI flows to be greater to those states or economic activities with higher levels of economic complexity. Using spatial panel regression analysis, we show that economic complexity, both by states and economic activities, is significantly and positively related to FDI. Furthermore, in our estimations we include spatially lagged variables and find evidence of the spillover effects that previous studies have also identified.
The FDI data for the period 1999-2018 is taken from Mexico's Ministry of the Economy website. 15 A recent change in the methodology means this dataset more precisely reflects the destination of FDI at the state level and economic sector. FDI is measured in millions of current dollars. 16 The Gross Domestic Product (GDP) data by state, excluding petroleum, comes from INEGI's Bank of Economic Information (BIE).
in the matrix when we use only manufacturing industry groups is 85. 14 As can be seen in Table A2.1, the estimation of the economic complexity of each state varies depending on the number of industry groups considered. Nevertheless, as we shall show in the next section, the relationship between FDI and the complexity of the states is robust to these two alternative ways of measuring economic complexity. 15 The dataset can be consulted at https://datos.gob.mx/busca/dataset/ informacion-estadistica-de-la-inversion-extranjera-directa/resource/9254ecd4-47e8-49e2-a8b3-3b2b31586271. These numbers are constantly updated (our data was retrieved on April 2, 2019). 16 This new FDI data is available from 1999 onwards. The data is constructed by the Ministry of the Economy and Banco de México following the recommendations of the International Monetary Fund and the Organization for Economic Co-operation and Development. The information on the flows to economic sectors are classified according to NAICS codes. More information on the methodology can be found at http: //www.redalc-china.org/monitor/images/pdfs/Metodologicos/22 SE Sintesis metodologica OFDI.pdf

Flows of FDI to States and Their Economic Complexity
We perform various estimations to determine the statistical connection between economic complexity and the FDI inflows that states received from 1999 to 2018. Comparable to other studies, our benchmark model shown in Equation (5) considers four panels, where i : 1, 2,. . . 32 denote the 32 Mexican states and t: 1999-2003, 2004-2008, 2009-2013, 2014-2018 denote the four periods considered. 17 We estimate" where ln (F DI i,t ) is the natural log of the aggregate FDI received by state i in period t; CX i,t 0 is the economic complexity measure of state i at the beginning of period t; ln (GDP i,t 0 ) is the natural log of GDP of state i at the beginning of period t; and d j are time dummy variables (one for every five-year period in the sample). As mentioned previously, we expect the estimation of the parameter β 1 to be significant and positive, indicating that states with higher levels of economic complexity receive more FDI. We include the GDP of the states as a control variable because large economies tend to obtain larger quantities of FDI. 18 The time dummy variables are included to capture common factors that affect FDI flows to the states in each period. 19 To identify spillover effects, 20 we start by estimating a Spatial Durbin Model (SDM) that considers two types of interaction or spillover effects: endogenous interaction effects between the dependent variable and exogenous interaction effects among the explanatory variables. In the event one of these two spillover effects is not significant, we can estimate a simpler model with only one type of interaction: i) the spatial autoregressive (SAR) model that only considers interactions between the dependent variable, or ii) the spatial lag (SLX) model that considers only interaction effects among the explanatory variables.
Equation (6) below shows the SDM to be estimated. All the variables in this equation are the same as those in Equation (5) except for W . W represents the row-standardized contiguity matrix used to compute the spatially lagged dependent variable, [W ln (F DI i,t )], and the 17 These periods were chosen to coincide with the years for which data (taken from the 1999, 2004, 2009, and 2014 economic censuses) were available to construct the economic complexity variable. 18 Following a referee's suggestion, we also include a crime variable (homicides per 100 thousand people), as that particular variable may have an effect on FDI flows to specific states and is not directly influenced by economic complexity. Our results show a negative effect, though not statistically significantly different from zero (the results are available upon request). We also used the uncertainty index for Mexico compiled by the St. Louis Fed as a time fixed effect (since its values are equal across states at a given time). The results show no significant departure from those presented in this paper. 19 As suggested in Hidalgo and Hausmann (2009), all the models estimated include a few control variables because all other macro-variables normally included to explain FDI are redundant when economic complexity is used. 20 Here we follow Elhorst's (2014) The fifth term on the right-hand side of Equation (6), [W ln (F DI i,t )], is included to examine whether there is any evidence of spillover effects from the amount of FDI that neighboring states received. Given the previous research on the determinants of FDI, we expect the FDI in neighboring states to have a positive effect, in which case the source of those spillover effects could come from a third variable previously unrecognized in the research as being positively associated with FDI and geographically clustered (a possible example might be good business practices). The sixth term, the spatially lagged complexity variable [W CX i,t ], is the average level of complexity of the neighbors of each of the country's states. This variable is included to examine whether there is evidence of local spillover effects (i.e., a highly complex state may increase the FDI flows to the neighboring states). We expect the estimate of the parameter associated with this variable to be positive. In order to deal with the potential source of endogeneity, we estimate Equation (6) by means of maximum likelihood, given that we have the spatially lagged dependent variable as independent.
If the estimation results from Equation (6) show the local spillover effects of economic complexity to be not significant, β 3 will not be statistically different from zero. We can then eliminate that term from Equation (6) and, as a robustness check, estimate a spatial autoregressive (SAR) model. The SAR model is: If the estimation results from Equation (6) show the spillover effects from FDI to be not significant, we can estimate a spatial lag (SLX) model. The SLX model is: In this case, we do not have a dependent variable on the right-hand side of the equation, which enables us to estimate Equation (8) by ordinary least squares.
All the models described previously are estimated using random effects (see Appendix 3, where we provide a full set of Hausman and Spatial Hausman tests in order to identify the most efficient method). We apply the Breuch-Pagan Lagrange Multiplier test of pooled vs random effects and the Baltagi et al. (2003) Lagrange Multiplier test to see if a spatial error model or random model needs to be included in the analysis. The results show that random effects need to be used and rejects the inclusion of spatial error terms in the model. Table (2) presents the results of all the models, all of which are estimated using the two alternative measures of the economic complexity of the states, namely, i) one that uses information from all industry groups in the economy (around 275 groups), and ii) one that uses information from manufacturing industry groups only (85 groups). These results show overwhelming evidence of a positive relationship between a state's FDI flows and a state's economic complexity. The parameter associated with the economic complexity variable, β 1 , is estimated to be positive and highly significant. This is true regardless of the measure of complexity employed and the model estimated. Hidalgo and Hausmann (2009) argue that the economic complexity measure takes into account all the productive capabilities of an economy 23 that it uses to produce goods. 24 Therefore, it is reasonable for foreign investors to choose to transfer funds into those states endowed with better and more diverse productive capabilities (considering both their tangible and intangible characteristics). Such investments occur because these states represent better investment options, not only in terms of quantity (as these states' economies are specialized in more diverse economic activities) but also in terms of quality, as those states whose economies are more complex specialize in more sophisticated economic activities. The estimated magnitude of the parameter associated with economic complexity ranges from a minimum of 0.236 to a maximum of 0.458, varying slightly depending on the model, implying complexity is positively correlated with FDI. 25 The parameter associated with the variable included to control for the size of the economy, ln (P IB i,t 0 ), is estimated to be positive and statistically significant. The size of the estimated parameter is fairly robust across models. Larger state economies tend to attract more FDI, but since the parameter associated with this variable is less than one, it implies that an increment of 1 percent in the size of the economy is associated with an increase of less than 1 percent in FDI.
As the results of the SDM model, Equation (6), suggest that the global spillover effect is not statistically significant (see ρ = −0.063) while the spillover effects from complexity is, we proceed to estimate the SLX model that only incorporates the local spillover effects of economic complexity. The results from the SLX model (shown in the last two columns of Table 1) confirm the positive and significant spillover effect of economic complexity. This implies that one state's economic complexity has positive spillover effects on its immediate neighbors, i.e., having a highly complex neighbor has a positive impact on a state's FDI. Note that the spillover effect of the economic complexity variable is similar in magnitude to its direct effect. 23 Furthermore, as Hartmann et al. (2017) state, the level of complexity may also reflect characteristics of the investment climate, such as strong institutions and investor-friendly regulations, which are also important drivers of FDI because they represent safer and cheaper business opportunities. 24 States with higher levels of economic complexity specialize in more diverse economic activities and generate goods that are more sophisticated and less ubiquitous than those of less complex states. 25 In the SDM model, the direct effects are computed accounting for the non-linear nature of the derivative of the dependent variable, since the direct derivative δ and δx is not equal to β (LeSage and Pace, 2009). c Southern Regional Science Association 2021.  The symbols ***, **, and * denote statistical significance at the 1, 5, and 10 per cent level, respectively. For spatial models, R 2 is calculated with the error term equal to Y −δ(I (Elhorst, 2014), Table 3.1). We included R 2 for comparison purposes only and are aware that this coefficient may not be fully comparable with spatial and a-spatial models. c Southern Regional Science Association 2021.

FDI Flows to Manufacturing Industries and the Economic Complexity of Manufacturing Industries
We now focus on the distribution of FDI by manufacturing industry groups and look for evidence of the relationship between the economic complexity of manufacturing industries and the FDI that each of these receives. In doing so, the models we estimate are similar to those of the previous subsection. All models estimated consider four panels, where i : 1, 2,. . . ,85 denote the industry groups within the manufacturing sector and t: 1999-2003, 2004-2008, 2009-2013, and 2014-2018 denote the four periods of time considered. Equation (9) shows our benchmark model, which is estimated by OLS: where ln (F DI i,t ) is the natural log of the aggregate FDI flows received by manufacturing industry group i during period t; CX i,t 0 is the economic complexity of industry group i at the beginning of period t; ln (V A i,t 0 ) is the natural log of the value-added of manufacturing industry group i at the beginning of period t, and d j are time dummy variables. Similar to the models estimated in the previous subsection, an estimation of a positive and significant parameter β 1 would indicate that the economic complexity of an industry group is a predictor of the FDI that group will receive. In this case, we include the valueadded of industry groups to control for the size effect, as larger industry groups tend to obtain more FDI. The time dummy variables are included to capture the common factors that affected the FDI flows to industry groups in each period.
As in our estimation by states, to identify spillover effects we start by estimating a spatial SDM model that considers both effects, i.e., the global spillover from FDI and the local spillover from economic complexity. The SDM model is shown in Equation (10): 26 All the variables in Equation (10) are the same as those in Equation (9) except for W . W represents the row-standardized contiguity matrix used to compute the spatially lagged dependent variable, [W ln (F DI i,t )], and the spatially lagged economic complexity, [W CX i,t 0 ]. The spatial matrix, W, employed is a contiguity matrix defined as follows: an industry group is considered to be contiguous to another industry group if they belong to the same subsector. The NAICS system assigns industry groups a four-digit code and assigns subsectors a three-digit code. Industry groups are classified in the same subsector if they have a similar production process.
Analogous to our procedure by states, if the results from Equation (10) show the economic complexity local spillover effects are not significant, β 3 is not statistically significant. We can then eliminate that term and, as a robustness check, estimate a spatial autoregressive (SAR) model. The SAR model is shown in Equation (11): If the estimation results of Equation (10) show the spillover effect from FDI is not significant, as a robustness check we can estimate a spatial lag (SLX) model. The SLX model is shown in Equation (12): Appendix 3 presents the results of the various tests applied to identify the best specification method. As in the case by states, all the models were estimated using random effects. Table (2) shows the estimation results of all the models described.
The results in Table (2) suggest that the economic complexity of an industry group is a key determinant of the FDI flows it receives, having a positive and significant effect. In this case, the estimated magnitude of the parameter associated with complexity varies more than in the estimation based on states, ranging from 0.617 to 1.188. It is also worth noting that the direct effect of complexity on FDI flows decreases when we consider spillover effects, i.e., the magnitude of β 1 is greater in model (9) than it is in models (10) and (12). This direct effect (the effect of the economic complexity of sector i on the FDI in sector i ) is also significant in the SDM model (columns 3-5), though the estimate has a smaller value than the benchmark model in column 2. Meanwhile, the indirect effect (the effect of the economic complexity of sector j on the FDI in sector i ) is estimated to be statistically insignificant.
Since the results of the SDM (i.e., Equation (10)) suggest the global spillover effect is not statistically significant (see ρ = 0.064) while the spillover effect from complexity is, we proceed to estimate the SLX model that incorporates only the local spillover effects of economic complexity. The results in last column show that the local spillover effect of economic complexity is positive and significant, similar in magnitude to the direct effect of complexity on FDI flows (the direct effect is 0.792 and the indirect 0.886). This result implies that an industry group benefits (i.e., receives more FDI) as its level of economic complexity increases, but benefits even more if its "neighboring" industry groups increase their levels of economic complexity. A potential explanation may be that industries experience an inflow of foreign investment if they are "related" or if the industry concerned "supports" a highly complex industry (which, according to these results, would itself have a high flow of FDI). These results open the way for future research into the relationship between intra-industry complexity, economic growth, and investment. Similarly, the determinants of the latter within industry groups clusters need to be examined.

CONCLUSION
Our results show that the ability of Mexican states to attract FDI is strongly correlated with their level of economic complexity, i.e., the mix of economic activities in which they 0.130 0.138 *t-statistics are shown in parenthesis. The symbols ***, **, and * denote statistical significance at the 1, 5, and 10 per cent level, respectively. For spatial models, r 2 is calculated with the error term equal to Y −δ(I T ⊗ W )Y − Xβ − (ι T ⊗ I N )μ (see Elhorst (2014), Table 3.1). specialize. Likewise, the economic complexity of an industry group seems to be a very important determinant of the amount of FDI that it receives. Moreover, we find evidence of strong local spillover effects of economic complexity among Mexican states, i.e., a state that has highly complex neighbors improves the FDI that it receives. In the analysis of FDI flows to manufacturing industry groups, we found stronger evidence of local spillover effects between industry groups and of economic interdependence between them, regardless of geography.
One advantage of our approach compared to previous studies that employ various macroeconomic variables is that we are able to specify a simpler and more parsimonious model to explain the distribution of FDI among Mexican states. A disadvantage of our methodology is that it is more difficult to provide clear policy recommendations for economies hoping to increase the flow of FDI they receive, given that economies can become more complex in countless ways. For example, in the traditional approach, studies find that economies with more human capital tend to receive more FDI. However, with our approach two economies can have the same amount of human capital distributed equally among their population, yet c Southern Regional Science Association 2021. differ in their ability to combine all the distinct knowledge they possess. If we assume that one of these economies has institutions in which people with a diverse range of knowledge are able to interact and generate new knowledge and the other does not, then the first will be more complex than the second and, thus, receive higher levels of FDI.
More research is needed in order to be able to identify the determinants of this strong spillover within industry groups (i.e., by means of cluster analysis) and confirm if there are spillover effects between sectors. Many sectors may show a higher dependency than others and influence FDI and economic growth in different magnitudes. However, this type of analysis goes beyond the aim and scope of this paper.

A.1. Appendix 1
To transform the matrix M s,a into a binary matrix, we use the definition of location quotient (LQ) commonly employed in regional science literature: where p s,a is the number of people employed in state s in economic activity a; n a=1 p s,a is the total number of people employed in state s; 32 s=1 p s,a is the total number of people employed in economic activity a throughout the country; and 32 s=1 n a=1 p s,a is the total number of people employed countrywide.
Each entry of the binary matrix is defined as follows: m s,a = 1 if LQ s,a ≥ LQ * 0 otherwise All the complexity results presented in this study are calculated using the threshold LQ * = 1. This implies that state s is considered to be specialized in economy activity a if the share of people employed in that activity within the state is equal to or greater than the percentage of people employed in it nationwide.