Robots and Export Quality

Robots are rapidly becoming a key part of manufacturing in developed and emerging economies. This paper examines a new channel for how automation can affect international trade: quality upgrading. Automation can reduce production errors, particularly of repetitive processes, leading to higher quality products. The effects of robot use on export quality are estimated, by combining cross-country and cross-industry data on industrial robots with detailed Harmonized System 10-digit trade data. Robot diffusion in (preexisting) foreign customers is used as an instrumental variable to predict robot adoption in the home country-industry. The findings show that robot diffusion leads to increases in the quality of exported products. Quality improvements are predominantly driven by the upgrading of developing country exports; and within countries, quality improvements are driven by upgrading of (initially) lower-quality exports of developed and developing countries. The paper also finds some differences in the type of robots—sophisticated or more basic—associated with quality gains in developing and developed economies.


I. Introduction
Robots are becoming an integral part of global production processes. Today there are roughly 2.7 million robots in operation around the world with the number of new robots installed each year more than tripling over the last decade (IFR, 2018). In some cases, even entire production lines are being automated (Tilley, 2017). The increasing automation of manufacturing tasks is true not only of developed economies, but also developing economies are increasingly automating production (see Figure 1). 2 While developed economies remain more intensive users of robotics, there has been faster diffusion in developing economies, leading to a convergence in robot use across countries.

Figure 1: Convergence in robot use between developed and developing countries, 2000-2015
Notes: The following figure plots the 25 th , 50 th and 75 th percentiles of the distribution of log (1 + robot stock) at the country-industry level, separately for developed and developing countries (see a full list of our sample of 59 countries in Table 1). We add one before taking logs to avoid excluding zero values. Developed reflects high-income countries and developing reflects non-high-income, defined in 2000 using the World Bank classification.

3
An emerging literature has begun to examine some of the economic implications of robot diffusion, with much of the focus thus far on developed economies. Much of this work has focused on the productivity or labor-saving effects of robotics and their impact on wages or employment. 3 Some studies have begun to assess how robotics may influence the global organization of production, for instance through the potential reshoring back to developed economies of previously imported intermediate inputs (Artuc et al., 2018;De Backer and DeStefano 2021;Dachs et al, 2019). This existing research largely reflects research on the United States, Canada and European countries, with few studies examining impacts on emerging markets (notable exceptions being Artuc et al., 2018, Maloney andMolina, 2019;and de Vries et al., 2020).
In this paper we explore a new channel -whether automation leads to export quality upgradingin both developing and developed economies. Robots are used to undertake a range of repetitive tasks that require a consistent high-level of accuracy, such as handling and assembly of small electronic components, precision welding of car parts and cutting of metal products within strict tolerances (Agapakis et al., 1990;Gunasekaran, 1996;Tilley 2017). In contrast, tasks that are either less repetitive or have larger error tolerances (such as packing boxes) are often still performed by humans, even in high-income economies. Many robots are explicitly designed to achieve greater accuracy and can include sensors that allow the machines themselves to identify product defects (Herakovic, 2010;Herakovic et al., 2011). The widespread diffusion of robotics in manufacturing production may lead to increases in the quality of exported products.
To assess the impact of robots on quality upgrading, we rely on several data sets that span a broad sample of countries (28 developed and 31 developing economies) over a 15 year the period from 2000 to 2015. 4 Export quality is derived using detailed HS 10-digit US import data and combined with data on robot use at the country-industry level. To address potential endogeneity concerns, we instrument robot adoption of the home country-industry using robot diffusion among their foreign customers located in other world regions, using their initial foreign trade network defined in 2000. 5 We also include a broad range of fixed effects, including country-product and countryyear dummies. We exploit the extensive country coverage of our data to disaggregate quality upgrading into that of developed and developing economies. Moreover, the richness of our trade data, with 5,646 unique products, enables us to examine which products are being upgraded within each country. Specifically, we examine quality upgrading for new export varieties, more complex products (following Levchenko, 2007) and initially low-quality exports. Finally, we use novel information on the type of robots being adopted to examine whether quality gains are specific to the diffusion of advanced robots or are more broad-based.
We find that robot diffusion leads to increases in the quality of exported products. In aggregate the strongest quality gains accrue to developing economies, with more muted quality growth for developed economies and only evident for the first 5 years of our sample. Within each country, we find robust evidence that robots lead to quality upgrading of initially low-quality exports, furthest from the quality frontier, and this is true of both advanced and developing economies. Since developing economies in general tend to produce lower-quality exports, this reconciles the stronger aggregate quality upgrading we observe for developing countries. The paper also finds some evidence of differences in quality upgrading by types of robots, adoption of more basic robots leads to quality upgrading of developing economies, whereas some sophisticated robot applications lead to stronger quality upgrading in advanced economies. For instance, in terms of cutting machines, we find mechanical cutting robots matter more for quality upgrading in emerging economies and laser cutting robots more for high income economies. Finally, the strength of our instrumental variable suggests that the technological choices of foreign suppliers can be an important factor in driving robot adoption in their international supply chains.
One of the difficulties in measuring the effects of technology diffusion is the likely presence of endogeneity bias. Technology is not typically randomly adopted but done so with an expected return on that investment. This paper uses robot diffusion in (pre-existing) foreign customers as instrumental variables to predict adoption in the home country. Our choice of instrument is motivated by the existing FDI literature that finds extensive evidence of knowledge spillovers from foreign multinational customers to their overseas suppliers (Javorcik, 2004;Havránek and Iršova, 5 That is, we exclude foreign customers in the same world region as the home country for the purposes of constructing the instrumental variable. We do so to remove concerns of common regional shocks that may jointly affect the home country and foreign customer. 5 2011). Multinationals can require strict productivity and production standards of their suppliers, and may share new technologies or encourage the adoption of new production methods to achieve this (Criscuolo and Timmis, 2017). To ensure the robustness of our instrument, we use ex-ante trade networks at the start of the sample period for the year 2000. We also only consider trade networks with other world regions (i.e. excluding trade with the home country's region) -to exclude common regional shocks that may contaminate the analysis. In addition, the relevance of the instrument withstands a barrage of fixed effects including exporter*HS 10-digit product and exporter*year fixed effects, in order to control for potential trends across countries overtime, as well as potential time-varying multilateral resistance terms highlighted by the trade literature (Anderson and van Wincoop, 2003). 6 The existing literature on robotics, and technology more generally, often pertains to developed economies Presidente, 2017;Graetz and Michaels, 2018;Cardona et al 2013). A priori it is unclear how quality upgrading gains relate to country development levels.
On the one hand, developing countries typically produce lower-quality exports and so have larger potential to catch-up through automation (Hallak and Schott, 2011;Henn et al., 2020). On the other hand, developed countries are more likely to have access to the complementary factors needed to realize the potential quality gains from robotics, such as the management skills to reorganize production (e.g. Hitt, 2000, Bresnahan et al., 2002). Our study uses data that spans 59 countries allowing us to identify important heterogeneity in quality gains from robotics across developed and developing countries. 7 We also leverage new data on robots types -e.g. laser guided cutting vs mechanical cutting -to examine whether certain robots are more crucial for quality upgrading than others.
Export quality has attracted a great deal of attention because of its importance for the development and growth (Hirschman 1958;Grossman and Helpman 1991;Hidalgo et al 2007). At the firmlevel, businesses that produce higher quality goods have higher revenue and employment, pay higher wages, are more productive and sell their goods to a greater variety of markets (Verhoogen 2008;Manova and Zhang 2012;Crozet et al 2012). Producing high quality exports is also often a 6 pre-requisite for participating in global value chains and exporting to advanced economies Cadestin et al, 2018;Kummritz et al., 2017). However, producing high-quality exports remains a particular challenge for developing economies, with economic development often involving a step-change in the quality of production (Hallak and Schott, 2004;Henn et al., 2020).
We contribute to this literature by examining quality upgrading effects for a broad range of developed and developing economies.
Historically in the trade literature, unit prices (trade values per unit quantity) had been used as a proxy for quality (Schott, 2004;Hallak, 2010). However, the literature has recently recognized that a range of factors other than quality itself may influence prices, such as transport costs or tariffs. We use detailed HS 10-digit level US import data to estimate export quality by employing a micro-founded measure of quality introduced by Khandelwal et al (2013). This measure has been widely used in the recent literature (e.g. Breinlich et al., 2016;Bajgar and Javorcik, 2020).
Intuitively, this measure assigns a higher quality for products -conditional on prices -that have a larger market share in a given destination country (in our case, the United States).
We also contribute to the literature examining ISO quality certification -a manufacturing standard commonly linked with production quality. For example, ISO 9000 certification in Slovenian firms is found to increase firm exports along with other performance outcomes including profitability, labor productivity and wages (Javorick and Sawada, 2018). Following exchange rate devaluation Mexican firms, particularly those initially larger and more productive, are more likely to gain ISO 9000 certification, increase exports and wages (Verhoogen, 2008). ISO 9000 certification can also be a pre-requisite to join as suppliers to multinationals, which can demand continuous quality improvements in their supply chains (Javorcik and Spatareanu, 2009;Iacovone et al, 2015).
The trade literature has commonly focused on the effect of trade liberalization on technology adoption, rather than examine the impact of technology on trade as we do here (see for instance, Bustos, 2011;Bas and Strauss-Kahn , 2015;Bloom et al., 2016). Some exceptions are Kneller and Timmis (2016) who find that UK broadband rollout led new firms to trade services and Fernandes et al. (2019) who show that the internet rollout led both to increased intensity of Chinese manufacturing exports and new firms to start exporting. Our paper most closely relates to Artuc et al. (2018), who find that greater robot adoption leads both to an increase in imports sourced from and exports to less developed countries in the same industry. Our paper focuses on the impact 7 of robots on the composition of trade -the quality of exports -concentrating on changes in quality within detailed HS 10-digit export varieties.
The rest of the paper continues as follows. Section II discusses the mechanisms through which robotics impact product quality. Section III presents the data and explains our variables of interest.
The empirical strategy is described in Section IV and the results are discussed in Section V. Section VI summarizes the paper and provides several policy considerations.

II. How might robots impact quality?
The engineering literature and recent descriptive studies highlight a number of possible mechanisms through which robots may lead to product quality improvements. Robots enable greater accuracy and precision for repetitive tasks, reducing production error, and thereby increasing product quality (Tilley, 2017;Agapakis et al 1990 andGunasekaran 1996). Computer Aided Design and Manufacturing (CAD/CAM) technologies are commonly used alongside robotics during the design and testing phases of production, allowing producers to virtually create more sophisticated prototypes that can be tested through simulations, increasing the quality and variety of final goods (Buxey, 1991;Groover and Zimmers, 1983;Evans, 1980). Robotics often require overall higher quality inputs than non-automated machines which may also lead to higher quality of finished products. Long run times means that the inputs used within the production process need to be of higher quality to enable continuous production. Welding robots, for example, run for long periods of time at high temperatures and frequencies requiring manufactures to use high quality consumable inputs in order to prevent process breakdowns, unneeded maintenance and to ensure that the production process is efficient and accurate (The Fabricator, 2011). Unfortunately, we do not have detailed imported data for our 59 countries to examine imported intermediate quality upgrading.

i. Heterogeneity across robot applications
One important question for academics and policy makers is whether all types of robotics lead to quality gains or whether the benefits of using these technologies are asymmetric across applications or are common across broad robot types. We use novel information on the type of robots to examine this question. Some types of advanced robots are able to operate to within extremely accurate tolerances. For instance, laser cutting can make precise cuts to within 10 micrometers (0.01 millimeters), depending on the laser wavelength, and laser guiding can enable extremely accurate robot movement and positioning, often to within micrometers (see Figure 2). Similarly, sensor and vision inspection devices incorporated with some robots can also allow the machines to identify flaws in products across a number of dimensions including color, surface finish, and abrasions, see 9 Figure 3 (Herakovic et al., 2011;Herakovic, 2010). 8 Robots designed to carry out quality control inspections (see Figure 3) can also help reduce the numbers of defective products that reach the customer while at the same time reducing the need for quality inspection staff (Argote and Goodman 1985).
For more basic robot applications, such as pallet handling robots and manual cutting robots (see Figures 4 and 5), the precision tolerances are likely to be higher than sophisticated laser guided or laser cutting robots. However, the quality gains from adoption will also depend on the prior technology used, for instance, a transition from unskilled labor to basic robots. Even rudimentary robots are commonly able to repeatably perform some tasks more accurately than human laborfor example, manual cutting robots in the 1980s were able to operate to within 1mm accuracy (Gillespie, 1980). In addition, more basic robots are likely to have fewer adjustment costs and so be more readily implemented in production of less advanced firms and countries.

Figure 3: Vision guided inspection robot
Source: Metrology.news (2018) 8 The automotive industry relies on robots to monitor quality through a host of production processes such as defaults in body panels, uneven paint finishes, breaks in adhesive sealants, irregular welding beads, all of which are found to increase the quality of the end product (Bogue 2013). Within the food industry, automated machines with optical sensors and spectroscopic techniques are incorporated in processing and inspection of food products by providing instantaneous safety and quality control assessment (Singh and Jayas, 2012).  Source: ZsoltGraniteCorporation. (2020) ii.

Heterogeneity across countries and products
Not all tasks are currently suitable for automation, particularly those that are bespoke or dexterous.
Instead robots are more effective in carrying out simple activities that require repetition at high levels of accuracy and for long periods of time, such as cutting, welding and handling (Graetz and Michaels, 2018;and Frey and Osborne, 2017). In contrast, tasks that are less repetitive or have larger error tolerances (such as packing boxes) are often still performed by humans, even in high-income economies and advanced firms.
Over the last several decades, many of these repetitive tasks that are suitable for automation have been fragmented across global value chains and offshored to low-wage economies. Much attention has been directed towards whether automation will lead to these tasks being performed by robots and reshored to developed countries, particularly as wages rise in developing economies.
However, another possibility is that some of these tasks may be replaced by robots in developing countries, indeed, some emerging markets, such as China, are some of the largest global users of robots in manufacturing. Furthermore, producers of lower quality goods have greater catch-up potential and lower quality goods are more often produced in developing countries. These motives are likely to differ from the labor-saving motive of robotics adoption in high-wage economies, often cited in the context of the future of work or high-income economy productivity (Graetz and Michaels, 2018;.

i. Robot data
Data on the use of robots across countries and industries are provided by the International Federation of Robotics (IFR), the same data used by Graetz and Michaels (2018), . IFR provides information on annual shipments (sales) and a measure of industrial robot stock across roughly 100 countries and manufacturing industries. 9 Their definition of industrial robots comes from the International Organization for Standardization (ISO) 8373:2012.
From this definition, a robot refers to a machine that embodies the following characteristics: can be reprogrammed, is multipurpose in function, allows for physical alteration, and is mounted on three or more axes.
IFR constructs this data set by consolidating information on industrial robot sales from almost every industrial robot supplier in the world. From the data we know the number of robots that are being sold to manufacturing sectors in countries over time. In addition, the IFR data provides information on the robot types (by application such as handling, processing, welding, assembling and so on), which is only available at the country level. One limitation of the data is that robot sales and stock are denominated in units, and thus information on the value of the assets is not included. Following Graetz and Michaels (2018), we construct robot stock at the country-industry level by taking the initial stock starting value from the IFR, then adding to this robot sales from subsequent years and assume annual depreciation of 10%.
One of the limitations of our study is that our robotics data is not comparable between developed and developing countries before 2000, which constrains our sample period to (IFR 2018. Furthermore, robots are measured at the industry-country-year level therefore we cannot assess differences in the use of robots across establishments within an industry. However, one key 12 advantage of the IFR data is the consistency and comparability across many jurisdictions which is typically lacking with firm level robot data, allowing us to consider 59 exporting countries. 10 We include country-industry controls for employment and labor productivity (real value-added per worker in constant price 2015 USD), which are obtained from the UNIDO Industrial Statistics Database. 11 ii.

Measuring quality
Export quality is derived from detailed United States HS 10 digit import data which we match to the robotics data by country and industry over time. We exclude robot products from the trade data. We harmonize the HS import data, in order to consistently measure HS 10 digit products over time, following the procedure of Pierce and Schott (2012). 12 We use US import data, due to its availability at the 10-digit level, and so allowing the measurement of quality for detailed product varieties. 13 14 Historically, the trade literature has used unit prices (trade values per unit quantity) as a proxy for quality (Schott, 2004;Hallak, 2010). However, the literature has recently recognized that a range of factors other than quality itself may influence prices such as transport costs, tariffs, competition and productivity. As a result, our main export quality measure for this paper follows the microfounded model of Khandelwal et al (2013) and Breinlich et al. (2016). Demand for each variety is given by: 10 Canada and Mexico have been dropped from the sample due to inconsistent data collection over the sample period. Before 2010, the United States, Canada and Mexico robot sales were classified jointly as North America. 11 Value-added in USD is deflated to constant prices using US CPI-U, consistent with the treatment of trade values. Other controls in the UNIDO Industrial Statistics Database, such as wages, capital investment or number of enterprises, are not widely available for our sample countries. 12 We gratefully acknowledge concordance code available until 2019 on Peter Schott's homepage https://faculty.som.yale.edu/peterschott/international-trade-data/.
13 Allowing us to compare (Washington) apples with (Washington) apples. 14 We follow Amiti and Khandelwal (2013) and trim the top and bottom 1% of prices by year. We estimate quality only for manufacturing sectors, and for differentiated sectors using the Rauch (1999) liberal classification. The results are robust to using conservative differentiated sector classification.

13
Where ln represents the quantity of imports for product p, from exporter i at time t, is the HS 10 digit elasticity of substitution for product p of the importing country (taken from Broda and Weinstein, 2006), ln is the quality and ln the unit price of the imported product.
is the price index of the product and is the expenditure on product p.
Note we estimate equation 2 using: Where denotes an HS 10 digit product-time fixed effect, which absorbs the price index for varieties of product p (ln ) as well as demand expenditure on these products ( ) (see discussion in Breinlich et al, 2016). (Log) quality is then estimated as the residual ̂ from regression 2, scaled by the elasticity of substitution: The intuition for the quality measures is it reflects market shares, conditional on prices in the destination country, the United States. The resulting measure is often interpreted as a relative ranking of quality within each product-destination market combination. We follow this interpretation. Firstly, we estimate regressions based on this within variation at the exporterproduct level (as we note in section 4). Secondly, where we examine heterogeneity by initial product quality relative to the "quality frontier", i.e. the highest quality exports, we define the frontier at the HS 10 digit level, consistent with the quality measure.

Descriptive statistics
Developed economies are among the most intensive users of robots during our sample period (see earlier Figure 1)  In terms of export quality, we also find that there has been convergence in quality between emerging economies and the frontier between 2000 and 2015, which is consistent with broader findings in the literature (for example, Henn et al., 2020). Figure  Similarly, the quality gap of the median and bottom quartile of exports from developing countries have almost completely converged with exports from developed countries.
When looking at descriptive statistics in levels, we find as expected, both unit prices and export quality are higher for developed than for developing economies (see Tables A1 and A2 in the   Appendix). Similarly, levels of robot use both overall and for each specific robot application (including laser cutting and mechanical cutting) are also higher in advanced economies. Developed country exports are closer to the quality frontier, but have on average introduced fewer new export products (since 2000) in comparison to developing countries. In terms of our industry control variables, industries in developing countries have lower labor productivity (real value-added per worker), but are somewhat larger in terms of employment.

Figure 7: Quality trends across different percentiles of the initial quality distribution
Note: The figure illustrates quality trends for exporters with different distances to the quality frontier in 2000. The quality gap of any given export product reflects the difference between its (log) quality and the (log)

IV. Empirical strategy
We estimate the effect of robotics on export quality using a difference-in-difference estimation, complemented with additional fixed effects, in the next section we discuss our instrumental variable: Where ln quality refers to the log quality for a product , from an exporter , in a sector , at time (defined by equation 3 in the previous section). represents is the log robot stock in exporter , for sector at time t. Note we add one to the robot stock before taking logs, to avoid dropping some zero values. represents a broad range of fixed effects and control variables.
We include exporter*HS 10-digit product and exporter*year fixed effects, in order to control for potential trends across countries overtime, as well as potential time-varying multilateral resistance terms highlighted by the trade literature (Anderson and van Wincoop, 2003). 17 Note the seminal paper in the literature, Graetz and Michaels (2018) estimate a similar specification for European country-industries, also allowing for country-trends, but measuring long-differences in productivity rather than differences-in-differences as we do here. We also add control variables for (log) industry employment, which is similar to estimating log robots per worker, but allows for differential coefficients on log robots and log employment. We include real value added per worker to control for potential scale effects and the effects of differential productivity growth across sectors. represents the error term. All standard errors are clustered at exporter-industry level.
First, we examine heterogeneous effects by exporter country income -developed vs developing economies. Exporter income status is defined in 2000, the first year of our data, using the World Bank classification. We interact our main robot measure with a developed and developing country dummy, in order to report the estimated effect for each country group against zero. We do this in preference to sample splitting in order to maximize the power in our IV estimations.
Second, we examine whether there is heterogeneity within each exporter by product typesinitially high vs low quality, complex vs non-complex and new vs existing exported products.
Initially low-and high-quality products are measured using their initial quality gap -the distance between their quality and the quality of the frontier (the top 10% highest quality) in the first year.
The quality gaps are calculated within each HS 10-digit product and for each exporter of those products. 18 Product complexity is defined following Levchenko (2007) 20 We estimate product heterogeneity by interacting our robot measure with a quality gap or complex product or new product variable.
We also consider whether certain robot types matter more for quality than others. To assess this we rely on a relatively unexploited aspect of the IFR data which collects information on robot applications at the country level. Following the engineering literature, we focus on several applications which are perceived to be used mainly for improving the quality of production, notably those equipped with laser guided devices. In particular, we examine heterogeneity in quality effects of laser guided robots to non-laser guided robots within each broad application categories from the IFR data (cutting, handling and welding). Because robot applications data are at the country-level, we first construct country-level robot stocks for each application, exactly as we describe in section 3 for (overall) robot data at the country-industry level. We approximate robot applications at the country-industry-level, by multiplying the country-industry-level overall robot stock, with the (country-level) share of robots of a given application. We do so to avoid country-level regressions and enable a consistent estimation specification across regressions.
Given the scope of this paper, we focus explicitly on within product quality gains as a result of robot diffusion. The literature on export quality finds evidence of quality gains accruing both from within product quality improvements (Atkin et al, 2017) and introduction of new high-quality products (Goldberg et al 2009). Our fixed effects specification does not allow for the assessment of the latter channel, and therefore we leave this to future research.

i. Instrumental variable construction
To address the endogeneity of robot adoption, we use the diffusion of robots in (initial) trade partners as an instrument for home country-industry robot adoption. This instrument is motivated firstly by the FDI literature that finds broad consensus of knowledge spillovers to industries that supply multinationals through backward linkages (Javorcik, 2004;Havránek and Iršova, 2011).
Lead firms tend to demand better quality inputs from suppliers and may directly share knowledge, technology and encourage the adoption of new practices to achieve this, for example, obtaining ISO 9000 certification (Javorick and Sawada, 2018). Secondly, our motivation borrows from the trade literature, which finds evidence that trade can be an import channel for technology diffusion (e.g. Bustos, 2011;Bas and Strauss-Kahn , 2015;Bloom et al., 2016).
Specifically, we instrument a country-industry's robot adoption using weighted average robot diffusion of their (pre-existing) export customers, using their initial export network in 2000 to define these weights: → , , =2000 reflects the exports from the home country to foreign customer of sector in year 2000 which is scaled by the total quantity of exports of country of sector in the same year _ , , =2000 . These weights are multiplied by the robot stock of supplier in sector at time , .
We consider only export flows and robot adoption in countries located in other world regions in constructing the instrumental variable. We do so out of a concern of potential correlated regional shocks that may jointly affect robot diffusion at home and in their (initial) foreign customers.
Given our use of US import trade data, we also exclude exports to North America (Canada, Mexico and the United States) for the construction of the instrument.

ii. Instrument relevance
The first stage results in Table A3 in the Appendix suggest that our instrument, the diffusion of robotics among pre-existing foreign customers is a strong predictor for robot adoption of the home country. The first stage results of our instrumental variable, used throughout the paper, is reported in model 1. The size of the first-stage F statistic (115.8) demonstrates our instrument has strong predictive power for robot adoption in the home country, despite the inclusion of a range of restrictive country-product and country-year fixed effects. A 10% increase in robot use in export customers leads to a 7% increase in robot use amongst their foreign suppliers.
In models 2 to 6, we investigate alternative identification strategies that we not do not employ in the rest of the paper. In model 2, we calculate an alternative instrument, using robot diffusion in (initial) developed country export partners. Trade connections to advanced markets may in principle have greater potential for technology spillovers, because of the wider variety or more sophisticated technologies used there. However, we do not find any additional predictive power of developed country export partners, over export partners more generally, and including this additional instrument halves the first stage F statistic.
In models 3 and 4, we find that our instrument works well as a predictor of robot adoption in both developed and developing countries. The instrument also predictors robot diffusion if we restrict the sample to developing (Model 3) and developed economies (Model 4) however the strength of the instruments are lower than in the pooled sample, reflected in the F statistics of 27.2 and 44.7 respectively. For either sub-sample we do not find any additional predictive power of developed export partners, over export partners more generally. Note we do not split the sample in our main regressions, but rather pool both country income groups, to maximize the strength of the instrument.
In models 5 and 6, we include alternative instruments reflecting robot diffusion in (initial) import partners. As noted earlier, the FDI literature reveals extensive evidence of knowledge spillovers from multinational customers backwards to their suppliers, however there is far less evidence of the reverse. Our results mirror the findings of this literature. We do not find any evidence that 22 measures of robot adoption in (initial) import partners (model 5), as well as initial developed import partners (model 6), predict robot adoption in the home country, and their inclusion substantially weakens the overall first-stage identification. In addition, constructing an instrument from the adoption of import partners, i.e. suppliers, is less plausibly exogenous than export customers, the instrument we use. The FDI literature shows multinationals often have substantial market power and influence over their suppliers. Therefore, robot adoption in suppliers could potentially be an endogenous decision by the home firm.
For the remainder of the paper, the baseline instrumental variable specification will be a single instrument, weighted average robot stock in export partners reflected in Model 1.

iii. Instrument validity
In constructing our instrument, we undertake a number of steps to assess its plausible exogeneity.
As discussed in the preceding section, the instrument measures robot diffusion in export partners rather than import partners, with export partners defined in the initial year and we only consider initial export partners in other world subregions (to exclude common regional shocks). 21 We conduct a strict exogeneity test to assess the validity of the instrument, following Wooldridge (2002) and Baier and Bergstrand (2007). We repeat the baseline first-stage estimation, but also include leads (t+1 and t+2) and lags (between t-1 to t-3) of our instrument. If the diffusion of robots among export partners is strictly exogenous, then future values of the instrumental variable (at t+1 and t+2) should not be correlated with our treatment, contemporaneous robot diffusion.
The results in Table A4 cannot reject that the instrument is strictly exogenous. The coefficients for future values of the instrument (at t+1 and at t+2) are both statistically insignificant and close to zero (see models 2, 3 and 7). Moreover, the standard errors are noticeably small signifying the precision of the estimates. In addition, we find that lagged values of the instrument (models 4 to 6) do not typically increase the predictive power compared to the baseline (model 1). 21 Sub-regions are defined using UNSTATS classification.

V. Results
This section presents the OLS and instrumental variable estimates on whether robots lead to increases in export quality. First, we present our baseline estimation of quality for all countries and products and distinguish these effects across developed and developing country exporters. Second, we examine differences in quality gains across product types. In particular, we explore if robot diffusion results in a catch-up or a divergence in product quality over time, by contrasting the quality growth of products based on their initial distance from the "quality frontier". We also consider heterogeneous quality gains across more vs less complex products and across new vs existing export varieties. Thirdly, we exploit novel data from the IFR to examine whether there are heterogeneous quality gains across different robot applications -contrasting more and less advanced robots which undertake handling, cutting and welding.

i. Baseline
In this section, we examine whether the diffusion of robotics leads to quality gains overall and decompose these effects across country income groups -developed and developing economies.
Earlier descriptive statistics show that developing countries have simultaneously experienced faster growth in robot adoption over the period 2000-2015, albeit from a far lower initial level, as well as convergence in the quality of their exports towards those of developed economies (see Figure 1 and 6). These trends may be suggestive of a potential link between robot diffusion and quality, however it is a priori unclear for which group of countries quality gains are expected to be stronger. On the one hand, emerging economies typically export lower-quality products, further from the frontier, and so have larger scope for quality increases (Henn et al., 2020). On the other hand, extensive research has shown that obtaining the benefits of technology requires a host of complementary assets, such as skills, organizational capital, management and so on (see for example Brynjolfsson and Hitt, 2000;Bresnahan et al., 2002;Brynjolfsson et al. 2002;Leung, 2004;Van Ark and Inklaar, 2006;Bloom et al. 2012;Akerman et al., 2015). These complementary assets are likely to be more readily available in higher-income economies. Table 2 presents the results both for unit prices and export quality. We find robot diffusion is strongly related to increases in export quality overall for all countries in our sample (model 5) and this relationship appears to be causal (model 7). A 10% increase in robot stock is associated with a 0.3% to 1.2% increase in quality, using OLS and IV estimation respectively. In terms of unit prices there is a weaker overall relationship, with some evidence of an OLS correlation, but no significant overall effect discernible from IV estimates (model 1 and 3 respectively). Moreover, the F statistics for the IV regressions are 115.8 confirming the strength of the instruments in the first stage, as discussed in the previous section. 22 We next decompose the aggregate effects into those for developed and developing country exporters. To do so we interact our robot variable with a dummy variable for high income countries and a dummy variable for non-high income status. Therefore, we are estimating the robot coefficients against the null of zero for both groups, rather than comparing the effects across the groups. We avoid splitting the sample in order to maximize power of the instruments, which is important for some later regressions.
When peering beneath the aggregate, we find that most of the gains in export quality from robotics are driven by developing countries. A 10% increase in robots is estimated to lead to a 2.7% increase in export quality for developing economies (see column 8). In contrast, we find weak evidence (significant at the 10% level) of an increase in the quality of exports from developed countries. However, the size of the effects is considerably smaller for developed economies, a 10% increase in robots leads to only a 0.4% increase in export quality. Note in unreported results, these estimated effects in developed and developing countries are significantly different from one another. For unit prices, we similarly see increases due to robots in developing countries, but now however, no discernible impact for developed economies.
One reason why we find less evidence of a marked impact of robots on quality in developed economies over the entire sample period, may be because more advanced countries were early adopters and thus quality gains were realized early on. Indeed, the earlier descriptive evidence on robot adoption (Figure 1)  disentangle the effects of robots on export quality at early, middle and later periods of the sample across developed and developing countries. Unfortunately, we are limited to OLS estimation as our instruments are weak when estimating effects across combinations of country income groups and three separate time periods.
The results in Table A6 in the Appendix show strong correlations between quality increases and robot diffusion in developed countries at the beginning of the sample period (2000)(2001)(2002)(2003)(2004)(2005) and for developing countries at the end of the sample period (2011)(2012)(2013)(2014)(2015). These results suggest there are quality gains from robot diffusion in developed countries as well as developing, but they were realized earlier and only in the first years of our data.

ii. Heterogeneity across product types
The results of the previous section reflected regressions pooled across all product types. This section examines the extent to which there are heterogeneous effects of robots across different products. First, we explore if robot adoption has resulted in a catch-up or a divergence of product quality over time, by contrasting the quality growth of products based on their initial distance from 26 the "quality frontier". We repeat our baseline IV regressions but now interact robots with a "quality gap" variable -reflecting initial distance to the quality frontier. 23 Recall, the quality frontier is defined within a given product as the top 10% highest export quality, and the quality gap is defined as the differences between export quality and the frontier export quality in the first year.
We find strong evidence that robot diffusion leads to product quality convergence (see Table 3).
Poor quality products, that are initially furthest from the quality frontier (i.e. the largest quality gap) obtained the greatest quality gains from robots, a result consistently found across OLS and IV regressions. Unlike the baseline results in the previous section across all products, we find strong evidence of quality gains for (initially) poor quality exports of both developed and developing countries. Exports that are initially 10% further from the quality frontier, experience a 1% faster increase in quality from a given growth in robot stock in developed economies and 1.3% faster in developing countries (model 4). To assess the robustness of these results, we calculate alternative quality gap measures (see Table A7 in the Appendix) using different definitions of the frontier within each product, including the top 20% highest quality exports and top five quality exports. We find very similar results to those in Table 3.
Since developing countries tend to export lower quality goods (as shown in Table A2 and discussed in section 3), this reconciles our finding of stronger country-level effects for developing economies. Developing countries tend to produce lower-quality goods and so have greater potential for quality catch-up through automating their production.
The fact that robots matter more for quality improvements of initially lower quality goods exported by both developed and developing countries has potentially important implications for economic development. Quality improvements in production and exports appear to be important determinants of economic growth (Hirschman 1958;Grossman and Helpman 1991;Hidalgo et al 2007). Moreover, given that the gains appear are particularly strong for initially poorer quality exports implies that robotics facilitate convergence of export quality. Robot diffusion in developing countries may therefore also facilitate a broader and deeper participation in Global Value Chains, since stringent quality standards are often a pre-requisite to joining. Note: Quality gap reflects the initial distance from the "quality frontier. The quality frontier is defined within a given product as the top 10% highest exporters quality. The quality gap is defined as the difference between export quality and the frontier export quality in the first year. Robots reflects log robot stock. The instrument reflects robot diffusion in (initial) foreign export partners, in other world regions, defined using 2000 export flows. Quality refers log quality, estimated via Khandelwal et al (2013). Country income status is defined by the World Bank (2000). Controls include (log) employment and (log) real value added per worker at the country-industry-year level. The regressions also include exporter*10-digit product and exporter*year fixed effects. The first stage has been omitted for brevity. Robust standard errors clustered at the exporter-industry level are reported in parentheses. *** p<0.01, ** p<0.05, * p<0.1.
We next extend the product dimension to see whether quality improvements are heterogeneous across other product characteristics.
We start by assessing whether product complexity matters for quality gains from robotics. We measure complexity as the variety of inputs used to produce a product, following Levchenko (2007). Robotics may be particularly important for complex products given that robots can enable manufacturers to reduce the size and increase the number of internal components used to produce goods (Popovic, 2009). Electronics today could not be produced without the fine precision of robots handling, soldering and assembly of numerous small components. Moreover, robots typically work in conjunction with computer-aided design/computer-aided manufacturing software (CAD/CAMs) allowing manufacturers to test virtual prototypes of new complex goods through simulations, to identify production challenges early on (Buxey, 1991;Milgrom and Roberts, 1990;Groover and Zimmers, 1983;Evans, 1980). We next assess whether quality gains are heterogeneous across new and existing exported varieties. Robots are also likely to be particularly important for new products, with many goods now explicitly designed to be assembled by robots. Many of the most modern product varieties, such as cellphones, modern cars and other electronics goods, heavily rely on automation in their production.
However, there is likely overlap between the initial quality gap and new varieties or complexity.
New varieties in our data are particularly likely to be exported by developing countries and these countries also produce lower-quality exports (Henn et al., 2020). Developing countries also tend to both produce lower-quality exports and also less complex goods (Levchenko, 2007). In our data we find that developing countries are also particularly likely to produce complex goods at lower-quality -combining a wide-variety of intermediates without production errors may be a particular challenge (Costinot et al., 2013).
To disentangle the roles of complex products and new varieties, or initial product quality, we first estimate these relationships individually and second introduce a horse race between these product characteristics. We measure potential heterogeneous quality gains for complex goods by interacting log robot stock with product complexity developed by Levchenko (2007), defined by (the negative of) Herfindahl-Hirschman Index (HHI) of intermediate inputs. 24 We next examine the possible of an overlap with initial product quality by running a horse race by including both complexity and initial quality interactions. We follow the same steps for new products, thereby replacing the complexity interaction with a new product indicator. The new product dummy reflects whether the variety has been first exported by that country after 2000, and not at any point in 1990-1999 before our sample period. 25 Then we run a horse race with new product and initial quality interactions.

29
Focusing first on the complexity by itself, the results in Table 4 (model 1-4) suggest that the gains from robotics are indeed greater for more complex goods. These gains appear to be obtained by exporters of complex goods primarily in developing countries, with little evidence for high income countries for both OLS and IV estimates (model 2 and 4). However, the quality improvement that appears to be related to complex products is in fact explained by initial poor-quality products (model 5 to 8). When including both product complexity and (initial) quality gaps as a horse race we find product complexity no longer explains quality increases in developing countries. In developed countries in some specifications there is now a negative relationship with quality upgrading, at least conditional on initial quality. However, initial quality gaps continue to robustly predict increases in product quality from robots and this holds across OLS and IV specifications and developed and developing countries.
The results for new varieties show a similar message to product complexity (see Table 5). When including a new export product dummy alone, it appears the quality gains from robots are particularly concentrated in new products (models 1-4). This is suggested across both developed and developing economies and OLS and IV specifications. However, in a horse race between new varieties and initial quality, the explanatory power for new products disappears. Instead, initial distance to the quality frontier continues to strongly predict quality upgrading (models 5-8).  Note: Quality gap reflects the initial distance from the "quality frontier. The quality frontier is defined within a given product as the top 10% highest exporters quality. The quality gap is defined as the difference between export quality and the frontier export quality in the first year. New products are defined as HS 10digit products first exported by a given country since 2000 and not previously exported during the 10 years of pre-sample data, 1990-1999. Robots reflects log robot stock. The instrument reflects robot diffusion in (initial) foreign export partners, in other world regions, defined using 2000 export flows. Quality refers log quality, estimated via Khandelwal et al (2013). Country income status is defined by the World Bank (2000). Controls include (log) employment and (log) real value added per worker at the country-industry-year level. The regressions also include exporter*10-digit product and exporter*year fixed effects. The first stage has been omitted for brevity. Robust standard errors clustered at the exporter-industry level are reported in parentheses. *** p<0.01, ** p<0.05, * p<0.1.

iii. Heterogeneous effects across different robot applications
The final contribution of the paper is to examine whether certain robots matter more for quality than others. Our robot data contains information on specific robot types, that vary widely in their sophistication within a given application. For example, within handling applications, there are robots that are equipped with sensory devices that allow for product defect detection and others that lift and stack pallets. Similarly, within processing applications, some robots have precision laser cutting, while others are mechanical. Within this section we focus on these examples within cutting and handling applications, contrasting the quality effects across advanced and more rudimentary robots. 26 Unfortunately, the robot application data is not available directly at the country-industry level. We approximate robot applications at the country-industry-level by interacting the (country-level) share of a given robot application with the (country-industry-level) of robot stock. We do so, to avoid country-level regressions and enable a consistent estimation specification across regressions.
We construct our instrumental variables in the same way. This results in less variation than our baseline robot stock measure and thus our instruments are somewhat weaker. We present the OLS results below and report the IV results in Table A8 and A9 in the Appendix which find similar results but with weaker instruments.
For cutting robots we find gains overall from both mechanical and laser guided cutting machines (see Table 6). Interestingly, for developing countries we find that quality gains are obtained from the more rudimentary robots, with mechanical cutting tools. In contrast, developed countries experience quality gains only from sophisticated laser guided cutters. Even adopting relatively basic robots may increase production quality in developing countries, if for instance, they reduce production errors compared to the pre-existing production technology of labor and machines. For handling robots (see Table 7) we find that quality gains from that robot class are mainly driven by less sophisticated applications, pallet handling, as opposed to more sophisticated handling and 26 Handling, processing and welding robots represent nearly 85% of the total robots in our data.

33
inspecting robots with sensory devices. Moreover, the quality gains from less sophisticated pallet handling robots are concentrated entirely in developing countries. 27 An important take away from these results is that technology is heterogeneous, and not all applications matter equally for quality. The quality effects of technology types can even differ across countries. Our findings are somewhat suggestive of developing countries gaining more from more basic robots, whereas developed economies benefiting more from advanced robots, however additional research is needed in this area with better data. The results suggest that if policy makers wish to encourage the robot technology adoption, caution should be used in targeting particular robot types or specific robot applications. Instead, it may be better to address the constraints to technology adoption more generally and allow firms to make the appropriate adoption decision based on their individual needs.  Note: Robots reflects log robot stock. We approximate robot applications at the country-industry-level by interacting the (country-level) share of a given robot application with the (country-industry-level) of robot stock. Quality refers log quality, estimated via Khandelwal et al (2013). Country income status is defined by the World Bank (2000). Controls include (log) employment and (log) real value added per worker at the country-industry-year level. The regressions also include exporter*10-digit product and exporter*year fixed effects. IV results are presented in Table A8 and A9. Robust standard errors clustered at the exporter-industry level are reported in parentheses. *** p<0.01, ** p<0.05, * p<0.1.

iv. Robustness
The results throughout the paper repeatedly reveal a positive link between robot use and export quality. However, there are a number of factors that could potentially contaminate our results or limit their external validity. In this section we consider three such candidates, the role of China, the global financial crisis and whether our results are driven by the automobile manufacturing.
The timing of our sample corresponds with the rise of China's economic growth, their accession to the WTO and their rapid and extensive participation in global value chains. Although China is only one of 31 developing countries in our data, we examine the robustness of our baseline regressions for excluding China. Another factor which may impact our results is the global financial crisis which occurred in the middle of our sample period in 2008/2009. We restrict our sample to excluding these crisis years. Finally, while there has been in increase in the diffusion of robots across all sectors, the heaviest users are typically the automobile sector. In our data the average robot stock in the automobile sector for countries in our data is nearly three times higher than the second largest robot using sector, electrical equipment manufacturing. Automobile manufacturing is only one of 16 manufacturing sectors, and again we examine robustness of our results to its exclusion. Table A11 in the Appendix presents the baseline results now excluding China (Model 1-4), excluding the auto sector (Model 5-8) and excluding the financial crisis years (Model 9-12). Across these three robustness tests we find the same message with results mirroring the baseline both for the OLS and IV estimation -robot diffusion leads to increases in export quality overall with much of the gains occurring in developing countries. In fact, in unreported results we test robustness to excluding any individual country or sector, one-by-one, and in each case the baseline results remain unchanged.

VI. Conclusions and Policy Implications
Manufacturing processes are being increasingly automated throughout the world. In recent years, automation has accelerated across many developing economies, from initially low levels of use, which has led to convergence in robot diffusion across countries. Despite this marked trend, there is limited empirical evidence on the effects of these technologies beyond developed economies.
In developing economies much of the attention has been around the possible adverse effects of robots, such as reshoring of production back to advanced economies, unemployment due to laborsaving and the future of manufacturing-led growth models (De Backer and DeStefano, 2021). This paper considers one of the potential positive implications: quality upgrading. Automation can reduce production errors by allowing repetitive tasks to be performed to a consistent level of accuracy. Many of these robots operate with limited human interaction, and so one potential upside of any labor-saving technological change is reducing human error in production.
We examine how robot diffusion affects export quality -distinguishing upgrading effects between developed and developing economies, and between initially high-and poor-quality products. To do so we rely on cross-country and cross-industry data which cover 59 countries and 16 manufacturing sectors over a span of 16 years. Our instrumental variable, robot diffusion in (preexisting) foreign export customers, strongly predicts robot adoption in the home country-industry.
We find that robots lead to export quality upgrading, however the gains are not spread evenly. The majority of the quality upgrading is achieved by developing countries, more so than developed economies. Looking within exporters, we find that robots lead to the upgrading particularly of initially low-quality products -and this is true in both developed and developing countries. Since developing countries tend to export lower quality goods, we find stronger effects overall for developing economies. These results suggest that developing countries may have greater potential for quality catch-up through automating their production.
There are several important implications for policy. First, technology always creates winners and losers. While automation poses risks, it also presents new opportunities for developing countries.
Joining Global Value Chains and trading with advanced economies can offer developing economies the potential to specialize in what they are currently best at, benefit from knowledge spillovers and create productive employment. However, stringent quality standards can be a major barrier to developing countries participating and thus leveraging these benefits. Automation may 37 allow the better firms in developing countries to overcome some of these obstacles, raise their productivity and grow into new markets, stimulating economic development. Policies which facilitate more efficient factor markets, such as lowering labor market rigidities, will likely allow such firms to access the resources needed to grow, and may help to offset any negative effects of declining firms and sectors.
Second, trade policy has been facing persistent protectionism pressures in recent years, partly because of concerns about manufacturing job losses due to import competition. Furthermore, much of the narrative about automation has focused on potential downside of job losses. Our instrumental variable analysis confirms the well-established findings from the FDI literature -that openness can help technologies diffuse through supply chains and across borders. Therefore, our findings warn that increased protectionism may stymie the potential for international technology diffusion and constrain the ability of firms in developing countries to upgrade production processes, move into higher-value added activities and produce the high-quality products increasingly demanded by consumers globally. Thus, it cautions against countries thinking of trade policies in isolation, given that technology and trade outcomes appear to be intertwined.
Finally, there is no one-size fits all recipe for policy. Firms and countries adopt somewhat different production technologies depending upon their factor endowments and incentives to do so. We see that automation can lead to considerable improvements in export quality, partly explaining the aggregate trends in quality convergence between developing and developed countries. From a policy perspective, encouraging the diffusion of these technologies seems important for further gains. However, given the heterogeneous types of robots used across different applications and economies, encouraging only the most advanced technologies is unlikely to be appropriate, especially for developing economies.       , 2000-2005, 2006-2010 and 2011-2015, taking the value 1 for the respective periods and zero otherwise. OLS estimation is presented, since our instruments are weak when estimating the effects of robots across the three separate time periods and country income groups. Quality refers log quality, estimated via Khandelwal et al (2013). Country income status is defined by the World Bank (2000). Controls include (log) employment and (log) real value added per worker at the country-industryyear level. The regressions also include exporter*10-digit product and exporter*year fixed effects. First-stage is omitted for brevity. Robust standard errors clustered at the exporter-industry level are reported in parentheses. *** p<0.01, ** p<0.05, * p<0.1. All regressions exclude products with fewer than 10 exporting countries. Quality gap reflects the initial distance from the "quality frontier. The quality frontier is defined within a given product, in models 1-4 as the top 10% highest exporters quality (as in the baseline). In models 5-8 the frontier is defined as the top 20% highest exporter quality, and in models 9-12 as the top 5 exporting countries' quality. The quality gap is defined as the difference between export quality and the frontier export quality in the first year. Robots reflects log robot stock. The instrument reflects robot diffusion in (initial) foreign export partners, in other world regions, defined using 2000 export flows. Quality refers log quality, estimated via Khandelwal et al (2013). Country income status is defined by the World Bank (2000). Controls include (log) employment and (log) real value added per worker at the country-industry-year level. The regressions also include exporter*10-digit product and exporter*year fixed effects. The first stage has been omitted for brevity. Robust standard errors clustered at the exporter-industry level are reported in parentheses. *** p<0.01, ** p<0.05, * p<0.1.  Note: Robots reflects log robot stock. We approximate robot applications at the country-industry-level by interacting the (country-level) share of a given robot application with the (country-industry-level) of robot stock. The instrument reflects robot diffusion in (initial) foreign export partners, in other world regions, defined using 2000 export flows. Quality refers log quality, estimated via Khandelwal et al (2013). Country income status is defined by the World Bank (2000). Controls include (log) employment and (log) real value added per worker at the country-industry-year level. The regressions also include exporter*10-digit product and exporter*year fixed effects. OLS results are presented in Table 7 and 8. Robust standard errors clustered at the exporter-industry level are reported in parentheses. *** p<0.01, ** p<0.05, * p<0.1. Note: Robots reflects log robot stock. We approximate robot applications at the country-industry-level by interacting the (country-level) share of a given robot application with the (country-industry-level) of robot stock. The instrument reflects robot diffusion in (initial) foreign export partners, in other world regions, defined using 2000 export flows. Quality refers log quality, estimated via Khandelwal et al (2013). Country income status is defined by the World Bank (2000). Controls include (log) employment and (log) real value added per worker at the country-industry-year level. The regressions also include exporter*10-digit product and exporter*year fixed effects. Robust standard errors clustered at the exporter-industry level are reported in parentheses. *** p<0.01, ** p<0.05, * p<0.1.