Does Automation in Rich Countries Hurt Developing Ones?: Evidence from the U.S. And Mexico

Following a couple of decades of offshoring, the fear today is of reshoring. Using administrative data on Mexican exports by municipality, sector and destination from 2004 to 2014, this paper investigates how local labor markets in Mexico that are more exposed to automation in the U.S. through trade fared in exports and employment outcomes. The results show that an increase of one robot per thousand workers in the U.S. -- about twice the increase observed between 2004-2014 -- lowers growth in exports per worker from Mexico to the U.S. by 6.7 percent. Higher exposure to U.S. automation did not affect wage employment, nor manufacturing wage employment overall. Yet, the latter is the result of two counteracting forces. Exposure to U.S. automation reduced manufacturing wage employment in areas where occupations were initially more susceptible to being automated; but exposure increased manufacturing wage employment in other areas. Finally, the analysis also finds negative impacts of exposure to local automation on local labor market outcomes.


Introduction
There is a growing body of literature on the impacts of labor-replacing technologies. Most of this literature is focused on developed economies, since they are at the frontier of adoption of new technologies, and concerns are rising about the negative impacts on workers. The findings of this empirical literature show that while these technologies can bring about significant efficiency gains (Graetz & Michaels 2017), they can also have negative impacts on employment outcomes (Acemoglu & Restrepo 2017).
However, evidence for developing countries is scarce. This is driven not only by data constraints, but also because poorer countries in general have not been as successful as their richer counterparts at adopting new technologies at such a large scale. This article argues that developing countries can still experience some disruptive effects by being exposed to automation in developed economies. For example, automation in the US may reduce the demand for Mexican goods if it allows to reduce marginal costs and prices of US products. If Mexico's exports to the US decline as a result, this could in turn displace Mexican workers.
In other words, automation in the US can substitute away workers in Mexico by disrupting trade.
Concerns about the destruction of jobs in developing countries that were originally offshored from high-income economies -a process known as reshoring -are rising. Several media outlets have reported that firms in the United States and Europe have started to repatriate some of their production processes. 1 However, empirical evidence about the existence and magnitude of this phenomenon is scarce. De Backer et al. (2016) report that even though company surveys and anecdotal evidence suggest that the reshoring movement is gaining steam, empirical evidence does not support such claims. In contrast, Allen (2017) argues that economic history suggests that some of the concerns about reshoring are warranted. While the first industrial revolution brought progress to Western economies, many jobs in the textile industry from India to Morocco were destroyed since their wages were no longer competitive when compared to the cost reduction associated with mechanization.
In this article, we examine the impacts of robotization in the US on exports from Mexico to the US. As articulated in the theoretical model (forthcoming), automation in the US may affect the demand for Mexican goods through different channels. First, automation could improve the efficiency of firms in the tradable sector, which may foster the demand for complementary goods from Mexico. This increase in efficiency could, at the same time, increase the demand for Mexican goods through an income effect. Second, automation may improve the comparative advantage of the US in certain sectors, which would reduce the demand for Mexican products. Third, automation may lower the prices of American intermediate inputs imported by Mexico, which may boost the production and export levels of the latter.
Using export data at the local labor market (LLM) level in Mexico, this article studies if higher exposure to US automation through trade lowered local exports to the US from 2004 to 2014. Exposure of Mexican areas to US automation is defined as the increase in the number of robots per thousand workers by sector in the US, weighted by the initial exports of each sector at the LLM level in Mexico. The larger the increase in the number of robots and the higher the share of exports from that sector, the higher the exposure to US automation. The results indicate a strong and robust negative relationship between exposure to US automation and exports from Mexico to the US. This suggests that the substitution effect of automation seems to be stronger than the complementary and efficiency channels. These findings are consistent with automation increasing the pace of reshoring and/or lowering the pace offshoring.
Given that both economies are highly integrated, there are valid concerns about the endogeneity of the exposure to automation in the US. For instance, industries that face higher import competition from Mexico may be more likely to adopt robots to become more competitive. To overcome this challenge, we use an instrumental variable similar in spirit to that of Acemoglu & Restrepo (2017) by constructing a measure of exposure to automation in Europe. While automation patterns in Europe are highly correlated with those of the US, trade between Mexico and Europe represents less than 5 percent of Mexico's total trade. Thereby, it is unlikely that patterns of automation in Europe respond to changes in Mexico's tradable sectors.
However, there could still be a concern about the exclusion restriction not being satisfied if unobservable factors such as secular sectoral trends or trade links with other large economies could influence both Mexico's exports and automation in Europe. We address these concerns using several alternative specifications and robustness checks. We show that the results are robust to controlling for exposure to domestic automation, the exclusion of the automotive sector, controlling for the initial share of manufacturing jobs in the area and eliminating outliers, among other tests. They are also not affected by exposure to ICT adoption in the US, exposure to Chinese imports and the initial degree of job offshoreability in the local area.
In addition, we investigate the labor market impacts of exposure to US automation. We first focus on employment in the tradable sector (agriculture, mining and manufacturing) as this would capture the first-order impacts. The results show that the ratio of employment in the tradable sector to population is not affected by exposure to US automation, or by the decline in exports caused by US automation. However, this average effect hides substantial heterogeneity across LLMs. Areas that initially had a relatively higher share of manufacturing jobs susceptible to being replaced by automation did experience a decline in the ratio of manufacturing employment to population. This could be driven by areas intensive in unskilled jobs that were initially offshored from the US but that are more susceptible to being reshored due to automation, since jobs susceptible to being offshored also tend to be susceptible to being automated. In contrast, areas where the fraction of jobs susceptible of being automated was low, experienced an increase in the manufacturing employment to population ratio. We argue that this latter effect could be explained by the fact that since jobs were unlikely to be automated in these areas to begin with, firms in these regions may have had better access to a skilled labor force to adopt new technologies to cope with the external shock. However, US automation did not have any impacts on the total wage employment to population ratio, even in areas with a high job replaceability index. This could be because the direct impact on manufacturing employment was either too small, because of positive spillover effects on the non-tradable sector -if, for example, firms in services benefit from accessing lower cost inputs from the US -and/or because displaced manufacturing workers could easily move to the non-tradable sector.
In contrast, we find strong and robust impacts of domestic automation on total wage employment (that is, in the tradable and non-tradable sectors). In particular, increasing exposure to automation in Mexico has a negative impact on the ratio of wage employment to population. However, it does not affect total employment. Instead, the informal sector expands, suggesting that displaced workers are more likely to find an informal job (as a selfemployed, day laborer or family worker) than to become jobless. The role of the informal sector is an important factor when considering the disruptive impacts of automation on developing countries. While an informal job is often associated with under-employment in low-productivity jobs paying low earnings (Perry et al. 2007), it may also help workers to cope with job displacement. We also find that these negative labor market effects of local automation are larger for the unskilled (particularly high school graduates), men and workers aged 44 years or younger. Finally, exposure to local automation seems to exert upward pressure on inequality, particularly between workers at the richest 90th and poorest 10th percentile of the monthly wage distribution.
This article focuses on the US and Mexico case because they provide a unique setting of two neighboring economies at markedly different stages of economic development and distance to the technology frontier that share important links through trade. In particular, Mexican exports to the US represent over 80 percent of total exports. Moreover, a significant share of these trade flows is concentrated in sectors that are automating rapidly in the US, such as the automotive sector. The tradable sector is an important source of economic growth and jobs for many regional economies in Mexico. Thereby, any permanent changes to trade flows between these two economies can have profound consequences in Mexico. The results of this article highlight that while the employment impacts of foreign and domestic automation are still small, they hit unskilled workers the most.
The rest of this article is structured as follows. Section 2 provides a literature review and Section 3 presents the econometric model. Section 4 describes the data sources and stylized facts on automation, trade and employment patterns. Section 5 presents the econometric results, with Section 5.1 focusing on the impacts of US automation on Mexican exports, and Section 5.2 focusing on the impacts of US and Mexican automation on LLM outcomes.

Literature Review
This article contributes to the empirical literature on the extent of reshoring and its drivers, which is scarce. Since reshoring is not typically captured by official statistics, researchers have to rely on alternative ways to measure it. De Backer et al. (2016) report different estimates of the share of companies in Europe and the United States that are reshoring their production processes. Data from manufacturing surveys show that around 4 percent of companies in selected European economies moved part of their activities back home between 2010 and 2012 (Dachs & Zanker 2015). However, the extent of new offshoring processes continues to be substantially more important than that of reshoring. Evidence for the United Kingdom suggests that about 15 percent of firms are engaged in reshoring, while that figure is about 20 percent for large companies in the US. Reasons reported for reshoring vary. Dachs et al. (2017) find that large companies in high-tech sectors are more likely to reshore their activities, and that one of the main reasons for this is the lower quality of goods from foreign suppliers. Fratocchi et al. (2014) report that logistics costs are also an important driver.
De Backer et al. (2016) look at different measures that could be correlated with reshoring.
The first is the share of imports from lower-income countries in total domestic demand of high-income OECD countries. This measure has been actually increasing over time, which may suggest a rather limited extent of reshoring activities. The second is the share of employment of multi-national enterprises (MNEs) in the home country. In Europe, employment of MNEs has not been shifting back home, although more recent data suggest the opposite (De Backer et al. 2018). In the US, the evidence is more consistent with nearshoring to Mexico than reshoring to the US. In addition, the authors estimate econometric models to investigate if the employment and investment patterns of MNEs at the home location and abroad are consistent with reshoring. They find evidence consistent with reshoring as MNE affiliates at the home location grow faster than other MNE affiliates. However, as the authors point out, this could reflect other phenomena such as unobserved firm or country shocks.
Empirical evidence on the role of automation on reshoring patterns is even more limited.
De Backer et al. (2018) analyze the impact that the adoption of robots in high-income countries had on offshoring and reshoring patterns. They find that companies' purchases of intermediate goods and services from foreign providers -a proxy variable for offshoring -are not related to robot adoption between 2000 and 2014. However, when focusing on the period of rapid robot adoption from 2010 to 2014, they find that automation was accompanied by a lower pace of offshoring. This negative association is larger for labor-intensive industries.
To investigate the impacts on reshoring, they estimate if MNEs are more likely to bring jobs and fixed assets back home in developed countries that are automating more rapidly. The findings do not support the hypothesis that automation is a driver of reshoring. Accordingly, Artuc et al. (2018) use a gravity model with an instrumental variable for robot adoption and find that greater robot intensity in rich countries increases causes a rise in imports from developing economies. In contrast, Dachs et al. (2017) find that European firms adopting digital manufacturing technologies (known as Industry 4.0) are significantly more likely to reshore activities.
By focusing on Mexico, this article also contributes to three strands of literature that have been largely concentrated on high-income countries. First, it relates to the emerging literature of the economic impacts of automation. Notable articles in this area include Acemoglu & Restrepo (2017), who find negative impacts of automation on LLM outcomes in the US, and Graetz & Michaels (2017) who find positive impacts of automation on labor productivity and TFP, and no effects on total employment using country-sector level data for a sample of 17 high-income countries. Chiacchio et al. (2018) apply Acemoglu and Restrepo's (2017) methodology to six European countries and find strong negative impacts of automation on employment. Using a similar approach, Dauth et al. (2017) find that while automation in Germany had a negative impact on manufacturing jobs, the total effect was zero as jobs were created in the services sector. They also find negative impacts of automation on wages of middle-skill workers. There are two recent studies that examine the impacts of automation in Mexico. Faber (2018) and Pedemonte et al. (2018) examine the labor market impacts of exposure to US and domestic automation across Mexican municipalities.
However, unlike this article, they do not use trade data at the local level and instead rely on a Bartik-style variable to allocate national-level exports to each locality. At the same time, municipal-level data do not necessarily provide an appropriate approximation of local labor markets. Thereby, the existence of labor migration across municipalities may introduce a bias to the estimated labor market impacts. Finally, they use data from Census samples instead of the full counts, which may lead to noisy labor market indicators for small municipalities.

Impacts of Automation on Trade
To estimate the impact of US automation on Mexico's LLMs, we follow Acemoglu & Restrepo (2017) and construct a measure of each area's exposure to US automation by using a weighted average of the increase in the number of robots per thousand workers by sector in the US over time: In addition, we control for the confounding effect of domestic automation. Since local automation may affect exports through different channels, we experiment with different specifications of this measure. The first one is similar to that of Acemoglu and Restrepo (2017) and assumes that exposure to local automation would be higher in areas where employment is more concentrated in sectors that are adopting more robots: Where the weights ω m,i,2004 are the same as in equation (1).
Finally, we also use a measure that combines both approaches in (2) and (3) Where exportsm,t Emp m,2000 stands for the total value of exports from LLM m in year t, and Emp m,2000 stands for total employment in LLM m in year 2000. Even though we have yearly data on robots and exports, we estimate equation (5) using a long-difference of the outcome variable (i.e. the change between the latest and earliest available data point) instead of using several yearly changes since the impacts of automation may not be immediate.
Given the high level of economic integration between the US and Mexico, there are valid concerns that exposure to US automation could be endogenous, as US industries that face higher competition from Mexico may be more likely to automate. We address this concern by using the following instrumental variable for the exposure to US automation: Where robots RCA EU m,2004EU m, ,2014 is the average number of robots per worker in industry i among a subset of European countries. In some specifications we use a similar instrumental variable for local automation, where the exposure to Mexican automation is instrumented with exposure to automation in Brazil.

Impacts of Automation on Local Labor Market Outcomes
To investigate the impacts of automation on labor market outcomes, we first estimate the following reduced-form equation: Where Empl m,t is a labor market indicator for labor market m.
To estimate the impact of the decline in exports driven by US automation on labor market outcomes, we use equation 5 as the first stage equation to obtain the change in exports driven by exposure to US automation ln exportsm,t Emp m,2000 . We then estimate the second-stage equation: When considering labor market impacts, we focus on wage employment (i.e. paid individuals working for a firm) as this is the category most likely to be affected by automation, as opposed to self-employed, employers or family workers. We also analyze changes in the composition of employment by looking at the share of informal workers in total employment, where informality is defined as being self-employed, unpaid worker or day laborer.
We use data on the number of employees by sector of economic activity and municipality from the 1999 Economic Census to estimate the employment weights µ m,i,1999 , which are used to construct the measure of exposure to local automation. These data allow for a higher level of sectoral disaggregation than the 2000 Census of Population of Housing.
Local labor market (LLM) definition: Given that we estimate impacts at the LLM level, we group municipalities into functional territories following Berdegué et al. (2017).
This methodology allows to increase the sample of LLMs significantly with respect to the official number of 59 Metropolitan Areas defined by the Statistical Institute (INEGI). Using a combination of commuting flows and satellite night light data, the authors group 2,446 municipalities into 1,534 functional territories. The assumption is that groups of municipalities that exhibit high levels of commuting flows among them, and that represent a single geographical unit according to the night light data form a functional territory. These functional territories include large metropolitan areas such as Mexico City, which contains 88 mu-nicipalities, but also small and remote municipalities with no connections. These functional territories seem to be consistent with the LLM assumption that local trade and technological shocks do not spill-over to other areas through labor migration (see Table 20).
Other data: We use data from EUKLEMS on adoption of Information Technology ( Figure 1 shows the evolution of the stock of robots per thousand workers. Automation in the US, Europe and Mexico increased almost every year since they entered the sample. According to this measure, automation in Europe is almost twice the level of the US. Accordingly, Mexico's automation is almost half that of the US. However, it increased at a fast pace since 2011 narrowing the initial gap. In contrast, automation in Brazil is much lower and did not experience significant changes since 2004.

Descriptive Statistics
According to Figure 2 and Figure 3, automation has been primarily driven by the automotive sector, both in Mexico and the US. Other leading sectors include computers, plastics, basic metals, pharmaceuticals and machinery. Sectors that adopted robots at a higher pace in the US and Mexico also experienced a higher increase in exports from Mexico to the US, although the correlation is rather weak (Figure 2 and Figure 4).
There is substantial variation across regions in terms of exposure to US and local automation (see Figure 6). As expected, when weighting by exports, exposure to US and local automation are highly correlated ( Figure 5). Such correlation becomes substantially weaker when using employment, or the combination of employment and exports, to construct the weights for the exposure to local automation measure. As explained above, the exposure to US robots is the change in the number of robots per thousand workers by sector in the US, weighted by the initial export share of each sector within LLMs. Column 1 displays the most parsimonious specification, where we only control

Baseline Results for Exports and Imports
for State fixed effects. The coefficient associated with exposure to US robots indicates that an increase in one robot per thousand workers in the US is associated with a 9.5 log points (9 percent) decline in exports per worker growth from Mexico to the US. 4 This effect represents 8.5 percent of the overall increase in exports to the US during this period.
Column 2 (our preferred specification) includes baseline LLMs characteristics as control variables. These are in levels to capture different trends in exports across locations. While the value of the coefficient of interest declines, it changes only slightly to -7.28. Column results substantially. Finally, column 6 omits the automotive sector from both the dependent variable and the exposure measure. The size of the coefficient remains statistically significant and is equal to -14.36. This result suggests that the decline in exports because of US automation is not driven by the automotive sector. In fact, the larger negative impacts in this specification show that exposure to automation in other sectors had a larger negative impact on exports in relative terms. The lower impacts on the automotive sector could reflect the fact that automotive firms in Mexico are close to the technological frontier. According to the WTO, Mexico is the fourth largest importer of robots, which is led by the car industry, only surpassed by China, the US and Germany. 5 The patterns of automation across sectors in the US and Mexico are positively correlated (see Figure 3), which implies that exposure to US automation is higher in areas where exposure to domestic automation is also higher (see Figure 5). Not controlling for exposure to domestic automation may introduce a bias to our estimates. Table 3 shows the estimates of the impact of exposure to US automation on Mexican exports to the US while controlling for exposure to domestic automation. Three specifications using different weighting schemes for local automation are reported. Local automation may affect exports disproportionately in sectors and regions with a revealed comparative advantage, i.e. where exports to the US are already higher. Panel A explores this hypothesis by using the same weights used to create the measure of exposure to US automation, that is exports per sector and area. It shows that the estimated impacts of US automation on Mexican exports become larger in absolute value (when compared to those of Table 2) and are statistically significant (except for column 6). The substantial change in the size of the impacts is driven by the fact that both measures of automation are highly correlated (see Figure 5) and that exposure to local automation is positively correlated with export growth. This latter finding is consistent with local automation improving the competitiveness of sector with a RCA in Mexico.
Panel B (our preferred specification) follows Acemoglu & Restrepo (2017) and uses em-ployment weights to construct the measure of exposure to local automation, based on the assumption that exposure to local automation would affect exports disproportionately in areas with a higher share of employment in sectors that are automating rapidly. The estimated impacts of exposure to US automation on exports are very similar with and without controlling for employment-weighted local automation, which is not surprising considering that this measure and that of exposure to US automation are not highly correlated (see The estimated impacts of exposure to US automation on trade may still be biased if, for example, the adoption of robots in the US depends on unobserved productivity or policy shocks at the sector level affecting both US automation and Mexico. This is not entirely implausible considering the high level of integration between both economies. To address this concern, we estimate an IV specification where we instrument exposure to US automation with exposure to automation in Europe. Since Mexico's trade with Europe is rather low (less than 5 percent of total Mexican exports), it is reasonable to assume that patterns of automation across sectors in Europe are unresponsive to trade patterns in Mexico, i.e. that the exclusion restriction is satisfied. Accordingly, to explore the impacts of Mexico's automation on exports, following the same logic we instrument the exposure to local automation with the exposure to automation in Brazil. Since trade between these two emerging economies is very low, automation in Brazil is unlikely to respond to Mexico's trade patterns with the US. Table 4 shows that the instruments are statistically significant in all specifications. It also shows that the exposure to Brazil's automation is more correlated with Mexico's than with the US's, and that exposure to Europe's automation is more similar to the US's than Mexico's. While the table reports the results for employment-weighted local automation, the first-stage coefficients are also statistically significant when using export-weighted, as well as employment and export-weighted exposure to local automation. Table 5 shows the IV estimates, which tend to be very similar to the OLS ones. This is true for the different specifications of the weighting scheme for local automation, and across columns. The only exception is for column 6 of Panel A, where export-weighted local automation is used and the automotive sector is excluded. However, the results in Panel A could be affected by a high degree of collinearity between the two measures of automation.
The coefficient in column 2 of Panel B (our preferred specification) indicates that an increase of one robot per thousand workers in the US would lower exports growth per worker from Mexico to the US by 6.7 log points, that is 6.7 percent. This represents 6 percent of the total growth in exports to the US from 2004 to 2014. According to Panels A and C, exposure to domestic automation tends to increase exports to the US, but the results are not very robust across specifications.
To shed some light on aggregate impacts, Table 6 shows the estimated coefficients when using total exports in the initial year 2004 as weights. The estimates tend to increase in absolute value, suggesting that the impacts of exposure to US automation are larger in the main exporting sectors of Mexico. However, the results are not robust to excluding the automotive sector, suggesting that the auto sector drives the results when more weight is given to LLM with high levels of exports. This result is different to that of the unweighted regression, which suggests that the auto sector drives down the overall impacts when all LLMs are given the same weight.  Columns 1 and 2 in panel B explore the impacts on exports to US trade partners (that is countries whose imports from and exports to the US represent at least 10 percent of their total imports and exports) and suggest that US automation also lowers the demand for Mexican goods from their trade partners. However, when we restrict the sample to non-US trade partners in Panel C (that is countries whose imports from and exports to the US represent less than 10 percent of their total imports and exports), exposure to US automation has no discernible impacts on exports. 6 In   We also provide results for separate age groups below. In addition to the control variables included in the previous section, we also include the initial share of exports and imports in the region's value added as right-hand side variables. This would control for any differential employment trends by regions with different degrees of trade openness. In addition, we control for the initial share of manufacturing employment in all specifications, as this variable is highly correlated with employment growth in the tradable sector, possibly capturing secular trends in manufacturing jobs. Finally, we control simultaneously for employment-and export-weighted exposure to local automation. This is because export-weighted exposure to local automation is correlated with exposure to US automation. Thereby, its omission would likely bias the estimated impact of US automation on employment, as it would also capture any impacts that Mexico's automation in sectors with a comparative advantage may have on the labor market. At the same time, we need to include employment-weighted exposure to local automation to control for the direct impact of local automation on employment that operates outside the trade channel. The reduced-form estimates show that US automation did not affect employment rates in Mexico's tradable sector, since the coefficients are not statistically different from zero in all specifications. The first-stage equation is the main equation 5, whose estimates are reported in Table 3.
We report the results for the impacts of total exports, as well as imports of intermediate and raw products, since these trade variables seemed the most affected by exposure to US automation (see Table 9). The results are consistent with those of Table 9, as the coefficients are not statistically significant.
One hypothesis to explain why exposure to US automation did not affect Mexico's labor markets is that given that the share of wage employment in the working age population is rather small and exhibits a high variance across regions, the sample size may not be large enough to detect any impacts of exposure to US automation. In fact, a simple analysis of power (see Appendix) suggests that with the current sample size, the minimum detectable effect of exposure to US robots is rather high when compared to the impacts of local automation discussed below. To detect an impact comparable to the one we find for exposure to local automation, we would need to increase the sample size considerably (by about 1,000 local labor markets). In addition, the absence of labor market impacts could also be explained by the fact that the trade impacts of US automation on trade, while statistically significant, are rather small in magnitude. Given that exposure to US automation increased on average by 0.5 robots per worker, the estimates in Table 5   small. This supports the hypothesis mentioned above about the trade effects of exposure to US automation being too small to generate sizable labor market impacts.
In contrast, exposure to US automation was accompanied by higher manufacturing employment growth in areas where the share of replaceable jobs was lower (column 1). These areas may have adjusted in a different way to the external shock. Since jobs were less likely to be replaced, firms may have coped with the increased competitive pressures by investing and becoming more productive. If capital is a complement factor to labor, this could foster the demand for workers and thereby explain the positive impacts of US automation on employment in areas where labor was initially less likely to be replaced by robots. Table 14 presents the impacts of US and local automation on the ratio of wage employment to working age population. We consider employment in wage jobs, for people 12 years of age and older as reported in the published Census tabulations by the National Statistical Institute (INEGI). This is a reduced-form equation where US automation enters directly in the right-hand size. It shows that higher exposure to US automation did not have a significant impact on total wage employment, on average. In contrast, exposure to local automation has a negative effect on employment which is robust across all specifications except the one the first column. The coefficient is very similar across columns 1 through 5, and increases dramatically when excluding the automotive sector. The coefficient in Column 2 implies than an area that experienced an increase in 1 robot per thousand workers in Mexico, witnessed a 0.026 percentage points lower employment to population ratio growth compared to an area with zero exposure to local automation.  Panel A of Table 18 shows that the negative impacts of domestic automation were only experienced by unskilled workers, particularly high school graduates. According to column 4, an increase of one robot per thousand workers reduced the employment rate growth of high school graduates by 0.127 percentage points. In contrast, college graduates were not affected.

Impacts of US and Domestic Automation on Total Employment
Panel B suggests that to a large extent labor markets adjusted through increasing the relative size of the informal sector, where informality is measured as the share of employed people who are day laborers, self-employed or unpaid workers. Column 4 in Panel B indicates that an increase of one robot per thousand workers increased the share of informal workers by 0.0972 percentage points among high school graduates. Table 19 shows the impacts by gender and indicates that while both men and women experienced a decline in employment as a result of exposure to domestic automation, the impacts were larger for the former. These patterns are consistent with the findings of Acemoglu & Restrepo (2017) for the US, who also find that the negative impacts of robots are slightly larger for men than for women.
Tables 20 and 21 present some robustness checks. Table 20 tests the hypothesis that the geographic units are a reasonable choice to measure LLM impacts. It shows that exposure to local and US automation (through exports) did not have a significant impact on net migration at the area level. Thereby, it is unlikely that automation-induced labor mobility introduces a bias to our estimates of employment impacts. Table 21 tests for other confounding factors that may affect the estimations. It shows that controlling for overall investments, and investments in machinery and ICT, as well as exposure to Chinese imports and off-shoring, dropping LLMs with only one municipality and weighting by the working age population do not affect the main findings.
Finally, Table 22 shows the impacts of automation on wage inequality, defined as the ratios of average monthly wages from different percentiles of the wage distribution (in log points). It shows that more exposure to domestic automation increases the wage ratio between the 90th and 10th percentile. The size of the coefficient implies that an increase in one robot per thousand workers raises the 90-10 wage ratio by 0.29 percentage points (≈ e 0.00294 − 1).

Conclusion
This article examines the link between automation in high-income countries and trade with developing economies, and the associated labor market impacts. Using trade data by municipality, sector and destination from 2004 to 2014, it provides new evidence that increasing exposure to robot adoption by US industries results in lower export growth from Mexico to the US. The decline in export growth was driven by intermediate goods, which is consistent with the hypothesis that automation in rich countries may induce reshoring, or lower the pace of offshoring to developing economies. Exposure to US automation also reduced exports of consumption goods from Mexico. In contrast, higher exposure to US automation was accompanied by an increase in imports of raw materials and intermediate goods, which is consistent with US automation contributing to increase the economic efficiency of Mexico's firms by allowing them to access cheaper inputs.
This automation-induced trade shock also had an effect, albeit small, on Mexico's workers.
In particular, areas where a higher fraction of jobs were susceptible to being automated were more likely to experience a decline in manufacturing employment in response to US automation. However, when examining the impacts on total wage employment in all sectors (manufacturing and non-manufacturing), the impacts of US automation vanish. The analysis suggests that this is driven by the fact that the automation-induced trade shock was rather small in magnitude.
In addition, we find that the domestic adoption of robots in Mexico had negative impacts on wage employment. Displaced workers were more likely to move to informality than to unemployment. Finally, the shock was harder for unskilled, young workers and for those at the bottom of the wage distribution, which contributed to increase wage inequality in areas more exposed to local automation.
While the impacts of US and local automation on Mexico's exports and labor markets tend to be negative, they are rather small in magnitude. Nevertheless, the results indicate that disadvantaged workers are more likely to suffer these negative effects than the rest. In addition, given the increasing rate of robot adoption across countries, it is not clear that the      Note: the dependent variable is the change in the log of exports per worker from Mexico to the US (in log points). The coefficient associated with the exposure to robots should be interpreted as the percent change in exports per worker growth associated with an increase of one robot per thousand workers. Exposure to US robots and local robots are instrumented with exposure to robots in Europe and Brazil. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: the dependent variable is the change in the log of exports per worker from Mexico to the US (in log points). Regressions are weighted by total exports. The coefficient associated with the exposure to robots should be interpreted as the percent change in exports per worker growth associated with an increase of one robot per thousand workers. Exposure to US robots is instrumented with exposure to robots in Europe. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: the dependent variable is the change in the log of exports minus imports per worker from Mexico to the US (in log points). The coefficient associated with the exposure to robots should be interpreted as the percent change in net exports per worker growth associated with an increase of one robot per thousand workers. Exposure to US robots and local robots are instrumented with exposure to robots in Europe and Brazil. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: the dependent variable is the change in the log of exports per worker from Mexico (in log points). The coefficient associated with the exposure to robots should be interpreted as the percent change in exports per worker growth associated with an increase of one robot per thousand workers. Exposure to US robots and local robots are instrumented with exposure to robots in Europe and Brazil. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: the dependent variable is the change in the log of exports/imports per worker from Mexico to the US (in log points). The coefficient associated with the exposure to robots should be interpreted as the percent change in exports/imports per worker growth associated with an increase of one robot per thousand workers. All imports are from the US only. Exposure to US robots and local robots are instrumented with exposure to robots in Europe and Brazil. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: the dependent variable is the change in the log of exports per worker from Mexico to the US (in log points). The coefficient associated with the exposure to robots should be interpreted as the percent change in exports per worker growth associated with an increase of one robot per thousand workers. Exposure to US robots and local robots are instrumented with exposure to robots in Europe and Brazil. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. Panel A controls for the change in the ratio of imports from China to value added in the local labor market. Panel B controls for exposure (through exports) to investments in IT (Information Technologies) per hour worked in the US. Panel C controls for exposure (through exports) to investments in CT (Communications Technologies) per hour worked in the US. Panel D controls for the ratio of domestic investments in ICT to value added in the local labor market. Panel E controls for dummy variables equal to one if the local labor market is in the second, third or fourth quartile according to the share of offshorable jobs in 2000. Note: In panels A and B the dependent variable is the change in ratio of tradable and manufacturing sector wage employment to population older than 12 years. In panel C the dependent variable is the change in the ratio of private sector wage employment to population older than 15 years. Ratios are expressed in percentage points. The coefficient associated with the exposure to robots should be interpreted as the change in the employment measure (in percentage points) associated with an increase of one robot per thousand workers. All specifications control for exposure to local automation (both exportand employment-weighted). Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: the dependent variable is the change in ratio of tradable and manufacturing sector wage employment to population older than 12 years.

Tables
The coefficient associated with the exposure to robots should be interpreted as the change in the employment measure (in percentage points) associated with an increase of one robot per thousand workers. Exports and imports are instrumented by export-and import-weighted US automation, respectively. All specifications control for exposure to local automation (both export-and employment-weighted). Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: the dependent variable is the change in ratio of tradable and manufacturing sector wage employment to population older than 12 years."Replaceability" is the share of jobs susceptible to being replaced by robots in 2000. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level.  Note: the dependent variable is the change in ratio of total wage employment to population older than 12 years."Replaceability" is the share of jobs susceptible to being replaced by robots in 2000. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: the dependent variable is the change in the wage employment to population older than 12 years. Exposure to domestic automation is instrumented with exposure to automation in Brazil.
Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level.   Note: Exposure to domestic automation is instrumented with exposure to automation in Brazil. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: Exposure to domestic automation is instrumented with exposure to automation in Brazil. The net migration rate is the difference between the number of in-migrants and out-migrants, divided by the total population of the LLM. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: Exposure to domestic automation is instrumented with exposure to automation in Brazil. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level. Note: Exposure to domestic automation is instrumented with exposure to automation in Brazil. The dependent variables in Panels A, B and C are the average monthly wage ratio between the 50th and 10th, 90th and 50th, and 90th and 10th percentiles, respectively. Standard errors are robust against heteroscedasticity and allow for clustering at the state level. The coefficients with are significant at the 1% confidence level; with are significant at the 5% confidence level; and with are significant at the 10% confidence level.