key: cord-0885861-hdx7uc3o authors: Cirera, Xavier; Lederman, Daniel; Máñez Castillejo, Juan A.; Rochina Barrachina, María E.; Sanchis-Llopis, Juan A. title: Firm productivity gains in a period of slow trade liberalization: evidence from Brazil date: 2020-11-05 journal: Econ Polit DOI: 10.1007/s40888-020-00204-6 sha: 6c6a745d4da6e02e9462e317e763fd92d17df28a doc_id: 885861 cord_uid: hdx7uc3o Existing literature recognizes the possible role of trade policy and firms’ exposure to international trade as determinants of productivity. A strand of the literature sheds light on the effects of trade policy changes on firm-level productivity. Another strand studies the relationship between firms’ trade status (exporting production or importing intermediates, but usually not both simultaneously) and firm-level TFP dynamics. However, the analyses that integrate both strands are scarce. This paper aims to disentangle the impact of input and output tariffs on firms’ productivity. Further, it analyses whether the impact of changes in tariffs is conditioned by the trade status of the firm (exporting and/or importing). At difference to most previous papers, we carry out our analysis for a large developing country in a period of slow trade liberalization. Thus, in the empirical part, we use data from firms belonging to Brazilian industrial sectors (manufacturing and mining) during 2000–2008. After estimating total factor productivity (TFP) at the firm level using updated methodologies, we estimate both the impact of trade policy and firms’ trade status on TFP dynamics. Our results suggest that trade liberalization (through reductions in input or output tariffs) increases TFP, being the effect associated to a reduction in input tariffs greater. Furthermore, the impact of trade policy on TFP spreads among all firms, which could be consistent with the existence of spillovers from trading firms to non-trading firms or with the notion that trade liberalization exerts competitive pressure on all firms, regardless of their initial exposure to international trade. Finally, we also find evidence of a positive effect of both the import and export statuses on TFP. A substantial part of the literature emphasizes the roles that trade policy and firms' exposure to international trade (whether the firm imports or exports) play as determinants of total factor productivity (TFP). However, most of the empirical studies analyse these elements separately or partially. This paper strengthens the understanding of the impact of international trade on firm-level TFP by studying how trade policy changes along with firms' trade status affect TFP dynamics. In particular, we aim to disentangle the effect on firms' productivity of changes in import tariffs of final goods (output tariffs) from the effect of changes in tariffs on imported intermediate goods (input tariffs) . In this analysis we explicitly consider the influence of trade status (whether the firm exports, imports intermediate inputs or both) on firm productivity and whether firms' trade status conditions the impact of trade policy on firms' productivity. More specifically, our research sheds light on the effect of trade policy on the micro dynamics of productivity in a large developing economy, namely Brazil, 1 where the industrial productivity has been low and stagnating in the 2000s (OECD 2015) . Brazil constitutes an interesting case to study since although tariffs have dropped, its average tariff for manufacturing imports is more than twice the level of Colombia, or other BRICS countries, and more than six times higher than that in the United States. This makes Brazil's industry more shielded from international competition. In addition, trade barriers on imports of intermediate inputs limit Brazil's benefits from global value chains, since almost 90 percent of the value added of Brazil's exports is domestically produced (OECD 2015) . Further, in contrast to other papers, we analyse a period of slow trade liberalization since between [2000] [2001] [2002] [2003] [2004] [2005] [2006] [2007] Brazilian import tariffs declined less in comparison to the previous decade. In what follows, we review the most recent literature on the relationship between trade status, trading policy and productivity. Then, we present more in detail our empirical strategy and the main contributions of this paper to the analysis of how trade activities together with trade policy changes have an impact on firms' TFP. Regarding the relationship between firms' exposure to international trade and productivity, several contributions in the literature study the role of participating in international trade through exports or imports, but not both simultaneously. For example, Van Biesebroeck (2005 ), De Loecker (2007 , 2013 and De Loecker and Warzyniski (2012) only consider the role of the exporting status in the evolution of TFP; and, Kasahara and Rodrigue (2008) and Halpern et al. (2015) only analyse the role of importing inputs. The literature that considers the impact of both exporting and importing on TFP is scarce (see, for example, Tomiura 2007; Bernard et al. 2009; Haller 2012; Kasahara and Lapham 2013; and, Caselli 2018) . Empirical evidence indicates that exports and imports are correlated (Máñez et al. 2020) . Thus, considering only one of the two activities, but not the other, could be problematic. We consider firms' export and import activities to be correlated both directly and indirectly. Direct cross-effects of importing on the probability of exporting may occur through various channels. First, if importing intermediates results in lower input costs, and this cost reduction is at least partially transmitted to prices, this could enhance firms' international competitiveness. Second, importing could allow firms to access a broader range of inputs, technology embedded in intermediate inputs, or higher quality inputs, which could contribute to upgrading the quality of the firms' existing product portfolio and/or facilitate the introduction of new products (Caselli 2018) . All this can open up new opportunities for firms in export markets (Goldberg et al. 2010; Fernandes and Paunov 2013; Bas and Strauss-Kahn 2015; Fieler et al. 2018; and, Feng et al. 2016) . Third, the experience in international markets obtained by importing intermediates can reduce the sunk costs that importing firms need to face to start exporting. Direct effects of exporting on the probability of importing may also accrue through various channels. First, knowledge about international markets gained by exporting may reduce the sunk costs that exporting firms may face to start importing. Second, greater competition in international markets can encourage exporting firms to import intermediate inputs if they are cheaper abroad. Finally, if preference for quality is more intense in international markets than in the domestic market and importing intermediates allows exporting firms to upgrade the quality of their products, exporting firms will be more likely to import intermediate inputs. As for indirect effects of importing on the probability of exporting and vice versa, they are related, on the one hand, to the productivity enhancing effects that international trade literature attributes to both activities; and, on the other hand, to a process of selection of the most productive firms both into exporting and importing. Regarding the effects of trade policy on firms' TFP, Ferreira and Rossi (2003) , Schor (2004) , Fernandes (2007) , and Lisboa et al. (2010) analyse the impact of trade policy on productivity. Yet, there are few studies that explore both trade policy and firms' trade status as coexistent determinants of productivity (Muendler, 2004, and Amiti and Konings, 2007, are exceptions) . 2 This paper aims at contributing to this last group of studies. At this point, we consider it is worth describing some aspects of the empirical strategy we follow to study how international trade activities together with trade policy changes have an impact on firms' TFP. First, we estimate empirical models that disentangle the effects on firm-level productivity of changes in import tariffs on firms' final goods (output tariffs) from the effects of changes in tariffs on imported intermediate goods (input tariffs). We expect these two effects to work through distinct channels. Trade liberalization through reductions in output tariffs may increase import competition in domestic markets and exert pressure on firms to improve efficiency. In contrast, reductions in input tariffs ease firms' access to a wider range of potentially higher quality inputs with incorporated foreign technology, that can contribute to improve firms' TFP. To the extent that tariff reforms reduce both output and input tariffs for a given firm, estimates of the effect of one without the other might yield misleading results about the channel through which such policy reforms determine microeconomic productivity. Second, in the relationship between firms' trade status and TFP we explicitly distinguish whether the firm is an exporter and/or the firm imports intermediate inputs. Thus, we estimate models considering these two trade activities. Although this is not the main aim of this paper, we will also examine the direct effects of import and export statuses on TFP. 3 That is, exporters may exhibit efficiency gains from economies of scale, knowledge flows from foreign customers, and from increased competition in export markets forcing them to become more efficient. Likewise, importers of intermediate goods may benefit from the diffusion and adoption of new technologies, and knowledge embodied in imported inputs. Third, we investigate the interaction between trade policy and firms' trade status, which can have additional effects on TFP. For example, a reduction in output tariffs may add greater competition in the domestic market to the existing competition for firms in export markets. Therefore, this greater competitive pressure may encourage improvements in the productivity of domestic firms to avoid losing market share. Also, input tariffs effects on productivity could be larger for firms that relied on imported inputs prior to a change in tariffs. Hence, there are reasons to expect that trade policy effects on TFP can be different depending on firms' trade exposure. Fourth, our methodological approach extends Olley and Pakes (1996) and Levinsohn and Petrin (2003) control-function approaches to estimate firm-level TFP in two ways. On the one hand, we allow for different demands of intermediate materials for firms with different trade status (non-traders, only exporters, only importers and two-way traders). On the other hand, we specify an endogenous Markov process for the law of motion of productivity in which past trading experience may affect current productivity (following De Loecker 2007 , 2013 and Rodrigue 2008, and Lapham 2013, for imports) . With these TFP estimates at hand we analyse the effects of trade policy and firms' trade status on productivity. Similarly to Amiti and Konings (2007) , we regress our TFP estimates against trade policy measures (input and output tariffs), trade status variables and their interactions. 4 Finally, it is necessary to recall that our study sheds light on the micro dynamics of productivity of Brazil (a large developing economy). While most of the existing evidence comes from high-income economies, there are fewer related papers on developing economies or emerging markets, including Indonesia (Amiti and Konings 2007) , Colombia (Fernandes 2007) , Chile Rodrigue 2008, and Lapham 2013) , India (Topalova and Khandelwal 2011) and Mexico (Luong 2011) . Ferreira and Rossi (2003) , Schor (2004) , Muendler (2004) and Lisboa et al. (2010) use data from a period of strong trade liberalization in Brazil. Ferreira and Rossi (2003) , show that after declining over the 1980s, total factor productivity increased at an average annual rate of 2. 65% from 1991 to 1997 . Using data from 1986 -1998 , Schor (2004 finds positive effects of import-tariff reductions (either output or input tariffs) on TFP and Muendler (2004) obtains a negligible impact of the use of foreign inputs on TFP but a positive effect of foreign competition (as measured by larger import penetration and lower output tariffs). Finally, Lisboa et al. (2010) , who analyse the impact of input and output tariffs on productivity, find that the reduction in input tariffs was the main factor behind productivity growth for Brazilian firms in the period they analyse (1988) (1989) (1990) (1991) (1992) (1993) (1994) (1995) (1996) (1997) (1998) . 5 The present paper differs from the aforementioned papers using Brazilian data in two noteworthy aspects. First, as mentioned, we explore the interaction between trade policy and firms' trade status as determinants of firm-level TFP. Second, we use data for Brazilian firms in manufacturing and mining sectors during 2000-2008, when the process of trade liberalization in Brazil slowed down in comparison to the years mentioned in the previous studies. As discussed further below, Brazilian import tariffs declined slowly since 2000 up to 2007 (compared to the previous decade). All in all, we aim at enhancing the evidence on the relationship between import tariffs, firms' trading status and the dynamics of firm-level productivity in Brazil during a period of relatively low trade liberalization, which will lead us to conclude that even modest changes in tariffs can have an effect on firms' TFP. The evidence in this paper suggests that reductions in both output and input tariffs are associated with improvements in firms' productivity. Lower output tariffs may increase productivity by increasing import competition, as firms might be forced to improve their efficiency. Lower input tariffs may increase productivity by increasing, for instance, access to a wider range of foreign inputs, to higher quality inputs, or to foreign technology incorporated in imported inputs (Bustos 2011) . From our preferred specification, we obtain that a reduction of output tariffs by 10 percentage points is associated with a 0.16 percent increase in firm-level TFP. However, in the previous decade of stronger liberalization in Brazil, analysed by Ferreira and Rossi (2003) , Muendler (2004) and Schor (2004) , the estimated increases associated to output tariffs were 0.56, 6.13 and 0.95 percent, respectively. Regarding input tariffs, we find that a 10 percentage-points fall is associated with a 0.58 percent increase in TFP. Schor (2004) found that this 10 percentage-points fall in input tariffs was associated with a 1.53 percent increase in TFP. Further, Lisboa et al. (2010) also studied the period of intense liberalization. They found that the reduction in input tariffs was the main factor responsible for the productivity growth of Brazilian firms, given that when they included both input and output tariffs, the impact of output tariffs became statistically insignificant. Additionally, past import status has a positive impact on current productivity ranging from 12.0 to 14.7 percent, and the effect of past export status ranges from 10.3 to 15.4 percent. These numbers are in line with Kasahara and Rodrigue (2008) , who find that the increase in firms' productivity from importing inputs ranges from 12.9 to 22.0 percent for Chilean firms, and with Halpern et al. (2015) for Hungary, who find that importing inputs increases firms' productivity by 22.0 percent. The results reported above confirm that there have been within-firm productivity improvements in Brazil arising from the trade liberalization in the 2000s, although these are modest as compared to what has been reported in the literature for the previous decade when tariffs fell substantially. In addition, it is worth mentioning that the effects on TFP operate mainly through the intermediate input channel, since the effect of the reduction in input tariffs is substantially larger than that associated with a reduction in output tariffs (this result is in line with Lisboa et al. 2010 ). Furthermore, we obtain that the effect on TFP of input tariffs reductions spreads among all firms, which could be consistent with the existence of spillovers from input importers to non-importers of inputs. Domestic producers of inputs, when facing competition from foreign producers, are very likely forced to increase the quality/variety of their products with a potential benefit in the productivity of their domestic clients. However, since we cannot really test this hypothesis, this explanation may coexist with an alternative. In particular, it could also happen that some firms are purchasing products from abroad indirectly through wholesalers. 6 Finally, our analysis further suggests that it is important to control for the effects of changes in the real effective exchange rate on importers and exporters incentives for efficiency, as reductions in tariffs can concur with real appreciations of the domestic currency (as occurred in Brazil during the analysed period). The rest of the paper is organized as follows. Section 2 explains key features of the estimation strategy and the production function estimation method. Section 3 describes the data. Section 4 discusses results and some robustness checks. Section 5 concludes. In this section, before describing the methodology to estimate firms' TFP, we first discuss some key issues related to the inclusion of trade status and trade policy variables in the TFP estimation and subsequent productivity regressions. Then, we describe the set of regressions that use TFP estimates to analyse the effects of trade policy and firms' trade status on productivity. Let us consider first the inclusion of such variables in estimating TFP. In the same vein than Amiti and Konings (2007) , we do not include import and export decisions (i.e. trade status) as additional inputs in the production function since this would imply, among other things, that a firm can substitute any traditional input either with being an exporter or an importer at a constant unit elasticity. We do not include trade policy variables either as additional regressors in the production function. This is so as the estimation of TFP is undertaken for all firms in a given industry and the production function estimation includes year dummies, what makes that industry-year tariffs are not identified. Moreover, and also similarly to Amiti and Konings (2007) , we make the demand of materials function (used to invert productivity) to depend not only on capital and unobserved productivity (as in Levinsohn and Petrin 2003) but also on trading status. 7 De Loecker (2007) acknowledges that exporting firms face different operating conditions to non-exporters. This could be related to the fact that to be competitive in international markets, exporting firms need to use higher quality inputs that allow them to produce higher quality outputs, or to the need of using different inputs that ensure complying the safety regulations of destination countries. As for importers, importing intermediates allows firms to access a wider variety of possibly higher quality inputs. Therefore, the demand of intermediate materials of importers will differ from that of non-importers. Hence, the demand for materials function we invert to proxy for unobserved productivity is m it = m TS k it , it , where m it , k it and it denote materials input, capital and TFP, respectively, and the subscript TS indicates that the function m is dependent on firms' trading status (for TS = onlyexporters, E; only-importers, I; two-way traders, EI; and, non-traders, NT). In line with De Loecker (2007, 2013) we allow for different demands of materials for exporters, importers, two-way traders and non-traders. This procedure will filter out differences in information and market structure (mode of competition and demand conditions) between domestic and exporting firms and/or between input importers and non-input importers within a given industry, which may potentially affect optimal input demand choices. 8 Further, as pointed out by Amiti and Konings (2007) , 7 Amiti and Konings (2007) use the Olley and Pakes (1996) approach and use the capital investment function instead. 8 Kasahara and Rodrigue (2008) make the demand of intermediate materials to depend on firms' import status, m it = m k it , it , I it , where I it is a dummy taking value one for importers of intermediate inputs. Inverting the demand of materials to get productivity as a function of observables, they get it = m −1 k it , m it , I it and they proxy the unknown function m −1 (⋅) , with a third-degree polyno-the modification we introduce in Levinsohn and Petrin (2003) methodology allows controlling for potential simultaneity between productivity shocks and firms' trading status. However, we depart from Amiti and Konings (2007) and instead of using an exogenous Markov process for the law of motion of productivity, we use an endogenous one that allows firms' past trading experience to affect productivity (in this, we follow De Loecker 2007, 2013, for export status; and, Kasahara and Rodrigue 2008, for import status). Assuming an exogenous Markov process for the law of motion of productivity would only be suitable when productivity shocks are exogenous to the firm but not if future productivity is endogenously determined by firm's choices, such as firm's export and import decisions. Therefore, testing the effects of past trade status on productivity using an exogenous Markov process, would have an associated internal inconsistency problem (De Loecker 2007). It seems incompatible that, on the one hand, firms' internationalization decisions cannot affect their productivity (exogenous Markov) and, on the other hand, the interest in studying the effect of these decisions on their productivity. Additionally, we also depart from Amiti and Konings (2007) to estimate TFP. Whereas they use the demand for investment as proxy for productivity and a twostep methodology proposed by Olley and Pakes (1996) , we use the demand of materials function and implement Wooldridge (2009) one-step estimation procedure. Wooldridge (2009) argues that both Olley and Pakes (1996) and Levinsohn and Petrin (2003) two-step estimation procedures can be reconsidered as consisting of two equations that can be jointly estimated by GMM in one-step. This joint estimation strategy has the advantage of increasing efficiency with respect to two-step procedures, makes unnecessary bootstrapping for the calculus of standard errors, and solves the labour coefficient identification problem posed by Ackerberg et al. (2015) . Finally, after estimating the production functions at the industry level using firmlevel data, we regress firms' TFP on trade policy variables (output and input tariffs at the industry-year level), firms' trade status, a set of interactions, and firm, industry, and year fixed effects. Let us recall that our main aim is to analyse the impact of input and output tariffs on firms' productivity and to examine whether these effects depend on firms' trading status. With these interactions, we aim to check not only whether importers are more affected by input tariffs than other firms (as in Amiti and Konings 2007) but also whether exporting firms are affected differently by output tariffs. In this final stage of estimation in our paper, identification of the effects Footnote 8 (continued) mial in its arguments. Since I it is fully interacted with m, k and higher order terms of m and k, this is equivalent to the assumption of different demands of materials for importers and non-importers. In the same vein, Amiti and Konings (2007) make the investment demand function Iv it (they use Olley and Pakes approach) to depend on four state variables: capital, productivity, import status (FM) and export status (FX), Iv it = i k it , it , FM it , FX it . When inverting the investment equation to express productivity as a function of observables, they get the following inverse demand of investment function, it = h k it , Iv it , FM it , FX it . They proxy the unknown function h(⋅) with a fourth-degree polynomial in its arguments. Since FM and FX are fully interacted with Iv and k and higher order terms of Iv and k, Amiti and Konings (2007) approach is equivalent to the assumption of different demands of investment for firms that neither export nor import, importers and exporters. of tariffs on productivity stems from their joint variation across industries and time, since we pool firms' TFPs from all industries. We assume that firms produce using a Cobb-Douglas technology 9 : where y it is the log of production of firm i at time t, l it is the log of labour, k it is the log of capital, m it is the log of intermediate materials, and μ t are time effects. As for the unobservables in estimation, it is productivity and η it is a standard i.i.d. error term. As timing assumptions for estimation, it is assumed that capital in period t was actually decided in period t-1, and that labour and materials are chosen in period t. Under all these assumptions we follow Wooldridge (2009) estimation method to jointly estimate by GMM the following two equations, tackling the problem of endogeneity of labour and materials (correlated with current productivity) and dealing with the law of motion for productivity (required for identification purposes), respectively. 10 In addition, assuming different demands for materials according to firm's trading status ( m it = m TS k it , it for TS = E, I, EI, NT), the first estimation equation is: where a TS is an indicator function that takes value one if a firm follows the trading strategy TS (only-exporters, only-importers, two-way traders and non-traders) in year t and zero otherwise. Therefore, we end up with four different unknown functions, H E , H I , H EI and H NT , that will be proxied by second degree polynomials in their respective arguments. Further, if we assume an endogenous Markov process for the law of motion for productivity, in which productivity in period t depends both on productivity in t-1 and on firm's trade status in period t -1 (i.e. it = f it−1 , E it−1 , I it−1 , EI it−1 + it ), 11 the second estimation equation is, where u it = it + it is a composed error term. 12 Therefore, we end up again with four different unknown functions, F E , F I , F EI and F NT , that will be proxied by second degree polynomials in their respective arguments. (1) In this section, we just sketch the procedure used to estimate TFP. For a detailed explanation of the procedure, see Appendix A. 10 The appropriate instruments and moment conditions are employed for each equation. 11 For a similar approach, using the strategies of intramural and external R&D, see Añón Higón et al. . 12 Note that it is an innovation term uncorrelated with k it . Finally, once we estimate the production function (1), using the methodology explained above, separately for firms in each of the 22 industries considered, 13 we can obtain an estimation of the log of TFP for firm i in time t for each industry s, denoted tfp s it , as: In order to analyse firm's productivity and trade exposure we use a dataset that links firms' characteristics, production and export/import data for Brazilian firms over the period 2000 to 2008. For production and firm's characteristics, we use the survey PIA empresa (Pesquisa Industrial Anual). PIA is a firm level survey for manufacturing and mining sectors conducted annually by the Brazilian Statistical Office, IBGE (Instituto Brasileiro de Geografia e Estatistica). The sampling procedure differs between companies with 30 or more employees and firms with less than 30 employees, and is described as follows. The companies surveyed in the form of a census (probability of selection equal to one) comprise the universe of companies with 30 or more employees according to the Research Basic Selection Registry of the survey. Given the concentration of the Brazilian industry, the census survey of industrial companies with 30 or more employees guarantees the coverage of approximately 95% of the economic activity of industrial companies. The random stratum includes companies with 5 to 29 employees according to the Research Basic Selection Registry of the survey, randomly selected without replacement. 14 In total PIA covers more than 40,000 firms. 15 Furthermore, we use two external sources of data. To identify exporters and importers, we use a dataset created by the Brazilian Foreign Trade Office, SECEX (Secretaria Comercio Exterior). This dataset provides the universe of exporters and importers. Using information from SECEX, we define as exporters in year t firms that declare to export in that year and as importers in year t firms that declare to import intermediate inputs in that year. Analogously, two-way traders in year t are firms that declare both to export and import in year t. Finally, non-traders in year t are firms that neither export nor import intermediates in year t. And, for the tariffs Table 1 for the list of manufacturing and mining sectors. 14 The PIA-Empresa sample control system includes the identification and treatment of specific situations, such as total lack of response, activity changes, changes in location, structural changes (mergers, incorporations, etc.), etc. Our sample comprises an unbalanced panel in which we only account for firms currently in operation and not involved in any of these situations. 15 However, our working sample will be 31,000 firms, which comprises all firms with complete information on the variables we use in our analysis. information we use the TRAINS database (TRAINS is a database maintained by the UNCTAD). As regards trade strategies, the majority of Brazilian manufacturing and mining firms do not export nor import (67 percent on average). Furthermore, we find that on average 15 percent of firms only export, 4 percent only import and 13 percent are two-way traders (simultaneously export and import). Figure 1 represents the evolution over time of the distribution of firms by trading status. Further, in Table 1 we provide the frequency tabulations of firms changing trade status over time. We observe that the non-trading status is very persistent, as 94.05% of firms not involved in any trade activity do not change their status in the following period. As regards firms that only import, 62.08% of them remain in that status, but 15.03% of them also engage in exporting. In relation to only exporters, we observe that 75.35% of them maintain that status, but 9.84% add the importing activity. Finally, two-way traders is also a quite persistent status as 85.23% of these firms keep on being two-way traders in the following period. Table 5 in Appendix B shows the main variables in the analysis. We proxy capital with assets, and also include electricity and energy as intermediate inputs. We use sector specific producer price indices supplied by the IBGE to deflate the variables in the production function, with the exception of labour (that is measured by the number of employees). Regarding tariffs on outputs, each firm is associated to a 4 digits CNAE industry based on its main sector of production. We first convert HS-8 trade codes with tariffs to the equivalent Prodlist code (product extension of CNAE classification) using the IBGE conversion table. Then, we average the tariff for Prodlist products for each 4 digits CNAE sector. In order to calculate tariffs for inputs we first calculate the average tariff for each of the Brazilian input-output sectors and, then, for each sector we use the input-output coefficients to weight the sector tariff for those sectors that provide inputs. These input tariffs are then mapped from input-output sectors to CNAE 4 digits sectors using the correspondence tables supplied by the IBGE national accounts. Brazil underwent an intense period of trade liberalization during the 1980s and 1990s, but this process slowed down during the 2000s. Average tariffs rates decreased at a slower rate until 2007. Nevertheless, it is important to note that although in absolute terms the reduction in average tariffs was relatively small (since the values of tariffs in the period we study was much lower than in the 1980s and 1990s), the reduction of tariffs in percentage was not negligible. Thus, tariffs on final goods fell a 23.7% (from 16.4% in 2000 to 12.5% in 2007) and tariffs on intermediate inputs fell an 8.8% (from 8.21% in 2000 to 7.49% in 2007) . Although for the TFP of Brazilian firms we analyse the period 2000-2008, we will not use in our analysis data on tariffs in 2008 given that the variables capturing output and input tariffs enter with one lag in the estimated regressions analysing the effects of tariffs on productivity. Therefore, we still analyse a period of decrease in tariffs (2000) (2001) (2002) (2003) (2004) (2005) (2006) (2007) . In particular, the time evolution of input and output tariffs is plotted in Panels A and B of Fig. 2 . In these graphs, the dashed lines represent the input (output) tariff for each sector across time, and the solid line represents the average input (output) tariff evolution. It is also noteworthy to underline that average output tariffs are higher than average input tariffs all along the period. Further, this is true for every industry of the sample (see Table 6 in Appendix B). Finally, there exists more variation in average input and output tariffs between industries than within industries over time. In particular, the coefficient of variation across industries is about 27% for input tariffs and 28% for output tariffs. However, the coefficient of variation over time within industries is 19% for input tariffs and 15% for output tariffs. Table 2 reports the main features of our data set in terms of production function variables according to firms' trading status. As can be observed, two-way traders (firms that both export and import) are larger in terms of output, labour, capital and materials as compared to firms that only export or only import and to non-traders. Firms that only export or only import are, in general, more similar in all variables. If we compare these firms with non-traders, we find that are larger in terms of output, labour, capital and materials. In the estimations presented in this section, we use the log TFP estimates (see Eq. 4 above) as the dependent variable of a series of equations that include as regressors either trade policy variables, or both trade policy and firms' trade status variables, to allow for the effects of input and output tariffs on firms' productivity to depend on whether firms import inputs and/or export production. Recall that TFP is estimated at firm level and we estimate different production functions for each of the industries in the sample. Therefore, the TFP measure we use, that is derived as a residual from Notes: robust standard errors clustered at the industry-year level in parentheses; ***, ** and * mean significance at 1, 5 and 10% level, respectively markets (either importing inputs or exporting output). This self-selection process is based on the existence of higher sunk entry costs in international markets that can only be overcame by the most productive firms (see, for instance, Jensen 1999, and Melitz 2003) . These estimation results are reported in Table 3 . 16 Controlling for time fixed effects is also crucial in this setup, as we are interested in disentangling the effects of trade policy from other possible changes in macroeconomic policy or macroeconomic instability, or even from any other uncontrolled events that occurred in Brazil during our sample period that go along with changes in tariffs. Not considering them may lead to spurious correlation between tariffs and productivity. Therefore, it is important to note that we also include a vector of time dummies. Furthermore, the fact that in regressions, tariffs only show industry and year variation prevents us from including industry-year fixed effects. Nevertheless, we cluster standard errors at the industry-year level. Some works point out that country policy related to tariffs might be endogenous with respect to productivity (due to possible policy pressure or lobbying from particular industries). In our case, controlling for industry fixed effects, among other things, allows to account for trade policy time-invariant characteristics. We control this way for time-invariant economic policy factors that could explain both industry protection and productivity. There is also some evidence during the analysed period (2000) (2001) (2002) (2003) (2004) (2005) (2006) (2007) that the protection structure did not change much. We find evidence in this direction when looking at the Spearman rank correlations of tariffs among the 22 industries between 2000 and 2007, which are equal to 68% and 78% for input and output tariffs, respectively. Additionally, the year-by-year correlation from 2000 onwards is on average 63% for input tariffs and 95% for output tariffs. Therefore, the slower process of trade liberalization during this period (relative to the previous decade) does not seem to have changed significantly the initial Brazilian structure of protection across industries (according to the WTO reports for Brazil, 2004 and 2009, tariff dispersion is relatively low during the analysed period). Consequently, our fixed effects estimation approach seems suitable for possible time invariant characteristics linked to the economic policy of trade liberalization (see Schor 2004 and Pavcnik 2005 for similar approaches). 17 However, even with the previous evidence, one might still have the concern of what would have happened if after a period of significant tariff reductions in the 1980s and 1990s, the classification of industries was already such that highly productive industries, which greatly benefited from international trade, had very low 16 Estimating the specification by OLS suggests that the coefficients for the export and import status variables suffer from an upward bias due to the existence of self-selection of the more productive firms into exporting and importing. This problem affecting trade status variables is mitigated with fixed effects estimation. For the sake of brevity, these results are not presented in the paper. 17 In the same vein, Lisboa et al. (2010) using Brazilian data for the period 1988-1998, show that input and output tariff patterns across sectors are quite stable over time. From this fact, they infer that the economic trade policy did not change substantially over time. Therefore, they conclude that including firmfixed effects in their productivity equation should be enough to control for time invariant characteristics linked to the economic policy of trade liberalization. tariffs at the beginning of the 2000s. In this case, any lobbying activity on further tariff reduction would not change the tariff classification, but the tariff policy would be strictly correlated with TFP. 18 To minimize this concern, Panels A and B of Fig. 3 display, for the year 2000, a scatterplot of TFP (actually log of TFP) against output and input tariffs, respectively. These figures do not show a cross-sectional negative association between tariffs and productivity. Thus, for example in Panel A, industries with similar productivity such as industries 10, 22, 33, 35, or 25 enjoy quite different output tariffs. Analogously, Panel B does not show any clear pattern in the relationship between input tariffs and productivity. Again, industries with quite similar productivity such as industries 10, 35, 22, 33 or 25 show quite different input tariffs. Therefore, it does not seem that the starting point in our analysis, the year 2000, is one in which highly productive industries enjoyed low tariffs. Furthermore, to check whether along the period of analysis industries that increased their productivity, and so increased their competitiveness, were able to get tariffs reductions, we run a regression with industry level data of the first differences of output tariffs and input tariffs against the first differences of industry-average TFP lagged one period. Neither for output nor for input tariffs the coefficient of one period lagged first differenced TFP is significant (estimated coefficients and standard errors -in bracketsin the input and output regressions are −0.549 (0.706) and −0.026 (0.502), respectively). Therefore, we believe that it is reasonable to assume that changes in tariffs are exogenous to industries overall performance. It could be argued that beyond permanent industry factors (controlled by industry dummies in estimation) and beyond purely time factors (controlled by year dummies), there is still room for industry-year variation in trade policy related to changes in industry lobbying over time. A possible way to test for that possibility is to assume that the evolution of industries' lobbying power over time can be proxied by the industry-year average firms' size (as measured by the log of average firms' employment or the log of average firms' sales for each industry each year). If time-varying asymmetries in industries' lobbying abilities determine the evolution of input and output tariffs, in a regression of output (input tariffs) on industry-year average firms' size (controlling for industry and year fixed effects), the estimates corresponding to the average firms' size variable should be positive and significant. However, in our case the estimates of average firms' size are never significant. In the output tariffs regression, point estimates and standard errors (in brackets) for log of average employment and log of average sales are -0.225 (0.397) and 0.112 (0.379), respectively. The corresponding ones in the input tariffs regression are -0.263 (1.833) and 0.137 (0.227), respectively. Therefore, if one is willing to accept as reasonable that every year industries' lobbying power may be proxied by industries' average firm size, it does not seem that neither output nor input tariffs evolution during the analysed period are driven by asymmetric policy pressures from particular industries. 19 In the same line, Ferreira and Rossi (2003) , for the period 1987-1997, argue that productivity shocks are not correlated with tariffs and so tariffs should not be considered as endogenous when analysing the determinants of productivity. They show that in their period of analysis tariffs were reduced proportionally across industries keeping the same pattern of protection. They take this as an indication that lobbying was not relevant in the determination of Brazilian tariffs. Further, Lisboa et al. (2010) , also infer that tariffs were not endogenously determined in Brazil for the period 1988-1998. Since there can still remain some industry-year omitted variable coexistent with trade policy and affecting productivity, in the robustness section below (Sect. 4.2) we estimate a specification controlling for exchange rates. During the analysed period, the Brazilian real suffered a strong appreciation. Finally, the MERCOSUR's Common External Tariff (CET) framework also restricts unilateral changes in tariffs for Brazil trade policy. The MERCOSUR Trade Commission is responsible for the application of common trade policy resolutions, which are mandatory for member countries (Brazil, Argentina, Paraguay, and Uruguay). After this discussion on the trade policy of tariffs determination, we proceed to our analysis of the effects of trade policy and firms' trade status by using the simplest possible specification, where the only regressor that we include to explain productivity is the one-period lagged output tariff ( T O t−1 ). In all estimations, we lag tariffs one period since we expect that changes in tariffs will affect TFP with some delay. This specification has been widely used in the literature on trade liberalization and productivity (Specification 1): where α is a constant term and α i is a firm fixed effect. In this specification, we expect 1 to be negative. Trade liberalization policies, implying a reduction of output tariffs, may increase competitive pressure from competing imported products and so force firms to use inputs more efficiently and, consequently, this should increase productivity. As the dependent variable is the log of TFP, the effect of a unit increase in output tariffs on TFP is computed from the estimated coefficient 1 as 100 exp 1 − 1 . This measure shows the percentage change of TFP when output tariffs increase by one unit. The estimate of 1 (see Table 3 ) shows, as expected, that a decrease in output tariffs increases productivity. More specifically, as tariffs are in percentages in estimation, a fall in output tariffs of 10 percentage points increases TFP by 0.54 percent. 20 Next, we consider simultaneously both output ( T O t−1 ) and input ( T I t−1 ) tariffs (Specification 2): With this specification, we can assess if lagged input tariffs have an effect on the estimates corresponding to lagged output tariffs. Thus, whilst in the estimation without input tariffs a 10 percentage points fall in output tariffs increases TFP by 0.54 percent, in the estimation including input tariffs this increase in TFP is only 0.46 percent. This result suggests that including input tariffs in estimation solves a potential omitted variable bias in the estimation of the coefficient corresponding to output tariffs in Specification 1. Further, the estimated coefficient for input tariffs ( 2 ) is higher than that of output tariffs ( 1 ): whereas a 10 percentage points fall in input tariffs increases TFP by 0.59 percent, the same reduction in output tariffs increases TFP by 0.46 percent. 21 In Specification 3, we augment Specification 2 to consider: (i) the direct effect of exporting on productivity and whether the effect of output tariffs on productivity is different for exporters and non-exporters; and, (ii) the direct effect of importing inputs on productivity and whether the effect of input tariffs differs depending on whether the firm imports inputs. Therefore, in addition to the regressors included in Specification 2, we add a dummy variable that takes value one if the firm exports ). This allows analysing whether the effects of trade policy (as captured by input and output tariffs) are affected by firms' trade status. We lag one period both export and import status variables as we expect that the effects of exporting/importing on productivity will not be immediate. Including lagged export and import status in the estimation of Specification 3, we are consistent with our endogenous Markov process in which productivity in period t depends on firms' trade status in period t-1 (see Sect. 2.1 and Appendix A) (Specification 3). Our results from Specification 3 suggest that a 10 percentage points decrease in output tariffs increases productivity by 0.20 percent for non-exporters and by 0.35 percent for exporters (we get that both 1 and 2 are negative and statistically significant). These results may suggest that the potential productivity enhancing effects of trade liberalization are larger for exporters than for non-exporters. A possible explanation of the positive impact of a reduction in output tariffs on the productivity of both exporters and non-exporters is that the reduction in output tariffs tightens competition in the domestic market and forces both types of firms to increase efficiency (competitive pressure on output producers' channel). As for the higher increase in the productivity for exporters, it could arise from at least two mechanisms. First, it should be considered that if trade liberalization reduces domestic firms' market share in the domestic market, its impact could be larger in the market share of the less productive non-exporting firms, lessening their incentives to increase productivity. Second, Cirera et al. (2015) , using the same database, find evidence of selfselection of the more efficient firms into export markets, so it could be the case that less productive purely domestic firms when facing the threat of increased foreign competition have less resources to invest in productivity improvements. Furthermore, our estimates for the coefficients on T I t−1 and T I t−1 D I it−1 ( 4 and 5 , respectively) suggest that a 10 percentage points decrease in input tariffs increases productivity by 0.62 percent, both for importers and non-importers of inputs, with no significant difference in the potential productivity gains for importers and nonimporters (the coefficient on the interactive term is negative, as expected, but not statistically significant). There are at least two channels through which a reduction in input tariffs may increase the productivity of input importers. On the one hand, a reduction in input tariffs eases importers the access to a wider range of inputs, to the technology embodied in the intermediate inputs or to higher quality inputs that may contribute to increase productivity (easier access to imported inputs channel). On the other hand, domestic producers of inputs when facing competition from foreign producers are forced to increase the quality/variety of their products with a potential benefit in the productivity of their domestic clients (competitive pressure on domestic input producers' channel). 22 The increase in productivity for non-importers of intermediate inputs may accrue through three channels. The first one is the competitive pressure on domestic input producers' channel (from which may profit both importers and non-importers of inputs). The second one is the possible existence of spillovers from importers of intermediate inputs to non-importers (spillovers channel). Non-importers could mimic and adopt the best practices implemented by input importers derived from importing inputs (for example adoption of technology embedded in imported inputs). 23 The third one is an alternative to the spillovers story, which may coexist with the existence of some firms that purchase products abroad indirectly through wholesalers. 24 The fact that the reduction in input tariffs results in similar productivity improvements for importers and non-importers of inputs suggests that the competitive pressure on the domestic input producers' channel benefits both importers and non-importers of inputs, that the spillovers channel could be also at work, and that there may also be some firms that import indirectly through wholesalers. As for the spillovers channel, it could be also signalling that the enhancements in firm's practices stemming from importing inputs can be easily copied by non-importers of inputs. At this point is important to remark that the main mechanism through which Brazilian trade liberalization affects productivity is the reduction in input tariffs: whereas a 10 percentage points decrease in output tariffs increases productivity by 0.20 percent for non-exporters and by 0.35 percent for exporters, the increase in productivity resulting from the same decrease in input tariffs is 0.62 percent, both for importers and non-importers. The interpretation of the parameters 3 and 6 deserves special attention. In a fixed effects estimation, the only firms that contribute to the identification of the coefficients for the dummy variables D E it−1 and D I it−1 are those firms switching their trade status. When we perform the within groups transformation associated to the fixed effects estimation, we cannot distinguish between firms that always export (import) and never export (import). This type of firms does not contribute to identification, and only switchers (i.e. firms that change from exporting/importing to non-exporting/non-importing and vice versa) contribute to identification. Therefore, the estimates for D E it−1 and D I it−1 should be interpreted as the effect on productivity of changing from not exporting to exporting and from not importing to importing, respectively. Thus, switching from non-exporting to exporting results in an 11.52 percent productivity increase. Analogously, switching from non-importing to importing increases productivity by 12.19 percent. 25 In this section, we test the robustness of our results to alternative specifications. The aim of Specification 4 is to test whether two-way traders (firms that simultaneously export goods and import inputs) enjoy extra productivity gains in trade liberalization scenarios (reduction in output and/or input tariffs). For this purpose, we augment specification 3 with interactions of both input and output tariffs with the export and import dummies ( ) (Specification 4) 26 : One way to interpret these interaction terms is to recognize that for two-way traders there can be some increasing returns (complementarity) in terms of productivity improvements when inputs or outputs tariffs decrease. If this occurs, an exporting (importing) firm will get a further increase in productivity when tariffs decrease if the firm adds importing (exporting) as a second trading activity. Hence, if 8 and 9 are negative and statistically significant it will mean that the marginal contribution to productivity improvements of tariffs reductions, when adding a second trading activity, is larger than the marginal contribution of adding that same activity when the firm does not perform the other one. However, we find that although the coefficients of these interactions ( 8 and 9 ) are both negative, as expected, they are statistically non-significant and, therefore, we do not find evidence of the aforementioned increasing returns for two-way traders. Finally, in Specification 5 we augment Specification 3 to account for the possible effects that the appreciation of the real effective exchange rate (REER, hereafter), 27 experienced in Brazil, during the period analysed, had on the relationship between 25 We would like to thank an anonymous referee for pointing out this interpretation. The identification of the coefficients for D E it−1 and D I it−1 is guaranteed as there is a substantial number of firms that change trade status along the sample period (see Table 1 ). 26 We also include, beyond the D E it−1 and D I it−1 dummies in specification 3, the interaction dummy , although it does not have statistical significance in our estimation of specification 4. 27 REER is computed at CNAE 4 digit sector level (national/foreign currency) using a weighted average (by exports' volume) of the main country destinations of exports. firms' trade status and productivity. 28 An appreciation makes imports cheaper, and so it has the potential to activate the same channels of productivity increases discussed above in relation to a reduction in input and output tariffs. Nevertheless, an appreciation of the Brazilian real triggers another mechanism with a potential impact on productivity. It increases the price of Brazilian exports, which may force Brazilian exporters to increase productivity (with consequent reduction in costs) if they want to remain competitive in international markets. Hence, specification 5 widens specification 3 to include as additional regressors the cross products of the REER with the export and import dummies. Since we do not expect changes in REER to have an immediate effect on productivity, we lag this variables one-period in estimation. To interpret the results from this specification one should bear in mind that an appreciation of the national currency means a decrease in the REER (Specification 5). Results for this specification are reported in column 5 of Table 3 . The introduction of the REER has an impact on the effects of exporting and importing on TFP. First, the direct and positive effects in productivity of switching from not exporting to exporting and from not importing to importing are larger when accounting for the REER. In Specification 5, the export and import productivity advantages are 15.37 percent and 16.48 percent, respectively. Second, the estimates of the two interactions between the REER and the importer and exporter dummies are negative and significant. Thus, a unit decrease in REER increases productivity by 6.08 percent and 7.66 percent for importers and exporters, respectively. This could be signalling that an appreciation of the Brazilian real may also put pressure on exporters to increase productivity to offset the competitiveness loss generated by the appreciation of the national currency. Furthermore, it also lowers imported input prices, and so it might enhance the access to imported inputs for importers, contributing to their increase in productivity. Third, the consideration of REER reduces the size (in absolute terms) of the estimates corresponding to output and input tariffs. In Table 4 we summarise the impact of including the REER in the estimation of the effects of output and input tariffs on productivity. As it can be observed, the introduction of the REER in estimation mainly affects the effect of output tariffs for exporters, as we get that for exporters the effect of 10 percentage points reduction of output tariffs is 54% lower in Specification 5 than in Specification 3, whereas this effect is only 20% lower for non-exporters. It is also worth to note that after including the REER, the extra productivity growth associated to a reduction in output tariffs is the same for exporters and non-exporters. This finding suggests that the additional productivity growth (when output tariffs decrease) for exporters (compared to non-exporters) in Specification 3, was really capturing the effect of competitive pressure in international markets to enhance productivity and maintaining competitiveness in a period of appreciation of the Brazilian real. The changes in the estimates corresponding to the effects of input tariffs on importers and non-importers productivity are much smaller than the corresponding to output tariffs on exporters and non-exporters. Thus, the estimates of a 10 percent point reduction in input tariffs remains almost unaffected (both for importers and for non-importers) regardless of the inclusion of the REER in estimation (the reduction in the estimated effect is only 6.4%). Therefore, since both the Brazilian real exchange rate appreciation and the reduction of input tariffs may activate the easier access to imported inputs channel, the competitive pressure on domestic input producers' channel and the spillovers channel, it seems that even after including the REER, import tariffs keep about 93.5% of its potential to improve productivity through these channels. The above explained results are consistent with the fact that reductions in the REER have a higher impact on the productivity of exporters than in the productivity of importers (a unit decrease in REER increases productivity by 6.08 and 7.66 percent for importers and exporters, respectively). A possible explanation for this result is that the appreciation of the Brazilian real implies an increase in the price of the products sold by exporters in international markets, and a decrease in the price of products of foreign competitors, i.e. the appreciation poses a threat in the competitiveness of domestic producers both in their domestic and international markets. Therefore, exporters have strong incentives to invest in productivity improvements (and so cost reductions) to avoid losing both domestic and international sales. This paper analyses the effects of both import tariffs (on outputs and inputs) and firms' trade status on productivity by evaluating how the impact of trade policy on firms' productivity depends on firms' trade status. These effects are studied using firm data information from the Brazilian industrial sectors (manufacturing and mining) during 2000-2008. The results from all specifications led us concluding that there was a positive impact of trade liberalization on firm-level productivity in Brazil, even during a period of modest trade liberalization (as compared to a previous period). Specifically, we find evidence that trade liberalization affected productivity across all firms through different channels. The main findings of the paper can be summarized as follows. First, lower output tariffs (tariffs on imports of firms' final goods) are associated with improvements in firm-level productivity, likely by increasing import competition, which forces firms to improve efficiency. Second, lower input tariffs (tariffs on imports of intermediate inputs) are also associated with firm-productivity improvements, possibly due to improvements in firms' access to a wider range of foreign inputs, to higher quality inputs, or to foreign technology embodied in imported inputs. Third, it is worth mentioning that the effects on TFP operate mainly through the intermediate input channel, since the effect of the reduction in input tariffs is substantially larger than that associated with a reduction in output tariffs. Fourth, we do not find that trade liberalization in the form of lowering input tariffs has a greater effect on the productivity of firms that import intermediates than on that of non-importing firms. This could be consistent with the existence of spillovers from foreign suppliers of inputs to domestic suppliers, although we cannot deny that this explanation may coexist with another one that arises from the possibility that some firms purchase products from abroad indirectly through wholesalers. Finally, controlling for the effects of REER fluctuations on exporting and importing firms, the additional improvement in productivity found for exporters (compared to non-exporters) when output tariffs decrease vanishes, uncovering that it was in fact driven by the appreciation of the Brazilian currency. In other words, the appreciation of the currency could have put additional competitive pressure on exporting firms to improve productivity and maintain competitiveness in international markets. Therefore, our results indicate that the impact of trade policy on TFP spreads among all firms, and not only affects exporting or importing firms. This finding is consistent with the idea that both the knowledge and competition generated by trade liberalization exert competitive pressure on all firms, even those that are not directly involved in international transactions. In addition, we also find evidence of a positive direct impact of both the import and export statuses on TFP. From a policy point of view, there is still room for a deepening of trade liberalization in Brazil, what would confront its industrial sector with greater competition, and would favour improvements in firms' productivity. Otherwise, Brazil has not yet fully benefited from the productivity gains associated with trade (and especially with trade in intermediates). Finally, we would like to acknowledge that although we provide evidence, both through an extensive discussion and using some empirical checks, in favour of trade policy being exogenous in Brazil during the analysed period, we cannot fully dismiss some endogeneity concerns. While reverse causality is unlikely to be an issue, since we can reasonably exclude that the productivity of a single firm could affect trade policy of an entire industry, endogeneity could still emerge if unobserved factors that vary over time are simultaneously correlated with firm productivity and industry trade policy. 29 However, we trust that our approach in this paper has lessened these concerns and leave the search for suitable instruments for a formal test to our future research agenda. 30 We assume that firms produce using a Cobb-Douglas technology: where y it is the natural log of production of firm i at time t, l it is the natural log of labour, m it is the log of intermediate materials, k it is the log of capital, and μ t are time effects. As for the unobservables, ω it is productivity (not observed by the econometrician but observable or predictable by the firm) and η it is a standard i.i.d. error term that is neither observable nor predictable by the firm. Further, we assume that capital is a state variable whereas labour and materials are variable non-dynamic inputs that can be adjusted whenever the firm faces a productivity shock. We follow Wooldridge (2009) to get consistent estimates of input elasticities and estimates of TFP residuals. According to Wooldridge (2009) , the semiparametric control function approaches for estimating production functions proposed by Olley and Pakes (1996, OP) and Levinsohn and Petrin (2003, LP) can be reconsidered as consisting of two equations that can be jointly estimated by GMM using the appropriate set of instruments. The first equation deals with the problem of endogeneity of labour and materials in a production function. The second equation deals with the law of motion of productivity and guarantees identification of all input elasticities. The first problem we consider is the endogeneity of the non-dynamic inputs. The fact that labour and materials might be correlated with firms' productivity complicates the estimation of equation (A.1), as OLS is biased and either the instrumental variables or the fixed effects methodologies are usually not consistent (see Ackerberg et al. 2015) . OP and LP propose a control function approach to solve this problem. OP use the investment in capital demand function and LP the materials demand function, respectively, to approximate "unobserved" productivity with a function of observables. In particular, the OP method assumes that the demand for investment in capital is a function of firms' capital and productivity. To circumvent the problem of firms with zero investment in capital, the LP method uses the demand for materials (intermediate inputs), m it = m k it , it , instead, as a proxy variable to recover "unobserved" firm's productivity. Since we follow this last approach, we concentrate on the demand of materials hereafter. (A.1) y it = 0 + l l it + k k it + m m it + t + it + it 29 We acknowledge a referee by all the suggestions and concerns raised as regards the endogeneity issue. 30 We were unable to access the original data in Brazil due to COVID-19 restrictions at the time we implemented the revision of this paper. The Brazilian data used in this work can only be accessed with the permission and supervision of the competent authority and in the rooms made available there to researchers. Therefore, when estimating productivity using these general versions of OP and LP in a sample in which firms follow different trading strategies (only-exporters, only-importers, two-way traders, non-traders), it is assumed that the demand of intermediate materials for the different types of firms according to their trading status is identical. However, heterogeneity in these firms' strategies may influence the demand of intermediate inputs. De Loecker (2007) acknowledges that exporting firms face different operating conditions than non-exporters. This could be related to the fact that to be competitive in international markets exporting firms need to use higher quality inputs that allow them to produce higher quality outputs, or to the need of using different inputs that ensure complying the safety regulations of destination countries. As for importers, it is obvious that importing intermediates allows firms to access a wider variety of possibly higher quality inputs. Therefore, the demand of intermediate materials of importers will differ from that of non-importers. Hence, we consider different demands of intermediate materials for only-exporters (E), only-importers (I), two-way traders (EI) and non-traders (NT); and, we write the demand of materials function as: where we include the subscript TS to denote different demands of intermediate inputs for the different firms' trading strategies (E, I, EI, NT) . Under the assumption that function m TS is strictly monotonic in unobserved productivity and that productivity is the only unobservable among the arguments of the function (scalar unobservable assumption), it can be inverted to generate the following inverse demand function for materials: where h TS is an unknown function of k it and m it . Then, substituting expression (A.3) into the production function (A.1) we get, Thus, our first estimation equation is given by: where a TS is an indicator function that takes value one if a firm follows the trading strategy TS in year t and zero otherwise. 31 Further, the unknown functions H in (A.5) are proxied by second-degree polynomials in their respective arguments. With the specification in equation A.5, the difference in the inverse demand function of materials for firms with different trading strategies arises not only from differences in the coefficients of k it and m it but also by the fact that each inverse demand function includes a dummy variable capturing the corresponding firm's trading strategy in year t. This is not equivalent to introduce the set of dummies identifying different trading strategies as additional inputs in the production function, as each one of these dummies is interacted with all the terms k it and m it in its corresponding polynomial. For example, introducing an only-export dummy as an input in the production function will cause at least two problems. First, an identification problem, as we will need another estimation step to identify the parameter associated to that variable. Second, implies that a firm can substitute any input with the exporting decision at constant unit elasticity (see De Loecker 2007 , 2013 . Notice, however, that we cannot identify β k and β m from (A.5). This is achieved by the inclusion of a second estimation equation in the GMM-system that deals with the law of motion for productivity. The standard OP/LP approaches consider that productivity evolves according to an exogenous Markov process (i.e. the only predictor of current productivity is productivity in the previous period): where f (⋅) is an unknown function that relates productivity in t with productivity in t−1 and ξ it is an innovation term uncorrelated by definition with k it . However, the exogenous Markov assumption neglects the possibility of firm's previous trading experience to affect productivity. Consequently, in this paper we consider a more general (endogenous Markov) process in which previous trading experience can influence the dynamics of firm's productivity: where E it-1 , I it-1 and EI it-1 indicate whether the firm in period t-1 choses to only export, only import or both importing and exporting (the reference category in being a non-trader, NT). Since it = h TS k it , m it , we can rewrite equation A.7 as: Finally, plugging equation (A.8) into the production function (A.1), we get our second estimation equation 32 : where u it = it + it is a composed error term. F TS are unknown functions proxied by second-degree polynomials in their respective arguments. As before, the firms' trading strategy dummies a TS are used to define the polynomials and are also included as dummy variables in the corresponding polynomials. 33 Wooldridge (2009) proposes to estimate jointly the system of equations A.5 and A.9 by GMM using the appropriate instruments and moment conditions for each equation. This joint estimation strategy has the advantages of increasing efficiency relatively to two-step procedures (such as, for instance, the OP and LP procedures), making unnecessary bootstrapping for the calculus of standard errors, and also solving the aforementioned identification problem affecting the elasticity of labour when using only equation A.5 (Ackerberg et al. 2015) . By this method, we obtain for each one of 22 industries (CNAE 2 digits) both the estimated input elasticities of the production function and firms' productivity estimates as: where tfp s it denotes the log of TFP of firm i at time t for each industry s. See Table 5 and 6 (A.10) tfp s it = y it −̂ll it −̂mm it −̂kk it � also includes the parameter 0 of the production function. Identification properties of recent production function estimators Trade liberalization, intermediate inputs, and productivity: evidence from Indonesia Intramural and external R&D: evidence for complementarity or substitutability Input-trade liberalization, export prices and quality upgrading Exceptional exporter performance: cause, effect, or both ) Importers, Exporters and Multinationals: A Portrait of Firms in the U.S. that Trade Goods, NBER Chapters Imports, productivity growth, and supply chain learning Trade liberalizations, exports, and the technology upgrading: evidence on the impact of MERCOSUR on Argentinian firms Do all imports matter for productivity? Intermediate inputs vs capital goods. Economia Politica Self-selection and learning-by-exporting: The Brazilian case Do exports generate higher productivity? Evidence from Slovenia Detecting learning by exporting Markups and firm-level export status The connection between imported intermediate inputs and exports: evidence from Chinese firms Trade policy, trade volumes and plant-level productivity in Colombian manufacturing industries Does trade stimulate product quality upgrading? Evidence from firm-product data New evidence from Brazil on trade liberalization and productivity growth Trade, quality upgrading, and input linkages: Theory and evidence from Colombia Trade, wages, and the political economy of trade protection: evidence from the Colombian trade reforms Imported intermediate inputs and domestic product growth: Evidence from India Intra-firm trade, exporting, importing, and firm performance Imported Inputs and Productivity Productivity and the decision to import and export: Theory and evidence Does the use of imported intermediates increase productivity? Plant-level evidence Estimating production functions using inputs to control for unobservables The effect of trade liberalization on productivity growth in Brazil: competition or technology? The impact of input and output tariffs on firms' productivity: theory and evidence Foreign sourcing and exporting The impact of trade on intra-industry reallocations and aggregate industry productivity Explaining the appreciation of the Brazilian real Trade, technology, and productivity: a study of Brazilian manufacturers OECD economic surveys: Brazil The dynamics of productivity in the telecommunications equipment industry Inter-industry productivity spillovers: an analysis using the 1989-1998 Brazilian trade liberalization Heterogeneous productivity response to tariff reduction: evidence from brazilian manufacturing firms Foreign outsourcing, exporting, and FDI: a productivity comparison at the firm level Trade liberalization and firm productivity: the case of India Exporting raises productivity in Sub-Saharan manufacturing plants On estimating firm-level production functions using proxy variables to control for unobservables Trade Policy Review: Brazil Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations