Trade at the margin: Estimating the economic implications of preferential trade agreements

Preferential Trade Agreements (PTAs) have become the most prevalent form of international trade liberalization in recent decades, even though it remains far from clear what their effects on economies and their key units, firms, are. This paper evaluates the distributional consequences of trade liberalization within industries differentiating two distinct aspects in which trade liberalization could result in higher trade flows: the intensive vs. the extensive margin of trade. In particular, we analyze whether trade liberalization leads to increased trade flows because either firms trade more volume in products they have already traded before (intensive margin) or because they start to trade products they have not traded previously (extensive margin), or both. We test these arguments for the Dominican Republic–Central America–United States Free Trade Agreement (CAFTA-DR) and exporting firms based in Costa Rica for the time-period 2008–2014. The results of our study suggest that the effects of CAFTA-DR depend not only on whether we analyze the extensive versus the intensive margin of trade but also whether the product in question is homogenous or differentiated and whether the exporting firm under analysis is small or large. In particular, we find support for the theoretical expectation that firms exporting heterogeneous products, such as textiles, gain from trade agreements, such as CAFTA-DR, in that they can export more varieties of their products. Yet at the same time, they tend to lose at the intensive margin by a reduction in their trade volume while the opposite pattern occurs for firms exporting homogenous products.


Introduction
Most political conflicts associated with negotiating free trade agreements concern distributional implications. Which industries within each trading partner will benefit from liberalization and which industries will lose? Furthermore, within specific industries not all firms might benefit equally from reducing trade barriers as more productive and thus mostly large firms should have clear advantages when competing in foreign markets and thus reaping the benefits attached to trade liberalization. In addition to the question which firms gain most from trade liberalization, a hitherto unanswered question in the context of preferential trade liberalization is whether trade agreements mainly benefit those firms that were already able to serve foreign markets by expanding the volume of existing trade or whether trade agreements also expand the set of exporting firms and products?
Most existing research on trade agreements evaluates their effects on the country level (Baier and Bergstrand 2007;Baldwin 2008;Freund and Ornelas 2010;. However, analyzing the effects of trade agreements on the country level hides important sectoral respectively firm level heterogeneity. This implies that within the same country some sectors or firms might greatly benefit from trade liberalization while others might not (Baccini et al. 2017;Subramanian and Wei 2007). The empirical observation that not all firms within the same industry gain equally from a change in trade barriers (Bernard et al. 2003;Bernard and Jensen 1999;Eaton and Kortum 2002;Eaton et al. 2004Eaton et al. , 2011, e.g., a trade agreement, is reflected in models of new, new trade theory (Melitz 2003). These models show that while trade liberalization typically benefits those firms that are very productivemostly large firms ) -, less productive firms, even within the same industry, can often not compete in foreign markets and thus cannot reap the benefits attached to trade liberalization. The reason for this unequal effect of trade liberalization is that only the most productive firms can compensate for the increased competition in their home market as well as the fixed costs attached to exporting by the gains achieved through selling their products in new markets. For the least productive firms, trade liberalization can even imply market exit. Consequently, the implementation of trade agreements should come along with interesting distributional effects not only within countries but also within sectors and between firms.
One could witness such distributional conflicts among others in the context of the Trans-Pacific Partnership (TPP) and the US shoe industry more specifically. Whereas Nike would have strongly welcomed the TPP agreement as the company heavily relies on production facilities in several of the involved TPP partner countries, New Balance on the other hand produces its shoes mainly in the US and thus feared increased competition using cheaper foreign production facilities (Politico 2016). Consequently, in light of this intense political debate on the domestic distributional implications of new trade deals a better understanding of the precise implications of such deals seems warranted.
In addition to highlighting the distributional consequences of trade liberalization within industries, the literature has begun to separate two distinct aspects in which trade liberalization could result in higher trade flows: the intensive vs. the extensive margin of trade (Chaney 2008). Correspondingly, trade liberalization could lead to increased trade flows because either firms trade more volume in products they have already traded before (intensive margin) or because they start to trade products they have not traded previously (extensive margin), or both. In the context of the WTO, for example, Dutt et al. (2013) can show that the WTO and its predecessor the GATT almost exclusively impact the extensive margin of trade. This implies that once countries become a member of the WTO they begin to trade products that they have previously not traded. However, at the same time, the WTO/GATT seems to have a negative effect on the intensive product margin, which would imply that upon membership countries trade less volume of products that they have already traded before. Yet despite the large theoretical literature distinguishing the extensive from the intensive margin of trade (Chaney 2008;Helpman et al. 2008;Manova 2013), few empirical studies on this distinction exist. 1 Understanding the effects of PTAs on the firm level requires a detailed analysis of how firm and product level trade flows react to the implementation of such an agreement with regard to both the intensive and the extensive margin of trade. In this paper, we focus on the effect of one specific PTA, the Dominican Republic-Central America-United States Free Trade Agreement (CAFTA-DR) 2 on firm-and productlevel trade flows. In particular, we analyze whether the set of exporters and productsextensive marginand the actual trade volume exported by firm respectively product categoryintensive marginhas changed due to the implementation of CAFTA-DR.
We theoretically expect that CAFTA-DR should positively affect the extensive and intensive margin conditional on both the size of the firm and the type of product. In general, we expect a more pronounced effect of CAFTA-DR on both margins for larger, and thus more profitable, firms. Furthermore, we expect the effect of CAFTA-DR on the intensive and the extensive margin to differ for differentiated versus homogenous products. In case of homogenous goods, which are characterized by a high elasticity of substitution, trade barriers should strongly affect the intensive margin but it should be difficult for new firms and products to enter the market. In contrast, in case of differentiated goods, which are products for which a lot of varieties exist and elasticity of substitution is low, the demand for each variety should be little affected by trade barriers (Chaney 2008). Under these circumstances the intensive margin should react little yet we should observe a strong and positive reaction at the extensive margin of trade.
1 Recent exceptions are Baier et al. (2014) and Kim et al. (2017). To empirically test whether and how firm and product level extensive and intensive margins react to the implementation of CAFTA-DR, we use a novel dataset that provides information disaggregated at the firm-product level for the years 2000 to 2014. Since all other CAFTA-DR member countries were already in a PTA with Costa Rica long before 2009, the year in which CAFTA-DR entered into force for Costa Rica, we focus our analysis on how Costa Rican exports to the US market change with entering into force of CAFTA-DR in relation to those markets for which we observe no trade liberalization, i.e., the non-PTA markets. This empirical identification strategy is necessary to be able to draw causal inference given our empirical setting. Simply analyzing how trade flows of all CAFTA-DR members evolved compared to other markets would conflate markets that have been previously liberalized with those that only saw trade liberalization because of CAFTA-DR.
Based on this empirical strategy, we find that the overall benefits of CAFTA-DR mainly materialize at the extensive margin. With CAFTA-DR entering into force both the number of firms as well as the number of products exported by these firms has increased. In contrast, our results show only few overall benefits at the intensive margin. Yet if we condition our analysis on the type of product, we observe that in line with our theoretical expectations the two margins of trade react in opposite directions: Whereas the intensive margin positively reacts in case of homogenous goods it is the extensive margin that is positively affected in case of differentiated goods. This suggests that the benefits of CAFTA-DR mainly lie in expanding both the set of exporting firms as well as the set of export products if we consider products for which many varieties exists whereas for the same type of products we observe little gains through the expansion in the volume traded. In contrast, for homogenous products the gains from CAFTA-DR arise mainly through the expansion in volume traded.
This paper advances the existing literature in at least two ways. First, over the last decades more and more developing and emerging market economies have started to negotiate PTAs, often including large advanced economies. So far, the literature has, however, mainly focused on advanced economies when evaluating the impact of such trade agreements. Hence we know little about the impact of PTAs on emerging market economies. Costa Rica is a prime example of such an economy and it is crucial to understand whether these countries benefit from PTAs in a similar manner as industrialized countries and how benefits within these countries are distributed.
Second, while most of the literature evaluates PTAs at the country level, our disaggregated firm-product level data enables us to study the effects of CAFTA-DR on the extensive versus the intensive margin both at the firm and at the product level. Hence our study adds to a nascent empirical literature (Baier et al. 2014;Dutt et al. 2013;Kim et al. 2017) studying the hitherto mostly theoretical distinction between the extensive and the intensive margin of trade.
Yet a better understanding of which firms benefit from trade liberalization via PTAs and whether this occurs by expanding the set of products and the number of firms or rather by expanding existing trade flows is important also with respect to policy making. If the gains from PTAs mainly arose from expanding the intensive margin, i.e., the volume of trade, those firms already exporting would be the main winners of the agreement. However, if PTAs also create new export opportunities for firms that so far did not have access to these foreign markets a broader set of economic actors should gain from these agreements. As a consequence, the set of actors potentially supporting such agreements should vary accordingly and thus the domestic support coalition on which governments could rely on when negotiating trade agreements should differ depending on the strength of specific industries. Understanding the exact distributional consequences of these agreements and thus the potential actors favoring or opposing them seems indispensable especially in times in which PTAs have come under increased scrutiny, as examples such as the US withdrawal from the TPP or the strong public backlash against the Transatlantic Trade and Investment Partnership (TTIP) in Europe illustrate.

Theoretical framework
In this section we first discuss the existing literature on the effects of PTAs before discussing some empirical regularities concerning trade flow patterns. We then present our theoretical expectations concerning the effect of CAFTA-DR on the extensive and intensive margin of trade.

What do we know about the effects of trade agreements on trade flows?
Do trade agreements actually lead to an increase in trade flows between their member countries? And if so, is this because trade agreements allow new firms to start exporting or because firms already exporting are able to export even more? The question whether trade agreements indeed fulfill the aim that they were created for, namely, to increase trade flows between their member countries, started in the context of the World Trade Organization (WTO). While a first assessment of this question seemed to suggest that neither the WTO nor its predecessor the GATT had an effect on actual trade flows (Rose 2004), later studies point towards a more nuanced picture (Tomz et al. 2007;Subramanian and Wei 2007). For example, Subramanian and Wei (2007) show that the WTO promotes trade but unevenly: industrial countries that participated more actively in trade negotiations experienced a stronger increase in trade upon membership. Furthermore, only sectors that were indeed liberalized witnessed a significant increase in trade flows with bilateral trade flows increasing most when both countries in the dyad decided to liberalize.
More recently, research started to analyze whether the WTO/GATT enabled trade in new products that were not traded previously (extensive margin) or whether it increased trade in products already traded (intensive margin). Dutt et al. (2013) can show that the WTO/GATT almost exclusively impacts the extensive margin of trade leading to an increase in trade in products that have previously not been traded. However, at the same time the WTO/GATT seems to have a negative effect on the intensive product margin, i.e., it decreases the volume of products that countries have already traded before. These findings suggests that while the number of products countries tend to trade when entering into the WTO/GATT increases, the volume of products traded tend to decrease, which would be in line with the earlier finding of Rose (2004) that the WTO/ GATT has no discernible effect on trade volumes.
Turning from the WTO to PTAs, the literature generally shows that PTAs tend to increase trade between their members, with small trade-diverting effects for non-members Bergstrand 2004, 2007;Baldwin 2008;Baldwin and Low 2009;Dai et al. 2014;Egger et al. 2008Freund and Ornelas 2010;Fugazza and Nicita 2013;Magee 2008). More recently, studies have begun to evaluate whether PTAs demanding deep integration lead to more trade-creation and less tradediversion relationship than more shallow integration (e.g., Baier et al. 2014;Mattoo et al. 2017). Differentiating between the extensive and the intensive margin at the country level, Baier et al. (2014) for example, find that deep agreements have a stronger impact on both the intensive and the extensive margin than more shallow agreements. Some studies go beyond the pure trade effects of PTAs and analyze how PTAs affect other macro economic indicators such as employment and country level welfare (Arkolakis et al. 2012;Romalis 2007;Trefler 2004). However, while most of this research shows that PTAs tend to increase trade between member countries, these studies tend to evaluate the effect of PTAs on the country level. One recent exception is the study of Baccini et al. (2017), which analyzes the effect of US PTAs on US multinationals. In line with the predictions of recent trade models, which are discussed in the following section, their results suggest that the gains from preferential trade are very unevenly distributed with more competitive firms gaining most.
Consequently, while it is clearly important to understand whether trade agreements benefit their member countries as a whole, new research on international trade flows suggest that any analysis on the country level might hide important variation since most action in international trade does not occur on the country or even industry but rather on the firm level. Moreover, the distinction between trade effects on the intensive versus the extensive margin as introduced in the context of the WTO (Dutt et al. 2013) provides an additional layer of complexity that should allow for a more precise understanding of the actual impact of preferential trade agreements.

Empirical patterns for firms and trade
While standard models of tradei.e., Heckscher-Ohlin vs. Ricardo-Vinercome to different conclusions as to who benefits from trade liberalization, they have in common that they treat firms within industries as identical and products within industries as homogeneous. Yet recent empirical studies have found some regularities in trade flow patterns that are hard to align with the assumptions of these standard models. In particular, these empirical regularities suggest that firms who export differ from firms producing for their home market, independent of the sector in which they are operating. Exporters tend to be larger in size and are much more productive (Aw et al. 1998;Bernard et al. 2003;Bernard and Jensen 1999;Eaton and Kortum 2002;Eaton et al. 2004Eaton et al. , 2011. Furthermore, a minority of firms export and those that export typically only serve one or few markets (Eaton et al. 2004). Melitz (2003) introduced a theoretical model to account for the observed heterogeneity of firms within industries. In this model trade liberalization typically benefits those firms that already export and that are most productive whereas it tends to harm non-exporting firms and those that are least productive. The reason for this unequal effect of trade liberalization is that only the most productive firms can offset the increased competition in their home market by higher levels of exports. For the least productive firms, trade liberalization can even imply market exit. Furthermore, Chaney (2008) distinguishes the effect of a change in trade barriers on the extensive vs. the intensive margin, where the extensive margin is the set of exporters, i.e., how many firms export, and the intensive margin is the size of exports by firms. If trade barriers change both extensive and intensive margin could change, i.e., less firms could export and they could change the quantity of goods exported. Chaney (2008) shows that the effect of a change in trade barriers depends on the elasticity of substitution: if elasticity is high the intensive margin reacts more strongly than the extensive margin to a change in trade barriers.
While there exist an emerging literature in political science evaluating the implications of firm level heterogeneity on trade preferences and trade policy lobbying (Plouffe 2017;Jensen et al. 2015;Kim 2017;Osgood 2017;Osgood et al. 2017), few empirical studies evaluate the effect of PTAs on the firm or even product level. 3 For example, Baggs and Brander (2006), relying on firm level data to estimate the effect of the Canada-US free trade agreement on Canadian firms' profits, find, using a sample of all Canadian companies paying taxes, that decreases in domestic tariffs are associated with lower profits for import-competing firms. In contrast, decreases in foreign tariffs are associated with higher profits for exporting firms. Following a different approach, Moser and Rose (2014) evaluate the effect of PTAs on firms using stock market data. However, while relying on firm level data, they aggregate their analysis on the country level to be able to estimate the effect of PTAs on countries' overall welfare. Finally, Baccini et al. (2017) evaluate the effect of US PTAs on the sales of affiliates of US firms to the US market. They can show that the largest and most competitive firms can reap disproportionally high gains from these agreements supporting the idea of uneven benefits of PTAs.
In summary, the literature on trade patterns focusing on the firm level is developing rapidly and produces important insights on how firms that export differ from those that do not. However, few studies, with the exception of Baccini et al. (2017) and Baggs and Brander (2006), analyze how PTAs affect trade flows at the firm level. Furthermore, the differentiation between the effect of trade liberalization for the intensive vs. the extensive margin of trade, which has been studied in the context of the WTO (Dutt et al. 2013) and in the context of PTAs (Baier et al. 2014), has, to the best of our knowledge, not been applied to firm level data. Our study of how CAFTA-DR affects the extensive and the intensive margin of trade at the firm and product level intends to fill these gaps.

The effect of CAFTA-DR on trade flowstheoretical expectations
Building on the idea of firm level heterogeneity, we study the effect of one specific preferential trade agreement, namely CAFTA-DR, on the extensive vs. the intensive margin of trade (Chaney 2008), both at the firm and at the product level. On the firm level, the extensive margin indicates the set of firms exporting per year, i.e., how many firms export, while the intensive margin refers to the size of exports by firm and year. On the product level, the extensive margin indicates the number of different products exported by firm and year and the intensive margin the volume of each product by firm and year. If trade barriers change, for example with the entering into force of CAFTA-DR, both extensive and intensive margin could change. For instance, fewer firms could continue to export, i.e., the extensive margin would decrease, but quantities of goods exported could increase, or vice versa.
In the following paragraphs, we first outline how we expect CAFTA-DR to affect the number of firms and products as well as the volume of traded products. In a second step, we introduce product differentiation to theoretically derive a different effect of CAFTA-DR on the extensive vs. the intensive margin. And finally, we condition the effect of CAFTA-DR on firm size to incorporate insights of new, new trade theory.
In general, based on the findings in Dutt et al. (2013) and Baier et al. (2014), one could expect a positive effect of CAFTA-DR on the firm level extensive margin. Following on our discussion in the section above, one could assume that for those firms not exporting before CAFTA-DR was in force but which were efficient enough to almost export, a lowering in trade barriers could tip the balance. Hence by lowering trade barriers CAFTA-DR should allow some firms that were almost ready to export before the agreement was in place, to start exporting once the agreement has entered into force. Consequently, we should observe an increase in the extensive margin at the firm level due to CAFTA-DR. One reason that might speak against this increase in the extensive margin could be that gains at the intensive margin for firms already exporting are large enough to crowd out any newcomers. In this case, gains at the intensive margin of trade would dominate the extensive margin of trade as a result of trade liberalization. This suggests that without further specifying the type of product under investigation, which we will do further below, the theoretical expectations stay somewhat ambiguous.
At the product level extensive margin, one could also expect CAFTA-DR to have a positive effect, i.e., allow firms that already export to expand their sets of products. After all, a preferential trade agreement implies a reduction in trade barriers thus lowering the costs of exporting. Furthermore, since these firms have already offset the fix costs of starting to export a reduction in trade barriers should allow them to expand the set of products.
On the intensive product level margin, one could also expect that CAFTA-DR might allow those firms that already export to sell even more volume of these products, which would imply an increase in the intensive margin of trade. Yet at the same time, and in line with the results presented by Dutt et al. (2013) for the WTO, it might be that an increase in the number of firms exporting increases competition and thus offsets any gains on the intensive margin of trade. Hence whether CAFTA-DR should lead to an increase in the intensive margin of trade is theoretically more ambiguous and again calls for a differential treatment of the type of product under investigation.
Following Chaney (2008), we expect that the effect of a change in trade barriers depends on the elasticity of substitution between varieties. This implies that an analysis on the intensive and extensive margin should distinguish between homogenous products, i.e., products for which no or only little varieties exist (e.g., primary commodities such as oil), and differentiated products, i.e., products for which a lot of varieties exist (e.g., shoes, cloths, or furniture). In particular, Chaney (2008) shows that the intensive margin reacts less pronounced to a change in trade barriers if the elasticity of substitution is low (differentiated goods) than if products are easily substitutable (homogenous goods). The reason is that in case of a low elasticity of substitution trade barriers should have only little effect on the demand for each product since consumers are more willing to pay higher prices for their preferred variety. Consequently, the intensive margin should react only little in case of highly differentiated goods whereas the opposite pattern should occur in the case of homogenous goods, which should react more strongly on the intensive margin to a change in trade barriers.
In contrast, the reaction at the extensive margin should be reversed: If products are easily substitutable (homogenous goods) new firms can only capture a small share of the export business. The reason follows from our discussion above: a change in trade barriers implies that new firms can more easily enter the market, yet, since they have not exported before they are typically less productive than those firms already exporting. If goods are easily substitutable these new, less productive, firms can reap only a small share of the market since they cannot easily compete with those more productive firms that were already exporting. However, if elasticity of substitution is low (differentiated goods) firms are better sheltered from competition and can reap a larger share of the market. The reasoning is again that in case of a low elasticity of substitution the demand for each variety should be less affected by trade barriers. Consequently, the extensive margin should react little in case of homogenous goods but more strongly in case of differentiated goods since new firms can enter more easily in the latter case.
Hence the two margins should react differently if differentiated versus homogenous goods are concerned: while CAFTA-DR should have a strong effect on the extensive margin for differentiated goods, its effect on the intensive margin, i.e., the volume of trade, should only be marginal. For homogenous products, we would expect the opposite pattern, i.e., a small effect on the extensive margin but a strong effect on the intensive margin, i.e., a strong increase in the volume of trade. Table 1 summarizes these theoretical expectations.
Finally, and further building on the insights of new, new trade theory, the effect of CAFTA-DR should not materialize equally for all exporting firms. More precisely, we expect the effect of CAFTA-DR to vary with the size of the firm. Following Melitz (2003), firms that export differ from those that do not in that exporters tend to be more productive and larger in size. The reason for this unequal effect of trade liberalization is that only the most productive firms can offset the increased competition in their home market by higher levels of exports. In the context of CAFTA-DR, this would imply that the benefits of the agreement would go mainly to the most productive exporters in Costa Rica, i.e., those firms that are larger in size. However, this conditional effect should mainly happen on the intensive margin of trade. The reason is that those firms that should profit most from a reduction in trade barriers should be the most profitable firms. At the same time, the most profitable firms are most likely those that have already exported prior to entering into force of a trade agreement. Hence CAFTA-DR should increase exports more for those firms most profitable, i.e., the larger exporting firms. The same logic should hold for the extensive margin at the product level. Also in this case, the benefits of further trade liberalization in the form of an expansion of the set of exported products should mainly go to those firms that are most profitable.

Empirical analysis
Our empirical focus is on Costa Rica, an upper middle-income country, which is the oldest democracy in Latin America, and after the debt-crisis of the 1980s has embarked on an ambitious trade liberalization process. This is displayed in Table 2, which lists the various PTAs Costa Rica belongs to. Our specific focus is on CAFTA-DR, which liberalized trade between Central America, i.e., Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua, and the Dominican Republic on one side and the US on the other. In 2007 Costa Rica held a nation-wide referendum on the ratification of CAFTA-DR a first for a developing country. CAFTA-DR entered into force in 2009, thus allowing for detailed assessment of its effects on firm and product level trade flows given the time period covered in our export data. Our selection of Costa Rica is motivated by several reasons. First and most importantly, our data on product-firm-level yearly exports is unique in many ways. It covers the universe of all exported products at the HS10 level for a substantial time period (2000)(2001)(2002)(2003)(2004)(2005)(2006)(2007)(2008)(2009)(2010)(2011)(2012)(2013)(2014). We obtained the data from Procomer (Promotora del Comercio Exterior de Costa Rica), the Export Promotion Agency of Costa Rica, a public quasiindependent agency founded in 1996, which is part of the Ministry of Trade. This data allows us to test our theoretical expectations regarding the effect of CAFTA-DR on firms' intensive vs. extensive margin. The Procomer data lists for each exporting firm and year the different products it exported, how much of each product and to which country. The structure of the data is therefore unique in that it is suitable for analyzing the intensive and the extensive margin, both at the firm and the product level. Furthermore, Lederman et al. (2011) can show that the aggregated Procomer data closely corresponds to trade flow data by the World Bank underlying the validity of the data. We will discuss the dataset in more detail in the following section. Second, since Costa Rica is a rapidly growing, globalizing developing country it provides a highly interesting case to examine the effects of a PTA. As Fig. 1 shows its export volume has markedly increased for all different types of export markets over the time span of our analysis. Most of the literature studying trade at the firm level focuses on industrialized countries (Baccini et al. 2017;Eaton et al. 2004Eaton et al. , 2011Baggs and Brander 2006). Hence we know very little about the effects of trade agreements in the context of developing countries.
Third and finally, in order to allow for a meaningful analysis of the effect of trade agreements on the intensive vs. extensive margin of trade enough variation should exist concerning export markets, firms and products, which is a feature of the Costa Rican export data. Without sufficient variation in the number of firms serving different markets and different products being exported to these markets, it would be difficult to estimate the distributional effects of CAFTA-DR on the extensive vs. the intensive margin. Overall, Costa Rican firms serve a large number of export markets, ranging from 123 in 2000 to 156 in 2014. 4 Furthermore, over the entire timespan from 2000 to 2014, the Procomer dataset list 15,625 individual firms that exported at least one specific product in at least one of the years under investigation. The number has increased from 2416 in the year 2000 to more than 4000 firms in the year 2014. Turning to the product level, we can observe that Costa Rica is not only very diversified with regards to export markets but also exports a large number of different products. While historically Costa Rica exported mainly agricultural commodities, this has changed dramatically over the last decades. Products such as electrical machinery, computers as well as some articles of apparel are among the products exported most. 5 For the time period from 2000 to 2014, Costa Rican firms exported 9720 different products at the HS10 level. Hence Costa Rican exports cover a wide range of industries and firms allowing for a detailed assessment of CAFTA-DR for both the intensive and the extensive margin of trade.

CAFTA-DR at a glance
The idea of negotiating a free trade agreement between Central America and the US arose during a visit of US-President Bill Clinton for a Central American Presidential Meeting in Costa Rica in 1997. Negotiations started in 2000 and the agreement was signed on May 28, 2004(Abrahamson 2007. However, the ratification processes was met with strong opposition in all countries involved. Various Central American civil society groups heavily criticized CAFTA-DR, most notably because of the perceived low transparency of the negotiating process (Ribando 2005). These groups further objected that CAFTA-DR would negatively affect the environment, working conditions and the livelihood of poor and indigenous populations in Central America mainly because of increased exposure to competition from the US and a strengthening of big agricultural businesses (Ribando 2005).
Also the ratification process of CAFTA-DR was far from smooth: For example, the US House of Representatives only barely passed the BU.S.-Dominican Republic-Central America Free Trade Agreement Implementation Act^with a vote of 217 in favor versus 215 against CAFTA-DR with two members abstaining. In Costa Rica, a national referendum was held on CAFTA-DR, a first in the country's history (Huhn and Löding 2007). Despite the strong opposition CAFTA-DR faced in all countries, by 2009 all member countries had ratified the agreement and it entered into force.
In particular, member parties agreed to progressively phase out tariffs with each country having negotiated a list of products for which elimination of duties could be delayed. With tariffs on agricultural products being a contested area in the negotiation phase, member countries were provided an additional time frame to phase out agricultural duties. Yet by 2020, almost all duties on US agricultural products will be phased out (export.gov 2016). Eventually, all agricultural products are supposed to become duty-free. Exceptions are sugar imported by the US, onions and fresh potatoes imported from Costa Rica, and white corn imported by the other Central American countries (Hornbeck 2012). In addition to granting national treatment to all goods and eliminating most tariffs, CAFTA-DR includes regulation on intellectual property rights (Chapter 15), investment and financial services (Chapters 10 and 12), telecommunications and electronic services (Chapters 13 and 14), environmental protection (Chapter 17) as well as transparency (Chapter 18) and labor regulations (Chapter 16). In 2011, the US was the first country to use CAFTA-DR's dispute settlement mechanism (Chapter 20) to address Guatemala's failure to enforce its labor laws as agreed in the agreement. Yet in June 2017, the arbitral panel ruled that the US was unable to demonstrate that Guatemala's failure to enforce its labor laws had affected trade between the parties (ICTSD 2017).

Identification strategy
To be able to draw causal inference in a panel data set-up it is important to carefully determine the correct control cases (Kosuke and Kim 2016). Our dataset includes data on different types of export markets: a) it includes exports to countries with which Costa Rica has a PTA for the complete time span, e.g., El Salvador; b) it includes exports for countries with which Costa Rica has no PTA for the period under investigation, e.g., India; and c) countries for which Costa Rica enters into a PTA during the period under investigation, e.g., the US or China. This implies that when evaluating the effect of CAFTA-DR we need to thoroughly decide which exports to which markets to compare with which control units. For example, simply comparing firms' exports to CAFTA-DR markets before and after the agreement entered into force with all other markets would conflate for the control units both markets with and without Costa Rican PTAs. Hence for all analyses below we carefully distinguish which exports we compare to which control units.
Furthermore, as Table 2 above shows, Costa Rica has already had a PTA with all other members of CAFTA-DR except the US. Hence trade was already liberalized between Costa Rica and El Salvador, Guatemala, Honduras, Nicaragua, and Dominican Republic. The major change that came along with CAFTA-DR was therefore the preferential market access for the Central American countries with the US and vice versa. However, this implies for our analysis that we need to focus our analysis of the effect of CAFTA-DR on the US market only since there should not be any differences for exporters to the other CAFTA-DR markets given their already existing trade liberalization with Costa Rica.
Our empirical analysis is structured such that the first part of the analysis focuses on the extensive margin and the second part on the intensive margin. The unit of analysis for the first part of the analysis is a) the number of firms per export market per year and the number of firms per industry and export market per year and b) the number of products per firm, export market and year and the number of products per industry, firm, export market and year. In our analysis of the intensive margin, we choose a within firm design and evaluate for each firm already exporting to the US before CAFTA-DR entered into force how its trade volume in general and within different industries has changed over time with respect to other non-PTA export markets. Since the unit of analysis as well as the control cases differ for each of these analyses we define the respective dependent variable at the beginning of each section below.
Since our dataset covers several years after CAFTA-DR entered into force we analyze the effect of CAFTA-DR on all types of margins for all years possible. This implies we compare the year before CAFTA-DR entered into force with 2009, 2010, …, 2014 respectively. In addition, we evaluate how the averages of the respective margins before and after CAFTA-DR entered into force thus taking into account all years in our dataset (from 2000 to 2014).
Our main independent variables stay the same for all analyses below. In all regressions we include two indicator variables: The first one indicates all exports going to the US market and the second one indicates the time period after CAFTA-DR is in force (2009 to 2014) as well as the interaction effect of the two. Using these three indicator variables, we can estimate the difference in the extensive and intensive margin before and after CAFTA-DR is in force for both markets that belong to CAFTA-DR and markets that do not. In some analyses, we condition our regression models on firm size measured as the number of employees. In particular, we separate our analyses by small and big firms where big firms are defined as those firms with more than 800 employees, which corresponds to the 90th percentile of the employment distribution. 6 Finally, we include a measure of product differentiation in some of the regression models. Following Osgood et al. (2016) we use a measure of product differentiation based on the classification of goods in Rauch (1999). This measure calculates the proportion of differentiated goods per HS2 category and ranges from 0 (no differentiated goods in this HS2 category) to 1 (all goods in this HS2 category are differentiated goods). Table 3 lists all independent variables.
In addition, we employ a set of fixed-effects in each of the analysis below. In particular, we use importer fixed effects, as is common in the literature. Since all exports by definition come from the same country, i.e., Costa Rica, we cannot use country-pair fixed effects, which is a common approach to deal with endogeneity concerns in the literature (Baier and Bergstrand 2007;Matteo et al. 2017). 7 This further implies that by implication the importer fixed effects also control for other variables, such as distance, that usual approaches following gravity model tend to incorporate (Head and Mayer 2014;Limão 2016). Since our main approach is to compare two points in time, we can also not use time fixed effects. Yet in the robustness section below, we provide an analysis in which we rely on a panel set-up and which allows us to incorporate also time fixed effects.

Analysis of firm level extensive margin
We start our analysis of the extensive margin with a focus on the number of firms. The left panel of Fig. 2 therefore shows the overall number of firms that export per year Small firm (less than 800 employees)

Product differentiation
Proportion of products in HS2 category that are differentiated according to Rauch (1999) 7 Clearly, an analysis of the effects of PTAs on trade flows raises issues of endogeneity. Furthermore, given the specific set-up of our analysis, we cannot employ the standard approach using country-pair fixed effects to deal with this issue. Yet in our particular setting, we argue that endogeneity should not significantly affect our findings. The major part of our analysis relies on a within firm analysis that evaluates whether for firms already in business before CAFTA-DR entered into force the extensive and the intensive margin of trade have changed. Hence we carefully restrict most of our analysis to those firms serving both the US and other non-PTA markets to evaluate keeping all firm-level aspects constant how their trading pattern has changed with CAFTA-DR entering into force. Assuming reversed causality in this case would imply that the trading patterns of these firms had any specific influence on the likelihood of CAFTA-DR being negotiated or implemented, which we deem rather unlikely.
while the right panel shows the number of new firms starting to export in a given year. We can observe that both quantities noticeably increase after 2009. Figure 2 further differentiates between the various types of markets and while there is an increase in the number of firms for all markets, some seem to have profited more strongly than others calling for a differentiated analysis. Moreover, not all firms in our dataset continuously export. As Fig. 3 shows the majority of the firms in our sample, about 55%, export for one year only. About 13% of the firms export for two years and only about 3% of the firms in our sample, i.e., 481 firms in total, export over the whole time span of 15 years. 8 At this descriptive stage of the analysis, it is of course not possible to know whether the pattern displayed in Fig. 3 reflects a brief increase in the extensive margin as firms might have tried only once (and thus rather unsuccessfully) to export to the US market. As we distinguish in our analysis below between new export opportunities and the extension of already existing export ties we will be able to better understand this pattern. Moreover, the results of our firm level analysis at the industry level provides further indication of which industries have seen an increase or a reduction in the number of firms.
Consequently, our analysis of the extensive margin at the firm level begins with an evaluation of how the number of firms exporting to the US market has changed with CAFTA-DR entering into force and whether new firms have become able to export to the US. We rely on three types of dependent variables for this analysis: the overall number of firms per export market and year, the number of new firms per export market and year (defined by a firm that has not exported in the previous year), and the proportion of firms exporting to the US. Furthermore, as discussed in detail above, we focus our comparison on those markets that have not seen trade liberalization, i.e., markets without a PTA in force, and the US market. In all of the below analyses, our unit of analysis is the countryyear. To control for potential confounders at the national level, such as geographic distance, cultural proximity etc., we employ country-level fixed effects in all regressions.
Since CAFTA-DR entered into force in 2009 we compare the year 2008 with all years following CAFTA-DR, i.e., 2009 (Model 1) to 2014 (Model 6). Finally, Model (7) evaluates the average effects in that it compares the average number of firms per export markets from 2000 to 2008 with the average number between 2009 and 2014. Due to our dependent variable being a count variable we use Poisson regression models. The results displayed in Table 4 show that for most years the results correspond to our theoretical expectations: While the US market in general attracts more firms than other non-PTA markets there is a significant increase in the number of firms associated with the entering into force of the agreement for the years 2010 to 2014. This suggests that with CAFTA-DR new firms were able to reap the benefits of exporting to the US market. Only if we consider the year directly after CAFTA-DR entered into force, 2009, and the model using average numbers do we obtain diverging results.
If we look at the number of new firms entering the US market after CAFTA-DR came into force, as displayed in Table 5, we again find support for our theoretical expectations. While the year directly following CAFTA-DR, 2009, again saw a  Robust standard errors in parentheses; *** p < 0.01, ** p < 0.05, * p < 0.1 reduction in the number of new firms, all following years are characterized by a significant increase. This is also true for Model (7) using the average numbers of new firms. Hence CAFTA-DR seems to have had a positive effect on the firm-level extensive margin as both the overall number of firms as well as the number of new firms has increased. Thus CAFTA-DR seems to provide export opportunities for additional firms not previously exporting to the US market. However, if we look at the proportion of all Costa Rican firms exporting to the US (i.e., the number of firms exporting to the US divided by the total number of firms exporting), see Table 6, the picture changes completely: While overall the US market attracted a larger share of Costa Rican exporters, this share has significantly decreased over the entire time span since CAFTA-DR has entered into force. This suggests that although new firms were able to access the US market, other markets were even more attractive for Costa Rican exporters resulting in a decreasing share of Costa Rican firms exporting to the US.
Turning from these aggregated effects to a more disaggregate analysis, Fig. 4 shows how the number of firms has changed for the US market with CAFTA-DR in force at the industry level. Each panel of Fig. 4 displays for each HS1 level the coefficient of the interaction effect between the US market and the corresponding year after CAFTA-DR entered into force as well as the 95% confidence interval. 9 The results in Fig. 4 show that at least from 2010 onwards several industries have gained with CAFTA-DR entering into force. The mineral products, headgear/footwear, stone/glass and metals industries all saw an increase in the overall number of firms. With respect to the number of new firms entering the US market the picture is even more positive as almost all industries have gained and especially so for the animal and animal products industry (HS codes 1-5). The corresponding Fig. 7 is provided in the Appendix.
Figure shows coefficients and 95% confidence intervals of the interaction effect between US market and CAFTA-DR dummies based on HS1 level regressions. The  Robust standard errors in parentheses clustered at the country level; *** p < 0.01, ** p < 0.05, * p < 0.1 Fig. 4 Effect of CAFTA-DR on US market by industry (HS1 level)

Within firm analysis extensive margin: Number of products
In this part of the analysis, we still evaluate the effect of CAFTA-DR on the extensive margin, yet, we further disaggregate as now the focus is on the number of products. In all of our analyses below, we opt for a within firm design using firm level fixed effect regression models. This implies that for each firm exporting to the US before CAFTA-DR entered into force we assess how many different products, measured at the HS10 level, it exports to the US market compared to other non-liberalized markets. To allow for a meaningful comparison, we further impose the following restrictions. We exclude those firms that export only to the US market since for these firms we cannot compare how their export portfolio has changed with CAFTA-DR entering into force since our analysis relies on within firm variation. Furthermore, we exclude those firms that stopped exporting before 2008 since their exit from business should be unrelated to CAFTA-DR. We also provide identical analyses using the number of new products per firm (defined as a product that this firm has not exported to this market in the previous year). Due to space constraints the corresponding regression tables using the number of new products as dependent variable are displayed in the Appendix.
The results in Table 7 provide clear support for our theoretical expectations. Both the overall number of products as well as the number of new products (which is displayed in Table 18 in the Appendix) significantly increases with CAFTA-DR entering into force. Hence firms exporting to the US already in 2008 could increase their set of products in all years following the trade agreement.
However, the results in Table 7 hide some important industry level variation as not all industries saw an increase in the extensive margin, as displayed in Fig. 5, which is constructed identically to Fig. 4 above. 10 The results show that several industries even saw a decrease in the extensive margin at the product level, such as animal and animal products, vegetable products, foodstuffs and for some years the chemicals and textiles industries. On the other hand, industries that were able to gain at the extensive margin were the mineral products, plastics and rubbers, metals, machinery/electrical, transportation as well as the miscellaneous category industries. Given these heterogeneous effects at the industry level the question arises whether the winning respectively losing industries at the extensive margin have in common that their products are mostly differentiated or rather homogenous. Hence we condition our analysis in the next step on our measure on product differentiation. To take into account that the extensive margin should react differently if a product is differentiated or not, Table 8 includes our measure on product differentiation at the HS2 level based on Rauch (1999). In particular, we count the number of products by firm at the HS2 level to be able to interact this with the measure on product differentiation. Our main quantity of interest in Table 8 is therefore the interaction effect for the US market after CAFTA-DR entered into force for differentiated products, which corresponds to the last line in the regression table. We further include all lower types of interaction effects.
The results in Table 8 clearly support our theoretical expectations as the positive effect on the extensive margin at the product level only materializes for firms producing differentiated products (indicated by the positive and statistically significant interaction effect). 11 Hence with CAFTA-DR entering into force firms producing differentiated products seem to gain by exporting more varieties while firms producing homogenous products seem to lose at the extensive margin (as displayed by the negative coefficient on CAFTA-DR*US interaction effect).
In a final step, we differentiate in our analysis on the extensive margin whether firms are of large (more than 800 employees) or of small size. The results for small (Table 9) versus big firms (Table 10) provide for some unexpected findings. While we theoretically expected big firms to be able to better reap the gains from CAFTA-DR, it is the small firms that seem to benefit at the extensive margin instead. The positive effect for the interaction effect in Table 9 indicates that with CAFTA-DR entering into force Robust standard errors in parentheses clustered at country level; *** p < 0.01, ** p < 0.05, * p < 0.1 11 Again the results are almost identical if we use the number of new products by firm instead of the overall number of products, see Table 22 in the Appendix.
smaller firms were able to export more products to the US. In contrast, the results in Table 10 show that larger firms, in contrast, even display a decrease in the number of products for most years though not on average as Model (7) shows. 12

Analysis of firm level intensive margin
An analysis of the intensive margin at the firm level implies an evaluation of CAFTA-DR for those firms that have been in business before the agreement entered into force in 2009. Again, we rely on a within-firm design and evaluate for each firm serving the US market in the year 2008 how much its export volume to the US changed with CAFTA-DR in force compared to the same firms' export volume to non-PTA countries. Hence the unit of analysis is again the firm exporting to a specific market in year t. Our quantity of interest is thus ln V f,m,t , i.e., the logged volume of exports V for firm f to market m in year t. We again exclude exports to other PTA countries. A further complication arises for those firms exporting in 2008 but not exporting in any of the following years. Since in this year their export volume is zero the question arises how to treat these zero observations because of the log-scale of the dependent variable. We follow Santos Silva and Tenreyro (2006) and use a Poisson pseudo-maximumlikelihood method. 13 Using a Poisson model has two advantages over other approaches as it corrects for both the heteroscedasticity of the error term in regressions on trade flows and for the large amount of zero observations. To further limit the potential zeros in our dataset, we add in Model (8) a comparison of the averages before and after CAFTA-DR entered into force but excluding those firms exporting less than USD 5000 on average. Robust standard errors in parentheses clustered at country level; *** p < 0.01, ** p < 0.05, * p < 0.1 Table 11 displays the results using this specific approach. In all regressions, independent of their specification, the US market in general attracts more exports than other markets, yet, the interaction effect indicating the effect of CAFTA-DR on the US market is insignificant in all models. Hence so far we do not observe a significant effect of CAFTA-DR on the intensive margin of trade.
In line with our analyses on the extensive margin above, our next step is to differentiate by industries. The results are displayed in Fig. 6, which again corresponds in its set-up to Figs. 4 and 5 above. 14 In contrast to the results on the extensive margin, only few industries clearly gain or lose at the intensive margin. The industries that gain on the intensive margin at least for certain years are footwear and headgear, transportation and chemicals. Even fewer industries seem to lose on the intensive margin of trade, such as raw hides, skins, leather and furs or mineral products for some years. However, the majority of industries do not see any significant movement after CAFTA-DR entered into force. One reason for why we might see so few significant results at the intensive margin is that some industries might conflate rather homogenous and differentiated goods. Hence as a next step and in line with our theoretical expectations on the varying effects of trade agreements at the extensive and intensive margin for differentiated vs. homogenous goods we need to evaluate these two aspects separately.  Table 23.  Robust standard errors in parentheses; *** p < 0.01, ** p < 0.05, * p < 0.1 Fig. 6 Within firm trade volume by industry Table 12 thus shows the results conditioning on the degree of product differentiation. The coefficients on the final interaction term are, with the exception of Model 1 evaluating the year 2009, not statistically significant. Hence the results are in line with the theoretical underpinning that the intensive margin should react little or not at all to trade liberalization in case of differentiated goods. In contrast, the interaction effect between CAFTA*US is positive and statistically significant for most years. Hence for homogenous products exported to the US market after CAFTA-DR entered into force (which precisely corresponds to this interaction effect) we observe an increase at the intensive margin. This implies that while firms exporting differentiated products saw no effect or even a decline in their export volume to the US, firms exporting homogenous goods were able to increase their exports.
However, interpreting solely the coefficient of the interaction term between CAFTA*US does not tell us whether this effect pertains to trade creation or trade diversion. Hence it might be that the increase in volume, which we observe for the US for homogenous products implies that this comes at the price of other countries receiving less of these products. If we consider the coefficient on CAFTA year in Table 12, which measures the change in the volume of homogenous goods to other PTAs, we observe a negative sign. This suggests that the increase at the intensive margin for homogenous goods to the US market do indeed come at the cost of diverting trade in these goods away from other non-PTA members.
In a final step, we condition our analysis of the intensive margin on employment, as displayed in Tables 13 and 14. This time we observe almost the opposite picture as for the extensive margin above. While the interaction effects are mostly insignificant for Robust standard errors in parentheses; *** p < 0.01, ** p < 0.05, * p < 0.1 Trade at the margin: Estimating the economic implications of... both small and big firms, the sign has flipped: it is the small firms that seem to lose on the intensive margin whereas the big firms tend to gain (though not statistically so). Hence while small firms are able to export more varieties following CAFTA-DR this seems to come at the price of a reduction in the volume of existing varieties. In contrast, big firms tend not to export more types of products but slightly more volume in their existing product categories.

Robustness checks
To provide some confidence in the robustness of our results, we provide two different sorts of robustness checks. First, we estimate our main models on the product-level extensive and intensive margin including product specifications for all years for which we have data, i.e., from 2000 to 2014 (see Appendix Tables 24 and 26). In particular, these models follow the same set-up as in Tables 8 and 12 above in that they include all interaction effects accounting for product differentiation. Furthermore, these models not only include country and firm level fixed effects but also year fixed effects. The results as displayed in Tables 24 and 26 are identical to our findings obtained by comparing all years separately as displayed in Tables 8 and 12. Hence by including this longer time horizon the models provide confidence that our results are not sensitive to our selected baseline year and therefore not driven by anticipation effects of CAFTA-DR. Second, we include tariff data in our main specification as presented in Tables 8 and  12 above to control for the specific content of CAFTA-DR (see Appendix Tables 25  and 27). Since we compare in our analyses the US with other non-PTA markets we created a variable that contains the MFN tariff for all non-PTA countries for all years. For the US this variable also contains MFN tariffs before CAFTA-DR entered into Robust standard errors in parentheses; *** p < 0.01, ** p < 0.05, * p < 0.1 Robust standard errors in parentheses; *** p < 0.01, ** p < 0.05, * p < 0.1 Trade at the margin: Estimating the economic implications of... force and it contains the specific tariff lines as agreed in CAFTA-DR for all following years. 15 Given that our product-level data is more disaggregated than the tariff data the number of observations in Tables 25 and 27 is less than the number of observations in our original models. This is also the main reason why we refrain from including tariff data in all our specification. The results in Tables 25 and 27 support our main findings. The results for the extensive margin show that for most years under analysis it is mainly the exporters of differentiated goods that can increase their product portfolio. This becomes mostly apparent in the model specification using averages. The results on the intensive margin are completely identical to the results discussed above and therefore provide strong support that it is mainly the exporters of homogenous products that are able to reap the benefits of trade liberalization at the intensive margin.

Discussion and conclusion
What are the distributional consequences of preferential trade agreements (PTAs)? According to models of new, new trade theory (Melitz 2003) trade liberalization benefits not all firms within industries equally but more productive and thus mostly large firms have clear advantages when competing in foreign markets and thus reaping the benefits attached to trade liberalization. In addition to the question which firms gain most from trade liberalization, a hitherto unanswered question in the context of preferential trade liberalization is whether trade agreements mainly benefit those firms that were already able to serve foreign markets by expanding the volume of existing trade, thus increasing the intensive margin of trade, or whether trade agreements also expand the set of exporting firms and products, thus increasing the extensive margin of trade?
The results of our study suggest that the economic effects of one such trade agreement, the Dominican Republic-Central America-United States Free Trade Agreement (CAFTA-DR), are rather heterogeneous depending on both the margin of trade as well as the type of the firm and especially the product under analysis. In particular, our findings suggest that although CAFTA-DR allowed new firms to enter the US market and the overall number of firms exporting to the US market increased with CAFTA-DR entering into force, the proportion of firms exporting to the US relative to other markets has declined. Hence while the absolute attractiveness of the US market for Costa Rican firms seems to have increased with more firms using the opportunities that came with CAFTA-DR to export to the US market, the relative importance of the US market vis-à-vis other non-PTA markets, which for example in the case of our analysis includes China, seems to have decreased.
Turning to the product level, our within firm analysis shows while CAFTA-DR had no significant unconditional effect at the intensive margin of trade the agreement had a positive effect on the extensive margin for all firms. Hence CAFTA-DR allowed firms to increase the varieties of products that they export to the US market. Yet, while on average all firms were able to export more products to the US market after 2009, there are underlying distributional effects. First and in contrast to the findings of other studies (e.g., Baccini et al. 2017), it is mainly small firms that were able to profit from this expansion on the extensive margin. Second, and clearly supporting our theoretical arguments on product differentiation, the effect of CAFTA-DR depends on the type of product: Firms producing differentiated products tend to gain by exporting more varieties while firms producing homogenous products do not. This pattern is completely reversed if we evaluate the intensive margin of trade. While overall we do not observe any significant effect on the intensive margin, firms exporting homogenous goods were able to increase their exports while firms exporting differentiated products saw no effect or even a decline in their export volume to the US. Hence firms producing homogenous goods seem to clearly profit from CAFTA-DR in that they can export even more of the same products they have already exported. Following Chaney (2008) the reasoning for this finding is that the demand of homogenous goods is very sensitive to trade barriers. In contrast, the demand for differentiated goods is less sensitive to trade barriers implying that for these types of products we should see little reaction at the intensive margin, exactly as our findings suggest. However, the very same logic suggests that new firms can enter more easily in the case of differentiated goods and we therefore see an increase in the extensive margin.
While it was long clear that the distributional consequences of trade liberalization are heterogeneous, the literature on the effects of PTAs has only recently started to analyze such effects not only between but also within industries (e.g., Baccini et al. 2017). Our study adds to this nascent literature, as our disaggregated firm-product level data enables us to study the effects of CAFTA-DR on the extensive and the intensive margin both at the firm and at the product level. Yet our findings have further implications than simply providing new empirical evidence on the distributional consequences of preferential trade liberalization. Our findings suggest that depending on the type of product (homogenous vs. differentiated) the benefits from trade liberalization materialize differently and this should have implications for the coalitions of trade supporters. For those firms producing homogenous goods, such as primary commodities, the benefits seem to be concentrated on those firms already exporting before trade has been liberalized as these firms mainly see an increase in the intensive margin of trade. Hence these firms probably know well in advance of the benefits coming along with trade liberalization and might lobby accordingly. As these firms should also be larger in size their voice in the trade liberalization process might well sound loud (see also Osgood et al. 2017 on this point). In contrast, the benefits of trade liberalization for differentiated products seem more diffuse. As producers of differentiated products do not seem to gain at the intensive margin, i.e., they do not see an increase in their existing volume of trade, but mainly at the extensive margin, i.e., new types of products and new firms enter the market, coordinated action for producers of differentiated goods might be a more difficult enterprise.
In addition to a better understanding the distributional effects of trade liberalization between firms, this paper fills another gap in the literature, which so far mainly deals with the economic effects of PTAs for industrialized countries. Yet over the last decades more and more developing and emerging market economies have started to negotiate PTAs rendering it important to better understand the impact of PTAs on such economies. The example of Costa Rica shows that the effects of trade agreements on the extensive and the intensive margin of trade seem to closely correspond to the patterns as expected by theoretical models on this topic (Chaney 2008) in that the extensive margin reacts more strongly for differentiated products and the intensive margin for homogenous products. Whether these findings also hold for other emerging economies could be an avenue for future research. Overall our findings for Costa Rica seem to suggest a trade-off: while firms, especially those exporting differentiated products, can profit from trade agreements by enlarging their portfolio of products, this implies at the same time an increased competition for all other exporters. As a consequence, the intensive margin, i.e., the volume of trade, tends to decrease. And the exact opposite tends to happen for more homogenous goods implying that agreements cannot deliver both increased volume and more products for all types of goods. Table 15 lists the top export markets for Costa Rican products. With the exception of the various EU markets, the most important trading partners can be found in close vicinity of Costa Rica. Nicaragua, Guatemala, Panama, El Salvador, Honduras, Mexico as well as the Dominican Republic are among the most important trading partners. Over the entire time period, the top one export market in terms of export volume stayed the same, namely the United States. Interestingly, from 2005 onwards and thus clearly preceding the China-Costa Rica PTA entering into force in 2011, one can observe the rise of Hong Kong and China as important export markets for the Costa Rican economy. Already in 2005, Hong Kong has become the second biggest export market in terms of export volume.      Robust standard errors in parentheses; *** p < 0.01, ** p < 0.05, * p < 0.1   Robust standard errors in parentheses clustered at country level; *** p < 0.01, ** p < 0.05, * p < 0.1 Trade at the margin: Estimating the economic implications of...       Robust standard errors in parentheses clustered at country level; *** p < 0.01, ** p < 0.05, * p < 0.1 Robust standard errors in parentheses clustered at country level; *** p < 0.01, ** p < 0.05, * p < 0.1 Robust standard errors in parentheses clustered at country level; *** p < 0.01, ** p < 0.05, * p < 0.1 ( 3 )   Robust standard errors in parentheses; *** p < 0.01, ** p < 0.05, * p < 0.1 Robust standard errors in parentheses clustered at country level; *** p < 0.01, ** p < 0.05, * p < 0.1 Robust standard errors in parentheses clustered at country level; *** p < 0.01, ** p < 0.05, * p < 0.1