Trade, Domestic Frictions, and Scale Effects

Because of scale effects, idea-based growth models have the counterfactual implication that larger countries should be much richer than smaller ones. New trade models share this same problematic feature: although small countries gain more from trade than large ones, this is not strong enough to offset the underlying scale effects. In fact, new trade models exhibit other counterfactual implications associated with scale effects – in particular, domestic trade shares and relative income levels increase too steeply with country size. We argue that these implications are largely a result of the standard assumption that countries are fully integrated domestically, as if they were a single dot in space. We depart from this assumption by treating countries as collections of regions that face positive costs to trade amongst themselves. The resulting model is largely consistent with the data. For example, for a small and rich country like Denmark, our calibrated model implies a real per-capita income of 81 percent the United States’s, much closer to the data (94 percent) than the trade model with no domestic frictions (40 percent).


Introduction
Scale effects are so central a feature of innovation-led growth theory that, in Jones's (2005) words, "rejecting one is largely equivalent to rejecting the other." Because of scale effects, idea-based growth models such as Jones (1995) and Kortum (1997) imply that larger countries should be richer than smaller ones. 1 There is some disagreement in the literature on whether such scale effects are present in the data, but it is safe to say that they are very small compared to those implied by the theory. 2 New trade models such as Krugman (1980), Eaton and Kortum (2001) and Melitz (2003) are also idea-based models, and carry the same counterfactual implication that real income per capita strongly increases with country size. 3 One might expect scale effects in such models to be offset by the fact that small countries tend to gain more from trade than large ones. It turns out, however, that although small countries do gain more from trade, these gains are not large enough to neutralize the underlying scale effects. In fact, new trade models exhibit other counterfactual implications associated with scale effects -in particular, domestic trade shares and relative income levels increase too steeply with country size.
Our paper argues that these counterfactual scale effects are largely a result of the crude way in which geography has been treated in these growth and trade models. The usual assumption is that countries are fully integrated domestically, as if they were a single dot in space. We depart from this assumption by treating countries as a group of regions that share a common labor market while facing positive costs to trade amongst themselves. We study the qualitative and quantitative implications of these domestic frictions, and show that they partially offset the scale effects present in the model, leading to a better match with the data.
Previous literature has highlighted the importance of domestic trade costs. For the United States, Hilberry and Hummels (2008) find that manufacturing shipments between establishments in the same zip-code are three times larger than between establishments in different zip codes. Agnosteva, Anderson, and Yotov (2013) calculate domestic trade costs for inter-provincial trade in Canada to be 109 percent, while Tombe and Winter (2014) find domestic trade costs within the United States, Canada, and China, between 100 and 140 percent. The calibrated model of domestic trade and economic geography by Allen and Arkolakis (2014) implies average trade costs between metropolitan areas of the United States of 55 percent.
Section 2 presents the model and studies the implications of domestic frictions at a theoretical level. We build on the Eaton and Kortum (2002) model-henceforth EK-at the level of regions and then focus on the country-level implications. We assume that there is full labor mobility across regions within countries and that workers have heterogeneous productivity across regions. Specifically, each worker independently draws his or her productivity in each region from a given distribution. Not surprisingly, if there are no domestic frictions, our model is isomorphic to EK in terms of trade flows and real income levels. In the presence of domestic frictions, the behavior of the model depends on whether regions within each country are symmetric or asymmetric.
If regions are symmetric, the model displays the same gravity equation for countrylevel trade flows as in EK, and country-level gains from trade can be computed using the formula in Arkolakis, Costinot, and Rodriguez-Clare (2012)-henceforth, the ACR formula. These two results no longer hold when regions are asymmetric, but we establish two useful results for this case. First, if international trade costs are compatible with a hub-and-spoke structure then country-level trade flows satisfy a gravity equation that is similar to the one in EK (and Anderson and van Wincoop, 2003), except that multilateral resistance terms have to be constructed as averages of region-level variables. Second, we provide a generalization of the ACR formula to the case of multi-region countries with domestic frictions. As in Redding (2014), computing gains from trade now requires trade shares between all regions of the country rather than just a country-level measure of the domestic trade share. Section 3 focuses on scale effects. We start by allowing technology levels, which were assumed exogenous in Section 2, to be proportional to the size of the economy, as in Krugman (1980), Eaton and Kortum (2001) and Melitz (2003). We show that this assumption leads to aggregate economies of scale which are (partially) offset by the presence of domestic frictions. Intuitively, to the extent that large countries are composed of more regions, trade costs among regions reduce the advantage of country size and weaken scale effects.
Section 4 calibrates the model using data on population and geography for 287 metropoli-tan areas, international trade flows for 26 OECD countries, and intra-national trade flows for the United States. We calibrate the key parameter determining the strength of economies of scale by appealing to the growth and trade literatures, as well as cross-country estimates of scale effects. Trade costs between regions, both within and across countries, are estimated from distance data between metropolitan areas.
The calibration reveals that domestic frictions greatly improve the fit of the trade model with the data. In particular, domestic frictions cut in half the model's implied elasticity of productivity with respect to country size, getting closer to the small elasticity we observe in the data. To illustrate this result, consider the case of Denmark. Given its small size relative to the United States, the model with no domestic frictions implies that its productivity level would be 38 percent of the US level while in the data this is 94 percent. In contrast, our calibrated model implies a relative productivity level for Denmark of 81. Domestic frictions also make the model better match observed import shares, relative income levels, and prices.
Section 5 compares the implications of the calibrated model to those of a simpler model with domestic frictions but symmetric regions. The symmetric model is quite attractive because it retains many of the convenient features of EK, including the standard country-level gravity equation and the validity of the ACR formula for the gains from trade, and yet it does a better job in matching the data than EK thanks to the presence of domestic frictions. We find that the symmetric model approximates quite well the calibrated model and conclude that the model with symmetric regions and domestic frictions strikes a good balance between the convenience of the gravity model with no domestic frictions and the goodness of fit of the general model as calibrated in Section 4.
Our paper makes a contribution to an emerging literature exploring the interaction between international trade and domestic economic geography using quantitative modelssee Redding (2014), Fajgelbaum and Redding (2014), and Cosar and Fajgelbaum (2014). Of these papers, the closest to ours is Redding (2014), who also extends the EK model by having countries as collections of regions sharing a single labor market. Redding (2014) focuses on the gains from trade at the region level, and shows that such gains differ from the ACR formula because of the presence of congestion effects. In our model there are no congestion effects and region-level gains from trade are still given by the ACR formula. More importantly, our focus is on trade flows and real wages at the level of countries rather than regions. In particular, we quantify the extent to which domestic frictions improve the fit of the standard trade model with the country-level data, devoting special attention to scale effects.
Our paper is related to a literature that studies the relationship between country size, openness, and productivity. Jones (2005) discusses the implications of alternative growth models for scale effects. Anderson and van Wincoop (2003) and Anderson and Yotov (2010) show that in a standard gravity model, under some special conditions, home bias increases with country size, leading to lower import shares for larger countries. At the empirical level, Redding and Venables (2004) and Head and Mayer (2011) show that income increases with a measure of "market potential," which is increasing in country size, while Ades and Glaeser (1999), Alesina, Spolaore, and Wacziarg (2000), Frankel and Romer (1999), and Alcala and Ciccone (2004) document a positive effect of country size and trade openness on income levels. Other papers fail to find a positive effect of country size on productivity -see Rose (2006). Our contribution to this literature is to show that, relative to the data, country-level scale effects are too strong in models without domestic trade costs, and that adding these costs allows the model to better matches the observed relationship between country size and productivity, import shares, relative income levels, and prices. 4 Alvarez and Lucas (2007) and Waugh (2010) calibrate an Eaton and Kortum (2002) model to match observed trade flows and cross-country income levels. Both of these calibrations assume that there are no domestic trade costs, but allow technology levels to vary across countries. In fact, strong scale effects are avoided in these two calibrated models by having technology levels that decrease rapidly with country size. Since it is hard to defend such systematic variation in the level of technologies, we calibrate the technology parameters to observed R&D intensities, which do not vary systematically with size in our sample of OECD countries.
We acknowledge that small countries can avoid the disadvantage of their size by using foreign ideas. Loosely speaking, technology levels vary less than proportionally with country size if countries share ideas through technology diffusion, and this will weaken country-level scale effects. In a working-paper version of this paper we have explored the robustness of our results to allowing for one particular channel for international technology diffusion, namely multinational production. 5 The benefit of focusing on this channel is that multinational production in the model can be mapped directly to data (Ramondo and Rodriguez-Clare, 2013). We find that our results are robust to this extension: scale effects are too strong in a model with trade and multinational production, but adding domestic frictions significantly decreases the gap between model and data. In the Con- 4 When estimating market potential, Redding and Venables (2004) and Head and Mayer (2011) recognized the importance of domestic frictions and estimated gravity equations that include the domestic trade pair and a measure of internal distance (e.g., a transformation of country area) to proxy for domestic trade costs. They did not explore, however, the role of domestic frictions on cross-country income levels and import shares. 5 See Ramondo, Rodríguez-Clare, and Saborío-Rodríguez (2012). clusion we briefly discuss the challenges in allowing for other channels for international technology diffusion.

Model
In this section we present a trade model in which countries are defined as collections of economies sharing a single labor market. We start with the Ricardian trade model developed by Eaton

Set up
There are M subnational economies, or "regions", indexed by m and N countries indexed by n. Let Ω n be the set of regions belonging to country n and M n be the number of regions in that set. Labor is the only factor of production, available in quantity L n in country n.
There is a continuum of goods in the interval [0, 1], and preferences are CES with elasticity of substitution σ. Technologies are linear with good-specific productivities in region m drawn from a Fréchet distribution with parameters θ > σ − 1 and T m . These draws are independent across goods and across countries. There are iceberg trade costs d mk ≥ 1 to export from k to m, with d mm = 1 and d mk ≤ d ml d lk for all m, l, k (triangular inequality). There is perfect competition.
There is perfect labor mobility within countries, but workers have heterogeneous productivity across regions. We model this heterogeneity by assuming that each worker in country n draws an efficiency parameter z m in each region m ∈ Ω n from a Fréchet distribution with parameters κ > 1 and A m . These draws are independent across workers and across regions.
In this section we treat technology levels T m as exogeneous and show that these technology levels along with trade costs and the A m parameters determine the location of workers within each country. For the purposes of this section, we could have assumed that workers were homogeneous, in which case technology levels and trade costs alone would determine the equilibrium location of workers. We introduce worker heterogeneity because this will be critical to have a non-degenerate spatial equilibrium when we allow for scale effects in Section 3. In that section we make technology levels endogeneous to population by assuming that T m scales up proportionally with population in region m. Under that assumption, but without heterogeneity (i.e., with κ → ∞), all workers would tend to move to a single region. 6

Equilibrium
Bilateral trade flows between regions satisfy the standard expression in the EK model, where w k is the wage per efficiency unit in region k and X m ≡ k X mk is total expenditure in region m. In turn, price indices are where µ ≡ Γ( 1−σ θ + 1) 1/(σ−1) > 0. Workers choose to live in the region where their real income is highest. A worker in country n with productivity z m for each m ∈ Ω n chooses to live in m if and only if z m w m /P m ≤ z m w m /P m for all m ∈ Ω n . 7 The following lemma characterizes the equilibrium allocation of workers to regions. Lemma 1. The share of workers in country n that locates in region m ∈ Ω n is 6 An alternative and perhaps more standard approach in the literature is to assume that there is a fixed supply of "housing" in each region-see Helpman (1998) and Redding (2014). We chose worker heterogeneity rather than housing because it is more suitable to be integrated into the EK framework. 7 If z m w m /P m = z m w m /P m , the worker is indifferent between m and m. We ignore this possibility since it is a measure-zero event that has no impact on the equilibrium variables. where while the total efficiency units of labor supplied in region m are Equation (3) reveals that the labor supply to each region has an elasticity of κ. The case of homogeneous workers arises in the limit as κ → ∞, which implies that the labor supply to each region becomes perfectly elastic. 8 The equilibrium is determined by combining the labor supply determined in Lemma 1 with the labor demand coming from the EK side of the model. Trade balance at the region level implies X m = w m E m , so the labor market clearing condition in region m entails Combined with (2)-(5), this constitutes a system that we can solve to determine equilibrium wages, which in turn can be used to solve for the remaining equilibrium variables. Now we introduce some additional notation to keep track of country-level variables. Let X nj ≡ k∈Ω j m∈Ωn X mk denote total trade flows from country j to country n, X n ≡ m∈Ωn X m total income and expenditure in country n, and w n ≡ X n /L n the average nominal income per worker in country n.
The expected real income of workers in country n (before the z s are realized) is given by γV n . This result simply follows by noting that the expected nominal income of workers that choose region m ∈ Ω n is w m E m /(L n π m ) = γV n P m , hence the expected real income of these and all workers in country n is γV n . This will be our measure of country-level welfare.

Frictionless Domestic Trade
We start by considering the special case in which there are no domestic trade costs, that is, d mk = 1 for all m, k ∈ Ω n . By the triangular inequality, this implies that d mk = d m k for all m, m ∈ Ω n and k, k ∈ Ω i (i.e., international trade costs are the same for all regions within a country). The absence of domestic trade costs implies that P m = P k for all m, k ∈ Ω n . Combined with the results in Lemma 1 and the expression in (6), it is easy to establish the following proposition. Proposition 1. If d mk = 1 for all m, k ∈ Ω n , population shares across regions within countries are unaffected by trade and given by Country-level trade shares and price indices are and where T i is a country-level technology parameter given by and τ ni ≡ d mk for m ∈ Ω n and k ∈ Ω i for n = i, with τ nn = 1, are the country-level trade costs. Country-level welfare is given by The expression in (12) is exactly the one for real wages in the EK model. In fact, under frictionless domestic trade, our model is isomorphic to the EK model, despite the fact that countries are a collection of heterogenous regions.

Symmetric Regions
Now we assume that regions within countries are symmetric:

A1. [Symmetry]
A m = A m and T m = T m for all m, m ∈ Ω n , and d mk = d m k for all m, m ∈ Ω n and k, k ∈ Ω i .
As we formally prove in the next proposition, this assumption implies that, at the country-level, the symmetric model with domestic trade costs is isomorphic to the EK model of trade with the only exception that the trade cost of a country with itself is a function of its size, given by the number of regions M n , and the iceberg trade cost among different regions belonging to that country, which we denote by δ n . Proposition 2. Under A1, country-level trade shares and price indices are as in (8) and (9), respectively, with and τ ni as in (11), and where δ n ≡ d mk for m = k with m, k ∈ Ω n . In addition, country-level welfare is The key departure from the standard case in Proposition 1 is caused by the presence of trade costs between regions belonging to the same country, δ n > 1, which in our model leads to positive domestic trade costs given by (14). According to Proposition 2, these domestic trade costs are a weighted power mean with exponent −θ of the cost of intraregional trade, which we assume is one, and the cost of trade between regions belonging to the same country δ n , with weights given by 1/M n and 1−1/M n . Notice that (14) implies that countries with the same δ n may have different τ nn because of their different size; in particular, larger countries would have larger domestic trade costs.

Country-Level Gravity
Proposition 2 shows that A1 is sufficient for the model to exhibit a standard gravity equation. But A1 is not necessary for that: the following assumption departs from symmetry but still ensures that country level trade flows satisfy the gravity equation, as we show below.

A2. [Hub and Spoke System for International Trade]
For all j = n, if k ∈ Ω j and m ∈ Ω n then d mk = ν m τ nj ν k .
This assumption states that all international trade is done through a single location (e.g., a port) in each country, but it does not impose any restriction on domestic trade costs d mk for m, k ∈ Ω n , except those associated with the triangular inequality, d mk ≤ ν m ν k . 9 Proposition 3. Under A2, country-level trade shares are, for n = i, where Equation (16) implies that, under A2, the parameter θ is the trade elasticity for countrylevel trade flows, just as in the EK model. Thus, given some measure of trade costs τ ni , we can still estimate parameter θ from an OLS regression with exporter and importer fixed effects using country-level trade flows. 10 It is useful to compare (16) with the analogous equation from the EK model where each country is composed of a single region. In that case, with δ k = 1 for all k, (16) collapses to In this equation, the importer fixed effect captures an inward multilateral resistance term (i.e., the price index), while the exporter fixed effect captures the product of an exogenous technology level and an endogenous outward multilateral resistance term. With multiregion countries, as in (16), the fixed effects have a more subtle connection to the equilibrium variables. The importer fixed effect, Φ n , can be seen as the weighted average of the multilateral resistance term of the different regions inside the country, with weights given by GDP shares. The exporter fixed effect captures the product of an endogenous outward multilateral resistance term, w −θ i , and a technology level that is a weighted average of the regional technology parameters T k with endogenous weights given by (w k / w i ) −θ ν −θ k .

Gains from Trade
We define the country-level gains from trade as the increase in welfare that results from moving from autarky to the trade equilibrium. With no domestic trade costs or under A1, these gains are a simple formula of the domestic trade share, λ nn , and the trade elasticity, θ: This formula does not hold in the presence of domestic trade costs when A1 is violated. In this case, to obtain country-level gains from trade, we need to use the model to compute the counterfactual equilibrium under autarky. We proceed as in Dekle, Eaton and Kortum (2007) and computex = x /x, with x being the variable x in the counterfactual equilibrium and x being the same variable in the observed equilibrium.
For the next proposition, we need to introduce notation for region-level trade shares:

Proposition 4.
Withd mk = ∞ for m = k andd mk = 1 for m = k, m, k ∈ Ω n , the countrylevel gains from trade are given by whereψ mm is given byψ andŵ m is given by the solution to the system One implication of Proposition 4 is that, with no domestic trade costs or with domestic trade costs and A1, the gains from trade collapse to the expression in (17). For the general case, Proposition 4 implies that to compute the gains from trade for country n one only needs data for that country. In particular, the system in (20) can be solved forŵ m for m ∈ Ω n for some particular country n given data on region-level trade shares ψ km for all k, m ∈ Ω n and region-level expenditure shares X m for all m ∈ Ω n . 11 11 As shown in the proof of Proposition 4, the real wage change for region m satisfiesŵ m /P m =ψ −1/θ mm . This is different from the result in Redding (2014), whereŵ m /P m depends onψ −1/θ mm as well as the welfare We are interested in comparing GT n obtained in this way with the gains from trade computed directly (and incorrectly) using country-level trade data and (17), which is the standard formula for the gains from trade in EK and other gravity models, as shown by Arkolakis et al. (2012). Data on trade flows between regions are available for Canada and the United States-see Anderson and Van Wincoop (2003) and Redding (2014). Hence, we can compute the gains from trade for those two countries applying the results of Proposition 4. We set θ = 4 and κ = 1.4, as explained in Section 4. The gains from trade for the United States computed using Proposition 4 are 0.67 percent, while the ones computed using (17) are 0.77 percent; for Canada the analogous numbers are 6.35 and 6.48 percent. 12 These results show that the expression in (17) yields a good approximation of the "exact" gains from trade associated with the multi-region model. The gains calculated using (17) are a direct result of the domestic trade share (λ nn ) decreasing by three percent (i.e. from one to 0.97) for the United States, and 22 percent (i.e. from one to 0.78) for Canada. The gains coming from applying Proposition 4 are a result of all regions, as expected, becoming more open, and hence, increasing their real wage. The change in the degree of regional openness, however, is heterogenous across regions in a country, ranging from a decrease in ψ mm of almost six percent to less than half a percent for the United States, and from 33 to 17 percent for Canada. If all regions were alike, each of them would experience the same decrease in the share of intra-regional trade, which would be the same as the country-level domestic trade share.
Unfortunately, the necessary data to follow the procedure suggested by Proposition 4 are not available for countries other than the United States and Canada. Armed with the calibrated model, in Section 4, we compute the exact gains from trade for all countries in our sample and compare with the results coming from (17).

Scale Effects
In the previous Section we treated the technology parameters T m as exogenous. In this Section we first argue that technology levels should be allowed to depend positively on the size of the region; we then show that this dependency leads to aggregate economies of scale; and finally we study how the strength of such scale effects are affected by domestic trade costs.
It is natural to expect larger regions to have better technologies. Suppose that we effect of migration in or out of region m through congestion effects. merged two identical regions with technology parameter T into a single region. It is easy to show that the new region would have a technology parameter 2T . 13 Thus, everything else equal, if a region m is twice as large as region k, then T m = 2T k . Since labor is the only factor of production in our model, it is natural to use the number of workers to measure the size of a region, and hence to expect T m to be proportional to π m L n . 14 This relation between technology levels and population was derived formally by Eaton and Kortum (2001) in a model of endogenous innovation and Bertrand competition, and it also emerges naturally in trade models with monopolistic competition, as we discuss below. This leads us to the following assumption:

A3. [Technology Scales with Population]
T m = φ n π m L n for all m ∈ Ω n .
We allow φ n to vary with n to reflect differences in "innovation intensity" across countries. This parameter will be calibrated to R&D employment shares in the quantitative analysis. The important part of this assumption, however, is that technology levels are proportional to population.
As a parenthesis, we note here that equivalent formulations of our model in Section 2 plus A3 could be derived building on Krugman (1980) or Melitz (2003) rather than EK. 15 With Krugman (1980), all the results in Section 2 would hold replacing θ by σ − 1 (with σ being the elasticity of substitution), and A3 would follow immediately from the free entry condition combined with the standard assumption that the fixed cost of production is not systematically related to country size. With Melitz (2003), we would need to assume that the productivity distribution is Pareto, as in Chaney (2008). If the Pareto shape parameter is θ and either θ ≈ σ − 1, or the fixed cost of selling in market m is proportional to its population, π m L n , then again A3 would hold because of free entry.
Real wages in country n are also affected by the parameters A m for m ∈ Ω n . The following assumption ensures that these parameters can affect the labor allocation across regions but not their productivity:

A4. [Normalization of A s] m∈Ωn
Assumptions A3 and A4 lead to country-level scale effects: everything else equal, larger countries will exhibit higher real income levels. We can see this effect most clearly 13 This result follows from the fact that if x and y are distributed Fréchet with parameters θ and T x and T y , respectively, then max {x, y} is distributed Fréchet with parameters θ and T x + T y . 14 Formally, let a "technology" be a productivity ξ drawn from a Fréchet distribution with parameters θ and φ, and assume that the number of technologies per good is equal to the number of workers. It is then easy to show that the best technology for a good, max ξ, is distributed Fréchet with parameters θ and φπ m L n . 15 The Appendix shows the derivations.
in the case of no domestic trade costs. In this case, Proposition 1 combined with A3 and A4 implies that population shares across regions within countries are π m = A m . Combining this result with the definition of T n in (10) yields T n = φ n L n , which plugged into (12) reveals that the real wage is given by V n = µ (φ n L n ) 1/θ λ −1/θ nn . Thus, conditional on trade shares and innovation intensity, real income levels increase with country size with an elasticity 1/θ. This is because a larger population is linked to a higher stock of non-rival ideas (i.e., technologies), and more ideas imply a superior technology frontier. The strength of this effect is linked to the Fréchet parameter θ: the lower is θ, the higher is the dispersion of productivity draws from this distribution, and the more an increase in the stock of ideas improves the technology frontier. These are the aggregate economies of scale that play a critical role in semi-endogenous growth models (Kortum, 1997) and that underpin the gains from openness in EK-type models (see Eaton and Kortum, 2001;and Arkolakis et al., 2008).
In the rest of this section we study how domestic trade costs affect the strength of scale effects for the case in which regions within each country are fully symmetric, as captured by A1. This is the only case for which we can provide analytical results; in Section 4, we calibrate the model assuming A3 and A4, but no A1, and present quantitative results for the strength of scale effects on real and relative wages, and import shares.

Scale Effects with Exogenous Trade Shares
We start by providing results for real income levels taking trade shares as given.
Recall from Proposition 2 that under A1 the average real income per worker (henceforth, simply real wage) is determined by the country-level technology parameter, domestic trade costs, and the domestic trade share: V n = µ T 1/θ n τ −1 nn λ −1/θ nn . Under A3 and A4, we now have T m = φ n L n /M n and A m = 1/M n for all m ∈ Ω n , hence T n = φ n L n , so we can write There are four distinct forces that determine real wages across countries: innovation intensity, pure scale effects, domestic trade costs, and the gains from trade.
In the presence of domestic trade costs, economies of scale depend on how τ nn is affected by country size, L n . To derive sharper results, assume that size scales with the number of regions, L n = M nL , and δ n = δ, for all n. 16 Then all variation in τ nn comes from variation in the number of regions M n . In particular, τ nn is decreasing in country size, so domestic trade costs offset scale effects. More specifically, the strength of economies of scale adjusted by the presence of domestic frictions, conditional on trade shares, is given by ∂ ln V n /∂ ln L n = (1/θ)(δ/τ nn ) −θ : if δ = 1, then τ nn = 1 and ε = 1/θ; otherwise the term (δ/τ nn ) −θ is lower than one and offsets economies of scale, ε < 1/θ.
As a final remark, notice that, conditional on observed domestic and international trade shares, it is easy to explore the effect of the parameter θ on the real wage. Let O n ≡ λ −1 nn , and D n ≡ M nXnn / X nn whereX nn ≡ m∈ΩnXmm refers to total intra-region trade flows in country n . From (1) and (8), we get We can then rewrite (21), relative to the United States, as All the terms inside the bracket come from the data. Hence, it is easy to conclude that for countries with a lower real wage than the one for the United States, a higher θ increases the relative real wage towards one; the opposite is true for countries with a higher real wage than the one for the United States.

Scale Effects with Endogenous Trade Shares
We have so far focused on the implications of domestic trade costs on real wages conditional on domestic trade shares. To derive analytical results on the unconditional effects of country size in the presence of domestic trade costs, we need to impose some additional restrictions. In particular, we assume that international and domestic trade costs are uniform and that countries are symmetric in terms of their innovation intensity.

A5. [Uniform Trade Costs and Innovation
Intensity] δ n = δ for all n, τ ni = τ for all n = i and φ i = φ for all i.
Under this (admittedly strong) assumption, which we maintain only for the next Proposition, we can characterize how country size matters also for import shares, nominal wages, and price levels.
Proposition 5. Assume A1, A3, and A5. If τ > δ then larger countries have lower import shares, higher wages, and lower price levels. If τ = δ then larger countries have lower import shares, but wages and prices do not vary with country size.
As expected, import shares decline with country size and large countries gain less from trade, but aggregate economies of scale are strong enough so that the overall effect is for real wages to increase with size. Proposition 5 also establishes that real wages increase with country size both because of higher wages and because of lower prices. More importantly, these scale effects disappear when τ = δ, suggesting that domestic trade costs weaken scale effects. This is illustrated in Figure 1. For θ = 4, we alternately fixed δ = 1 and δ = 2.7, and chose τ for each δ to match an average import share of 0.39 (as observed in the data for our sample of 26 countries). For each case, the figure shows the implied import shares, nominal wages, real wages, and prices against country size. All four variables vary strongly with size in the model with no domestic trade costs, but this dependence is severely weakened when these costs are considered.

Domestic Trade Costs vs International Trade Cost Asymmetries
The strong relation between country size and import shares in the model with no domestic trade costs in Figure 1 could be due to the restriction on trade costs imposed by A5. In principle, one could replicate the effects of domestic trade costs in a model without them if international trade costs were chosen appropriately. As we next show, the key is whether one allows for asymmetries in international trade costs, and whether one deviates from A3 by allowing for a systematic pattern between innovation intensity ( T i /L i ) and country size (L i ). We explore this possibility by comparing the implications of three models that differ in terms of the assumptions on trade costs: symmetric international trade costs with domestic trade costs ("RRS"); asymmetric international trade costs with asymmetries arising from importer-specific terms, as in EK ("EK"); and asymmetric international trade costs with asymmetries arising from exporter-specific terms ("W"), as in Waugh (2010). To proceed, let α ni = α in for all i = n be the symmetric component of trade costs and consider the following alternative assumptions for trade costs:

A6'. [Trade Costs with Asymmetries from Importer Effects] τ EK
ni = F EK n α ni for all i = n and τ EK nn = 1 for all n.

A6". [Trade Costs with Asymmetries from
Exporter Effects] τ W ni = F W i α ni for all i = n and τ W nn = 1 for all n.
All three models impose A1 and have the same parameter θ and the same coun-try sizes, L i , but they may differ in technology levels and trade costs.
The following result follows directly from the expression for trade flows in (8) and price levels in (9). Proposition 6. Under A1, A3, and A6, the RRS, EK, and W models generate the same equilibrium wages and trade flows. The equilibrium price levels are the same as in the RRS and W models, but they differ in the EK model: P W n = P RRS n and P EK According to this Proposition, if one adjusts the technology levels appropriately, the models with asymmetric international trade costs as in Waugh (2010) and with symmetric international trade costs with domestic trade costs are equivalent in all respects. Note, however, that increasing with country size and no systematic relationship between φ i and country size, this expression implies that small countries would tend to exhibit higher values of T W i /L i .
Proposition 6 also implies that, although wages and trade flows are the same across all three models, prices in EK are systematically high in small countries when compared with prices in the RRS and W models, since P EK n = P RRS n /τ RRS nn and τ RRS nn increases with size. This point is analogous to the one made by Waugh (2010), but applied here to large versus small as opposed to rich versus poor countries. 17

Quantitative analysis
In this Section, we quantify the general model. The goal is to explore the role of domestic trade costs in reconciling the standard model of trade with the data in key dimensions (real and nominal wages, prices, and import shares), across countries of different size. We only impose A3 and A4-that is, technology scales with population and a normalization of the average workers' productivity in each location within a country (A m ), respectively. 17 Is it possible to achieve a full equivalence between RRS and EK by deviating from T EK

Calibration Procedure
We consider a set of 26 OECD countries for which all the variables needed are available. We restrict the sample to this set of countries to ensure that the main differences across countries are dominated by size, geography, and R&D, rather than other variables outside the model. Additionally, the definition adopted for ''region" in the data is fairly homogenous among OECD countries.
We need to calibrate the parameters κ and θ, the vectors M n and L n , for all n, and T m and A m , for all m, as well as the matrix of trade costs d mk , for all m, k.
Calibration of κ. We set κ to 1.3, following Suarez-Serrato and Zidar (2014). Our parameter κ, which refers to the workers' heterogeneity in productivity across locations, is isomorphic to the (inverse of the) parameter in their paper that captures heterogeneity in workers preferences for locations with different levels of amenities. They estimate this parameter by targeting the reduced-form effect of state taxes on the growth rates of wages, establishments, population, and rental cost, across U.S. states. 18 Calibration of θ. As in the standard trade model, the value of θ is critical for our exercise. Head and Mayer (2014) survey the estimates for the trade elasticity in the literature and conclude that, even though the variance is large, the mean estimate, for the sub-set of structural gravity estimates, is -3.78 with a median of -5.13. 19 We choose θ = 4 which encompasses values obtained not only by the trade literature but also the growth literature and the empirical literature on scale effects. 20 The implied 18 In the context of a spatial model of trade, where both heterogenous workers and firms are mobile, their paper analyzes the effects of state corporate tax cuts on welfare. They estimate simultaneously the dispersion of idiosyncratic preferences, the dispersion of idiosyncratic firms' productivity, and the elasticity of housing supply. 19 Among structural gravity estimates, Eaton and Kortum (2002) get an estimate of θ in the range of 3 to 12, while Bernard, Jensen, Eaton, and Kortum (2004) estimate θ = 4. More recently, Simonovska and Waugh (2013) estimate θ between 2.5 and 5 with a preferred estimate of 4, and Arkolakis, Ramondo, Rodriguez-Clare, and Yeaple (2013) get an estimate between 4.5 and 5.5. Other group of papers estimates the trade elasticity using data on different sectors, obtaining estimates between 6.5 and 8 (see Costinot, Donaldson, and Komunjer, 2012;Shapiro, 2013;and Caliendo and Parro, 2014). 20 Assuming that L n grows at a constant rate g L > 0 in all countries and invoking A3, the growth rate of T n is equal to g L . The long-run income growth rate is then g = g L /θ, which in the symmetric version of the model simply follows from differentiating (21) with respect to time (with a constant M n ). In the general version of the model this follows because trade shares and population shares are not affected by growth which is common across countries. With g L = 0.048, the growth rate of research employment, and g = 0.01, the growth rate of TFP, among a group of rich OECD countries, both from Jones (2002), θ = 4.8 Jones and Romer (2010) follow a similar procedure and conclude that the data supports g/g L = 1/4, which implies θ = 4. In turn, Alcala and Ciccone (2004) show that controlling for a country's geography (land area), institutions, and trade openness, larger countries in terms of population have a higher real GDP per capita with an elasticity of 0.3. In the symmetric version of the model, this elasticity can be interpreted in the context of (21) in which geography is captured by τ nn , institutions by φ n , and trade openness is represented by the last term on the right-hand side of (21); the coefficient on L n , 1/θ, can then be equated to 0.3, which (conditional) elasticity of the real wage with respect to size is then 1/θ = 1/4, in-between the one in Jones (2002)  Our general model does not generate a log-linear gravity equation at the country level, as the models from where the estimation of θ is taken do. Hence, we check whether an Ordinary-Least-Square (OLS) regression of the (log of) simulated trade shares on the (log of) calibrated trade costs, with both importer and exporter fixed effects, delivers a coefficient close to four.
Calibration of the number of regions. We assume that the number of regions for each country in the model, M n , equals the number of metropolitan areas observed in the data. We use data on 287 metro areas from the OECD, with a population of 500,000 or more. 22 For all countries, except Australia, New Zealand, Turkey and Iceland, the data are from the OECD Metropolitan Database; for these four missing countries, we use data from the OECD Regional Database. Column 8 in Table 1 presents the number of regions for each country. The number of metropolitan areas is strongly correlated with our measure of country size (0.90).

Calibration of technology and size.
We calibrate the parameter T m assuming A3, T m = φ n π m L n , and that φ n varies directly with the share of R&D employment observed in the data at the country level. 23 We use data on R&D employment from the World Development Indicators averaged over the nineties. We measure L n as equipped labor, from Klenow and Rodríguez-Clare (2005), to account for differences in physical and human capital per worker; we take an average over the nineties as well. 24 We refer to the term φ n L n as R&D-adjusted country size, and we adopt it as our measure of country size-see column 6 in Table 1. The population share of region m, π m , is an endogenous variable coming from the computation of the model's equilibrium. We choose A m for region m in country n such that we exactly match the population share of implies θ = 3.3. 21 This elasticity may seem high relative to estimates of the income-size elasticity in the urban economics literature. For example, Combes, Duranton, Gobillon, Puga, and Roux (2012) find an elasticity of productivity with respect to density at the city level between 0.04 to 0.1. One should keep in mind, however, that these are reduced form elasticities, whereas our 1/4 is a structural elasticity. Thus, the same reasons (i.e., internal frictions and trade openness) that make small countries richer than implied by the strong scale effects associated with an elasticity of 1/4 should also lead to a lower observed effect of city-size on productivity in the cross-sectional data. 22 These metro areas follow a harmonized functional definition developed by the OECD. 23 Data on R&D by region are either very low quality or unavailable. 24 The size elasticity of R&D employment shares, for our sample of countries, is low (-0.07 with s.e. of 0.09). Using the number of patents per unit of equipped labor registered by country n's residents, at home and abroad, rather than R&D employment shares, as a proxy for φ n , does not change our results below. Similarly to R&D employment shares, small countries do not have a systematically higher number of patents per capita. region m in country n observed in the data; the normalization given by A4 is also imposed. We use data on population for each of the metropolitan areas in the sample, from OECD, for the year 2000. The (cumulative) population share of our sample of metro areas, for each country, is presented in column 9 of Table 1. 25 Calibration of Trade Costs. We need to calibrate the whole matrix of trade costs between regions, d mk , for m ∈ Ω i and k ∈ Ω n , for all i, n. This amount to a 287 × 287 matrix (i.e., the number of regions in our sample). The obvious limitation is that data on trade flows between any two regions in our sample are not available (except for the United States and Canada). Hence, we proceed by imposing more structure on the trade costs. In particular, we assume that with d mm = 1. The variable dist mk denotes geographical distance between region m and k which is computed from longitude and latitude data for each metropolitan area in our sample. The variable I mk is a dummy variable that equals one if m and k belong to the same country, and zero otherwise.
We choose the coefficient β 0 to match the share of intra-regional trade in total domestic trade for the United States. In the model, this variable is given by m∈Ωn X mm / X nn . We use data from the Commodity Flow Survey (CFS) on manufacturing trade flows between geographical units within the United States, for 2007. We measure total intra-regional trade as the sum across all the regions of the intra-region manufacturing shipments, while X nn is total domestic manufacturing trade flows. As explained in more detail in Section 5.1, this share ranges from 0.35 using metropolitan areas to 0.45 using U.S. states. We target a mid-value of 0.40. 26 We calibrate the coefficient β 1 to match the average bilateral trade shares in manufacturing observed in the data. Data on country-level trade flows X ni are from STAN, averaged over 1996-2001, while country-level absorption X n is calculated (from the same source) as gross production minus total exports plus total imports from countries in our sample. In our sample, the average international (bilateral) trade share is 0.0156.
The empirical evidence indicates that the distance elasticity for inter-regional trade flows is similar to the one obtained for international trade flows. Table 2 presents the re-sults for different gravity specifications. For our sample of 26 countries, the OLS distance elasticity ranges from -1.01 to -1.1. Poisson estimates are lower, between -0.75 and -0.95. These estimates are within the range estimated in the literature, as surveyed by Head and Mayer (2014): the mean and median structural estimates, which corresponds to gravity estimates with fixed effects, are around -1.1. Using data on trade flows among U.S. metropolitan areas, we get a coefficient between -1.12 (OLS) and -1.25 (PPML). 27 These estimates are similar to the ones found by Allen and Arkolakis (2014) for metropolitan areas within the United States when trade is restricted to road mode, and similar to the distance elasticity in Tombe and Winter (2014) for inter-provincial trade in Canada. Given this evidence, and given θ = 4, we impose β 2 = β 3 = 0.27. Similarly as for the trade elasticity θ, because the general model does not deliver a log-linear gravity equation at the country level, we check how close the simulated data are to the imposed international distance elasticity. 28 Table 3 summarizes the calibrated parameters and the R-squared coming from comparing international trade shares in the data and the model, which is 0.96. 29 The value of θ we impose comes from models that deliver a log-linear equation of country-level trade flows on trade costs; our general model, however, does not. Hence, we check whether the implied value of the OLS coefficient from regressing the simulated international trade shares on the calibrated international trade costs, which are calculated using (24), is close to four. Including two sets of fixed effects for origin and destination country, we get a coefficient of 3.96 (s.e. 0.079). The same reasoning applies to the calibrated distance elasticity: the OLS elasticity of trade shares on distance between country i and n, is -1.07 (s.e. 0.021), in the range of the one observed in the data for international trade flows.

Results.
Column 2 in Table 4 shows an index of country-level domestic trade costs constructed based on a procedure in Agnosteva et al. (2013), where π m is the population of region m, as a share of country n's total population. The 27 Inter-regional trade for the United States is between the sub-set of 55 metro areas in the United States for which we have trade data from the CFS, for 2007. 28 Additionally, as a robustness check, we run a calibration procedure that calibrates this elasticity (and β 1 ) to minimize the sum of squares differences between trade shares in the data and model; results are reassuring since the implied elasticity of trade costs to distance is 0.29. 29 domestic cost index is, as expected, higher for larger countries: in our sample of countries, its correlation with our measure of country size is 0.70, while the one with the number of regions is 0.86. Our calibration indicates that, for instance, a small country like Denmark has τ DN K,DN K almost half the one for the United States, while a large country like Japan has τ JP N,JP N of around 70 percent the one of the United States. This result already suggests that domestic trade costs will undermine the strength of aggregate scale effects.
Finally, our estimates of domestic trade costs can be compared with the estimates coming from the index developed by Head and Ries (2001), and Head, Mayer, and Ries (2010). Using the matrix of domestic trade for the United States, their index amounts to Figure 2 shows the relation of trade costs across regions of the United States with distance, using our calibrated trade costs (d mk ) and the index in (26)

The Role of Domestic Frictions
We use the calibrated model to explore how the presence of domestic frictions affects the strength of scale effects on real wages, import shares, price indices and nominal wages. Domestic trade costs can offset scale effects, but by how much? Does the model with scale effects, international trade, and domestic frictions ((i.e., the full model) do a good job in matching the data for wages, price indices and import shares?
In the data, the real wage is computed as real GDP (PPP-adjusted) from the Penn World Tables (7.1) divided by our measure of equipped labor, L n . The real wage calculated in this way is simply TFP; we henceforth refer to this variable indistinctly as real wage or TFP for country n. The import share for country n is calculated as 1 − λ nn , with λ nn ≡ X nn / X n . The nominal wage in the data is calculated as GDP at current prices from the World Development Indicators, divided by our measure of equipped labor. The price index is simply calculated as the nominal wage divided by the real wage. All variables are averages over 1996-2001. Domestic trade shares, real and current GDP per capita, for each country, are summarized in column 1 to 3 of Table 1 . Figure 3 shows the following decomposition of the real wages (relative to the U.S.) across coutnries: the real wage implied by our full model (blue dots); the real wage implied by the model with only scale effects (green dots)-which implies imposing β 0 = 1, β 1 = ∞, and β 2 = 0; and the real wage with both scale effects and international trade but no domestic frictions (red dots)-which implies β 0 = 1 and β 2 = 0. We also show the real wages observed in the data (black dots). Real wages are plotted against our measure of R&D-adjusted country size. 30 It is clear that the model with only scale effects severely underestimates the real wage for the smallest countries (green vs black dots). According to that model, the real wage for a small country like Denmark would be only 33 percent of the one in the United States, reflecting very strong scale effects. In contrast, the observed relative real wage of Denmark is 94 percent. The implications are similar when we look at the six smallest countries in our sample: the model with only scale effects implies a relative real wage of 30 percent, whereas in the data these countries have an average real wage almost equal to the one in the United States. Further, the size elasticity of real wages is equal to 1/θ = 1/4 in the model, whereas the one in the data, calculated using an OLS regression with a constant and robust standard errors, is not statistically different from zero (-0.006 with s.e. 0.03).
We calculate how much adding international trade and domestic trade costs to the model help in matching the observed real wages for countries of different sizes. We first consider the model with trade but no domestic frictions. As the red dots indicate in Figure  3, trade openness does not help much in bringing the model closer to the data. Focusing again on Denmark, the standard trade model with no domestic trade costs implies a relative real wage for Denmark of 38 percent, only a small improvement over the model with only scale effects. For the six smallest countries, the model implies a real wage of 33 percent, higher than the 30 percent generated by the model with no trade, but still very far from the data.
It is important to clarify that, as expected, small countries do gain more from trade than large countries (the size correlation is -0.42). It is just that these gains are not large enough to have a substantial role in closing the gap between the model with only scale effects and the data. For example, in our calibrated model, as shown in column 3 of Table  6 , Denmark has much larger gains from trade than the United States (22 vs 2.2 percent), but almost ten-fold higher gains increase the implied relative real wage of Denmark from 30 Table 7 in the Appendix shows the numbers behind the figure. only 33 to 38 percent.
Adding domestic trade costs to the model helps to reconcile the model with the data (blue vs black dots in Figure 3). Because the index of domestic trade costs in (25) is strongly correlated with country size, these frictions undermine scale effects. Going back to the example of Denmark, the model with scale effects, international trade, and domestic frictions implies a relative real wage of 81 percent, much closer to the data (94 percent) than the real wage implied by the model with only scale effects (33 percent). The full model's implied relative wage for the six smallest countries in the sample is 71 percent, closing the gap between the model with only scale effects and the data by almost More formally, we use the root mean squared error, In Figures 4 to 7 we compare the calibrated models with and without domestic trade costs in terms of real wages, import shares, nominal wages, and price indices, across countries of different size. The model without domestic frictions is calibrated using the procedure described above, but assuming d mk = 1 for all m, k ∈ Ω n (Table 3 also   As Table 5 indicates, the average import shares are matched well by both the calibrated models with and without domestic trade costs. But the pattern they present across countries of different size resembles the one shown in our theoretical example in Figure  1: in the model with no frictions, import shares decrease too rapidly with country size, as indicated by the magnitude of the size elasticities presented in Table 5. The model without domestic trade costs implies that import shares decline with size with an elasticity of −0.39 (s.e. 0.09), higher than the one in the data, which is −0.23 (s.e. 0.06). The model with domestic trade costs does better in this regard: the implied elasticity is −0.27 (s.e. 0.06). 31 It is also clear from Figures 6 and 7 that the behavior of real wages in the model with no domestic trade costs is the result of nominal wages that rise-and prices that fall-too steeply with size. As shown in Table 5 Our results are related to those in Waugh (2010), who shows that his model without domestic trade costs does well in matching real wages across countries. The main difference is that while we impose that T i /L i is pinned down by R&D employment shares, Waugh (2010) estimates T i so that the model without domestic trade costs matches the trade data. 32 As implied by Proposition 6 in Section 3, a model without domestic trade costs can generate the same trade shares and real wages as a model with domestic trade 31 The calibrated model without domestic trade costs in Alvarez and Lucas (2007) also matches fairly well the relationship between size and import shares across countries. As we assume in A3, Alvarez and Lucas (2007) allow technology levels to scale up with size, but rather than using equipped labor as a measure of size, they calibrate L n so that w n L n in the model equals nominal GDP in the data. Letting e n be efficiency per unit of equipped labor in country n, their procedure is equivalent to calibrating e n such that e n (L n /λ n ) 1/θ matches observed TFP levels. For our sample of countries, their calibrated size (e n L n ) has much less variation than the observed measure of equipped labor across countries (std. of 0.05 vs 0.21), which implies that small countries have a much higher efficiency per unit of equipped labor than large ones. 32 The variable L i used in Waugh (2010) is equipped labor from Caselli (2005).
costs, but with T i /L i ratios that are systematically lower for large countries. This is precisely what Waugh (2010) obtains in his model for our sample of countries: the estimated (average) T i /L i ratios are 12 times higher for the five smallest countries in our sample than for the five largest. Moreover, for our sample of countries the elasticity of Waugh's estimated T i /L i ratios with respect to country size is -0.94 (s.e. 0.29). 33 The Gains from Trade. We show in Section 2 that the general model does not deliver the simple ACR formula for the gains from trade in (17) which only requires countrylevel trade shares for its computation. However, it is interesting to compare the gains from trade calculated (wrongly) using that simple formula applied to the simulated trade shares delivered by the general model, and the gains computed correctly using the change in real wages from autarky to the calibrated equilibrium, described in Proposition 4. Comparing the results in columns 2 and 3 in Table 6, we can see that the expression for the gains from trade in (17) approximates extremely well the ''true" gains from trade.

Alternative Geographies
We explore three different geographic structures for the quantitative model: a symmetric structure; a symmetric hub-and-spoke structure; and an international hub-and-spoke structure. While the first two geographic structures assume A1, the third one satisfies A2.
These alternative calibrations are worth exploring for three reasons. First, under A1, the calibration of the model becomes extremely simple because we can apply the data directly to (17) to compute the gains from trade, and we can use the data on intra-regional trade shares, for the United States, to directly calibrate domestic trade cots. Second, because all three cases deliver a log-linear gravity equation at the country level, the calibration of the parameter θ is fully consistent with the approach described above. Finally, all four calibrated models with domestic frictions yield very similar results for the patterns of real wages, trade shares, nominal wages, and prices, across countries of different size.

Symmetry
Calibration. We keep, as in the general case, θ = 4, T m = φ n π m L n , with φ n equal to R&D employment shares in the data, L n our measure of equipped labor, and M n the number of metropolitan areas observed in the data, from OECD. Notice that our symmetry assumption simply implies that π m = 1/M n , for all m ∈ Ω n . Under A1, we also have that d mk = d m k , with m, m ∈ Ω n and k, k ∈ Ω i , n = i. Hence, the expression for international trade costs in (24) collapses to with i = n, and dist ni the geographical distance between country i and n. 34 Applying the same procedure as for the calibration of the general model, we impose β 3 = 0.27. We then calibrate the constant β 1 to simply match the average bilateral trade share observed in the data among our sample of 26 OECD countries. 35 The crucial parameters to calibrate in the symmetric case are domestic trade costs τ nn , for which we impose the structure given by (14). We calibrate the parameter δ n based on data on domestic trade flows for the United States. From (1) and (8), we get Given the observed share of intra-regional trade in a country, (29) can be used together with M n and θ to infer τ nn , which can then be combined with (14) to get an estimate of δ n .
We consider shipments between 100 geographical units within the United States from the CFS, for 2007. 36 This yields an intra-regional trade share of 0.35, implying that 35 percent of domestic U.S. trade flows are actually intra-regional trade flows. With M U S = 100 and θ = 4, we get δ U S = 2.7. 37,38 This estimate is in the middle range of the ones 34 The variable dist ni denotes distance between the most populated cities, or official capitals, in country n and i, respectively, from Centre d'Etudes Prospectives et Informations Internationales (CEPII). 35 As it is clear from (21), we could have directly used the data on trade shares applied to calculate the gains from trade and real wages-as we do below-rather than estimating the matrix of international trade costs. We proceed, however, keeping our calibration close to the one for our general model for comparison purposes. Additionally, the matrix of international trade costs is needed to calculate the equilibrium nominal wages, prices, and trade shares. 36 These units include 48 Consolidated Statistical Areas (CSA), 18 Metropolitan Statistical Areas (MSA), and 33 units represent the remaining portions of (some of) the states, for 2007, from the Commodity Flow Survey. For each of these 99 geographical units, we compute the total purchases from the United States and subtract trade with the 99 geographical units to get trade with the rest of the United States, which is considered the 100th geographical unit. 37 Notice that the relatively high estimate for δ U S is a direct consequence of assuming θ = 4 combined with the relatively little inter-regional trade we observe in the data; in a frictionless world where δ U S = 1, the share of intra-regional trade would be 1/100 = 0.01. 38 Our estimates are in line with the high trade costs that are commonly estimated in gravity models (see Anderson and van Wincoop, 2004;and Head and Mayer, 2014). As mentioned in the Introduction, Hillberry and Hummels (2008) find that shipments between establishments in the same zip code are much larger than between establishments in different zip codes. One explanation for this finding is the existence obtained using other aggregation of the data. For instance, if we use trade flows between the 51 states of the United States, for 2007, the share of intra-regional trade is 0.45, which implies δ U S = 2.5. If we consider the same definition of metro areas as in the OECD data, we end up with 55 regions for which we have trade flows from the CFS. With this aggregation of the data, the share of intra-regional trade is 0.58 and δ U S = 2.9. Moreover, for Canada, the other country for which we have data on manufacturing trade flows between provinces, for 2007, that same trade share is 0.79; the implied δ CAN is 2.5. 39 Lacking data on domestic trade flows for other countries in our sample, we impose δ n = 2.7 for all n. We are still allowing for differences in τ nn across countries that come from differences in country size through M n ; this is precisely what offsets the economies of scale in the symmetric model with domestic trade costs.
Column 2 in Table 4 shows the calibrated τ nn 's, relative to the United States, for each country. Our calibration indicates that, for instance, a small country like Denmark with M DN K = 1 has τ DN K,DN K around 40 percent the one for the United States. Conversely, a large country like Japan, with M JP N = 36, has τ JP N,JP N calibrated to be 90 percent the one of the United States.
Further, in Figure 8, we plot the calibrated measure of domestic trade costs implied by our symmetric calibration (blue dots) and the index for domestic trade costs in (25) implied by the calibration of the general model (pink dots). On average, these domestic trade costs are not very different from the ones calibrated using the general model (0.64 vs 0.63, respectively, relative to the U.S.), while their size elasticity is higher (0.14 vs 0.09, respectively).

Results.
Armed with the calibrated model, we compare the symmetric and asymmetric quantitative models and ask how much better the general model does in comparison to the symmetric model, in reconciling the standard trade model with the data. The answer is: not much. Figures 4 to 7 show results for real wages, import shares, nominal wages, and price indices, across countries of different size. Solid lines represent fitted lines through the dots. Blue and pink dots represent the symmetric and general models, respectively, with domestic trade costs. Red dots represent the calibrated model with no domestic trade of non-tradable goods even within the manufacturing sector. As emphasized by Holmes and Stevens (2010), there are many manufactured goods that are specialty local goods (e.g., custom-made goods that need faceto-face contact between buyers and sellers), and hence non-traded. If we assumed in our model that a share of manufactured goods were non-tradable, the required δ n would be lower, but the consequences for our quantitative exercise would be very similar to the ones from the baseline calibrated model. 39 The source is British Columbia Statistics, at http : //www.bcstats.gov.bc.ca/data/bus s tat/trade.asp. Other papers that used these data are McCallum (1995), Anderson and van Wincoop (2003), and more recently, Tombe and Winter (2014). costs which is calibrated by imposing τ nn = 1. Table 5), the models with domestic trade costs capture much better the observed pattern of trade, wages-both nominal and real-and prices, across countries of different sizes.

As it is clear from Figures 4 to 7 (and the statistics in
Additionally, as the solid blue and pink (fitted) lines in all these figures suggest, the symmetric case is an extremely good approximation of the general case, particularly for small countries. This results can be further seen by comparing the statistics in Table 5 for the model with symmetric domestic trade costs and the general model.
For instance, the implied income elasticity is even lower for the symmetric than for the asymmetric calibrated model (0.09 vs 0.13, respectively) less than half the one implied by the calibrated model with no domestic trade costs (0.20). Additionally, while the model without domestic trade costs implies that import shares decline with size with an elasticity of −0.39, the one for the model with symmetric domestic trade costs is -0.15, closer to the elasticity observed in the data of −0.23, but not as good as the one implied by the asymmetric model (−0.27). Finally, the size elasticities for the nominal wage and price index are very similar to the ones obtained from the asymmetric quantitative model, and closer to the ones in the data than the ones implied by the model without domestic trade costs.
The Gains from Trade. We could have used directly the data on domestic trade shares and (17) to calculate the gains from trade in (21), rather than the simulated trade shares, and avoid the calibration of the matrix of international trade costs. Columns 1 and 4 in Table 6 record the gains from trade calculated with real and simulated data, respectively. Our calibrated procedure underestimates the gains from trade for small countries and overestimates them for large countries. But this is not enough to change the results regarding the importance of domestic trade costs in closing the gap between the data and the model with only scale effects: for the set of the six smallest countries in our sample, domestic trade costs close almost 50 percent of that gap, while trade openness does it in less than eight percent. 40 Gravity. Under A1, the model implies that country-level trade flows are log-linear in trade costs. Rather than imposing the structure in (14) for δ n , we alternately estimate domestic trade costs using data on international bilateral trade shares and gravity equations. Notice that these estimates are also valid for the two alternative geographies presented next, for which country-level trade flows also follow a gravity equation.
Our identifying assumption is that trade costs are symmetric. 41 From (8), we get Assuming that international trade costs are as in (28) and taking logs yield where and gather source and destination country characteristics, respectively. The variable ε ni is an error term reflecting measurement error and/or barriers to trade arising from all other country-pair specific factors (and orthogonal to the observable variables). 42 Subtracting (33) from (32), for country n, and rearranging terms yields We estimate (31) by OLS (shown in column 4 of Table 2), and assuming θ = 4, we computeτ nn as indicated by (34)-see column 4 in Table 4. We plot this measure of domestic trade costs,τ nn against our measure of country size in Figure 8 (red dots). Just as for the calibrated domestic trade costs above, the estimatedτ nn exhibits a strong positive relationship with country size (0.7), implying a high positive correlation betweenτ nn and our calibrated τ nn 's (0.79). Thus, under the assumption of symmetric (international) trade costs, the data on international trade shares suggest the existence of domestic trade costs that increase with size, as implied by the structure of our symmetric model. In fact, the elasticity of the estimatedτ nn with respect to R&D-adjusted size doubles the corresponding elasticity for the calibrated τ nn 's, for the symmetric model, and is three times larger than the size elasticity implied by our calibration of domestic frictions in the general model (0.28 vs 0.14 vs 0.09, respectively). The stronger relation with size presented by gravity estimates of domestic frictions would make the role of domestic trade costs 41 The equivalence shown in Proposition 6 in Section 3 between the EK, Waugh (2010), and our model, implies that, without the symmetry assumption on costs, the country-level data applied to the gravity equation in (31) could not be used to estimate domestic trade costs separately from country-specific effects on trade costs. 42 We also add a dummy for sharing a border and a dummy for sharing the same language to the costs in (28). even more important. 43

Symmetric Hub-and-Spoke
We now change the calibration of domestic trade costs by preserving A1 but relaxing the assumption on a common δ across countries. We assume that domestic trade costs are proportional to the country's area; hence, we assign higher domestic costs to larger countries in terms of area. This case is one commonly found in the literature where domestic pairs are included in the estimation of gravity equations and domestic distances are calculated as a transformation of country area (see Redding and Venables, 2004;and Head and Mayer, 2013).
We assume that regions are located in a circle within a country and that goods have to be shipped first to a centrally located hub before reaching their final destination, either domestic or international. The area of the circle is equated to the country's area observed in the data (see column 10 in Table 1), and the radio of the circle determines the distance between any region in a country and its hub. Hence, for any two regions in the same country n, trade costs in (24) collapse to δ n = (β 0 dist β 2 n ) 2 , with dist n = (area n /π) 0.5 (i.e., the radio of the circle). For any two regions in different countries n and i, trade costs are then given by δ n τ ni δ i , with τ ni as in (28). We use again the calibration procedure described in Section 4.1 where we impose β 2 = β 3 = 0.27, and calibrate β 0 and β 1 to match, respectively, the intra-region trade share for the United States and the average bilateral international trade share.
Column 3 in Table 4 shows the implied δ n 's for each country. A country like Denmark, with an area equal to 0.5 percent the area of the United States and only one region, has costs that are almost one quarter the U.S. costs, while Japan with an area equal to four percent the area of the United States, but 36 regions, has two fifth their costs. For both countries, these estimates are the lowest across the different calibrations. In general, these calibrated domestic costs are, on average, around two thirds lower than the ones implied by the remaining calibrations-even though the difference between large and small countries is 1.5 as also implied by our general calibration. Table 5 shows that this version of the model matches even better than the symmetric and asymmetric model the pattern of real wages across countries of different size: the income-size elasticity is 0.07 (s.e. 0.05), closer to the one observed in the data. Nonetheless, this calibrated version of our model misses the pattern of import shares across coun-tries of different size: as for the model with no domestic trade costs, import shares decrease too rapidly with country size in comparison to the pattern observed in the data (-0.39 vs -0.23).

International Hub-and-Spoke
We now calibrate the model dropping A1, but assuming A2. This assumption implies that while regions within a country can trade between them directly, they have to ship goods to a hub region in order to trade with the rest of the world. Under A2, for m ∈ Ω n and k ∈ Ω i with n = i, trade costs are given by where h n and h i denote the hub regions in countries n and i, respectively. We assume that each of the trade costs in (35) follows the functional form proposed in (24). Hence, for two regions m and k, (24) collapses to We impose the same restriction as in the general case, namely, β 2 = β 3 = 0.27, and calibrate the constants β 0 and β 1 to match, respectively, the observed share of intra-region trade for the United States and the average bilateral trade share among our sample of countries. Of course, this geographic configuration entails the need to choose a hub region for each country: among our sample of metropolitan areas, we choose the most populated area in each country as the international hub.
This geographic structure does the poorest in terms of fit with the data (the R-squared is 0.82). Nonetheless, as the statistics in Table 5 show, this model gets the closest to the data in terms of the income-size elasticity (0.06 with s.e. 0.03), and in terms of the average real wage, relative to the U.S., for the six smallest countries in our sample. The better fit in terms of real wage is the result of a much lower price-size elasticity (-0.01 with s.e. 0.01). This calibrated model misses, however, the pattern of import shares across countries of different size: the implied trade-size elasticity is -0.5 (s.e. 0.08), more than double the one observed in the data of -0.23 (s.e. 0.06).
It is worth mentioning that the fit of the international hub-and-spoke case improves substantially if one allows for a lower distance elasticity for the trade cost between a region and its international hub, with 0 < α < 1. With α = 0.03-and β 0 and β 1 adjusted accordingly to match, respectively, the average international bilateral trade share and intra-regional trade shares for the United States, the R-squared reaches 0.96, the same as the fit achieved by the other calibrated versions of the model. Of course, the implied distance elasticity to the international hub is very low, 0.008. This version of the calibrated international hub-and-spoke delivers very similar results to the general calibrated case in terms of averages and income elasticities for real and nominal wages, as well as import shares across countries of different size.

Conclusion
Models in which growth is driven by innovation naturally lead to scale effects. This feature results in the counterfactual implication that larger countries should be much richer than smaller ones. These scale effects are also present in the standard gravity model of trade. In those models, trade and scale lead to TFP gains through exactly the same mechanism as in innovation-led growth models, namely an expansion in the set of available non-rival ideas. These trade models, as idea-based growth models do, assume that any innovation produced in a given country is instantly available to all residents of that country. We depart from the standard assumption and build a trade model in which countries are a collection of regions and trade between regions in a country is costly. We calibrate the model and evaluate the role of domestic frictions in reconciling the data and the theory.
The calibrated model reveals that domestic frictions are key to explain the discrepancy between the standard trade model and the data. By weakening scale effects, domestic frictions not only help the model better match the observed productivity levels across countries; they also make the model better match observed import shares, relative income levels, and price indices.
An obvious limitation of our analysis is that we restricted our attention to differences across countries only coming from differences in R&D-adjusted size, gains from trade, and domestic frictions. Some forces left out of the model can be potentially important to further reconcile the model and the data.
One obvious possibility is that small countries benefit from "better institutions," which in the model would be reflected in higher technology levels (φ n ) than those implied by the share of labor devoted to R&D. But small countries are not systematically better in terms of schooling levels, corruption in government, bureaucratic quality, and rule of law; the data do not support the idea that smallness confers some productivity advantage through better institutions. 44 We conjecture that allowing for international technology diffusion would further bring the model closer to the data regarding the strength of scale effects. As we found in a working paper version of the paper, however, extending our model to incorporate multinational production does not have a sizable effect on the implied scale effects. One would then need to model a technology diffusion process by which ideas from one country can be used by domestic firms in other countries. Unfortunately, except for the small part that happens through licensing, technology diffusion does not leave a paper trail that can be used to directly measure the value of production done in a country by domestic firms using foreign technologies. 45 The big challenge of incorporating diffusion as an additional channel for the gains from openness is to discipline the amount of diffusion occurring across countries as it is not directly observable in the data. Our paper can be seen as a step in that direction since, after controlling for observable sources of gains from openness and domestic frictions, any difference in TFP between the data and the model could be attributed to non-observable diffusion. Our framework could be taken a step further and be used to discipline parameters related to diffusion. This is an important topic left for future research. 44 Schooling levels are average years of schooling from Barro and Lee (2000); corruption in government, rule of law, and bureaucratic quality, are indices ranging from zero (worst) to six (best), from Beck, Clarke, Groff, Keefer, and Walsh (2001). Patents per unit of R&D-adjusted equipped labor from country i registered in all other countries in the sample (including itself) are from the World Intellectual Property Organization (WIPO), average over 2000-2005. 45 According to the data published by the Bureau of Economic Analysis, royalties and licenses paid to U.S. parents and foreign affiliates by unaffiliated parties for the use of intangibles represented only one percent of total affiliates sales, in 1999. Some indirect evidence points to the importance of international diffusion for growth. Kortum (1996, 1999) develop a quantitative model that allows them to use international patent data to indirectly infer diffusion flows. They estimate that most of the productivity growth in OECD countries, except for the United States, is due to foreign research: between 84 percent and 89 percent in Germany, France, and the United Kingdom, and around 65 percent for Japan. Keller (2004) also finds that, for nine countries that are smaller than the United Kingdom, the contribution of domestic sources to productivity growth is about ten percent. R&D-adjusted country size refers to φ n L n with φ n = 1 for all n and L n a measure of equipped labor from the data.       asym.dom.fric. data ''No dom.fric." refers to the model without domestic frictions; ''sym. dom.fric." refers to the symmetric model with domestic frictions; ''asym. dom.fric." refers to the general asymmetric model. In the data, import shares refer to total imports, as share of absorption, in the manufacturing sector. R&D-adjusted country size refers to φ n L n , where φ n is the share of R&D employment observed in the data and L n is a measure of equipped labor.       (31). ''Sym. model" refers to τ nn calculated using (14). ''Asym. model" refers to τ nn calculated applying the aggregation in (25) to the calibrated domestic costs. R&D-adjusted country size refers to φ n L n , where φ n is the share of R&D employment observed in the data and L n is a measure of equipped labor. .83 Domestic trade in manufacturing in column 1 is calculated as a share of absorption in manufacturing. RGDP p.c. in column 2 is PPP-adjusted real GDP divided by equipped labor (in column 5, in millions). CGDP p.c. in column 3 is GDP in current U.S. dollars divided by equipped labor. R&D employment in column 4 is calculated as a share of total employment (%). Column 7 shows the number of metro areas, while column 8 shows their population as a share of the country's total population. Column 9 shows a country's area (in millions of squared kilometers). Real GDP and current GDP per capita, as well as country size, are relative to the United States. Variables are averages over 1996-2001. In columns 1-2 and 5-6, trade shares refer to λ ni ≡= X ni / X n for n = i, for 26 OECD countries, while in columns 3 and 7 trade shares refer to λ mk ≡ X mk /X m , for m = k, for 55 metropolitan areas in the United States. Normalized trade shares in column 4 refer to λ ni /λ nn . All regressions with importer and exporter fixed effects. Robust standard errors with * denote a level of significance of p < 0.01  (24). 'No dom.fric.", ''asym. dom.fric.", ''sym. dom.fric." , ''sym. hub-spoke" , and ''int'. hub-spoke" refer, respectively, to the calibrated models with no domestic trade costs, asymmetric and symmetric domestic trade costs, and symmetric and international hub-and-spoke.    (17) to the data, while columns 2 and 4 show the gains calculated from applying the ACR formula to the simulated data. Column 3 computes the gains from trade as the change the real wage between an equilibrium with trade and an autarky equilibrium, using the general model. The six smallest countries (with respect to R&D-adjusted size) are Iceland, Ireland, New Zealand, Finland, Norway, and Denmark, while the six largest countries are Italy, France, Great Britain, Germany, Japan, and the United States.

A Proof of Lemma 1
Let n(m) be the country to which region m belongs (i.e., m ∈ Ω n ) and let Ψ m ≡ z s.t. z m w m /P m ≥ z k w k /P k for all k ∈ Ω n(m) .
The share of workers that choose to live in region m is then π m ≡ Ψm dF n(m) (z), where F n(m) (z) is the joint distribution function of z in country n(m). In turn, total efficiency units of labor supplied in region m is E m ≡ L n(m) Ψm z m dF n(m) (z).
To simplify notation, we drop country sub-indices and use ω m ≡ w m /P m . We first prove that The probability that ω m Z m ≥ ω k Z k for all k is the same as the probability that ω m Z m ≥ Y m ≡ max k =m ω k Z k . But note that the probability that Y m ≤ y is the same as the probability that Z k ≤ y/ω k for all k = m, which is e −y −κ k =m A k ω κ k . Hence, The probability that Z m ≥ Y m /ω m is obtained by integration across all z, We now prove that E m = γLπ m V ωm . The result in (38) implies that But ∞ 0 κV κ w −κ m z −κ e −V κ (ωmz) −κ dz is just the mean of a Fréchet distribution with parameters κ and V κ w −κ m , which is known to be γ (V κ ω −κ m ) 1/κ . Together with π m = A m w κ m /V κ , this establishes the result.

B Proof of Proposition 1
We know that P m = P m for all m, m ∈ Ω n , hence Then (6) can be written as Since d jm = d jm for all m, m ∈ Ω n and all j, then this implies that (A m /T m ) w κ+θ m does not vary with m ∈ Ω n , hence for some v n . Together with (39), this implies (7). In turn, this implies that total income in country n is m∈Ωn w m E m = w n L n , where Adding up over m ∈ Ω n on both sides in the labor market clearing condition above yields Noting that Letting λ jn denote the country-level trade shares, we have while the price index in any region of country n is This implies that Turning to the price index, we know that for m ∈ Ω n , we have P n = P m . Hence, and hence w n P n = µ T 1/θ n τ −1 nn λ −1/θ nn .

D Proof of Proposition 3
Note that (1) together with A2 implies that, for n = i, Rearranging terms, we get (16).

E Proof of Proposition 4
Combining We use ψ mk to denote region-level trade shares, ψ mk ≡ X mk /X m . Using (1), we get while using (2) we getP Combined, these equations yield the standard result that changes in real wages are determined by changes in domestic trade shares and the parameter θ, w m /P m =ψ −1/θ mm .
To compute GT n we then need to computeψ mm for all m ∈ Ω n . In the model without trade costs or with symmetry, this is trivial, but here we need to use the model and computeψ mm for a move to autarky at the country level, which entailsd mk = ∞ for n(m) = n(k) andd mk = 1 for n(m) = n(k).
To proceed, we turn to the labor market clearing condition in the counterfactual equilibrium. Using x = xx and plugging in forψ km from (45), and using X m ≡ w m E m , this can be written as X mXm = k ψ kmψkm X kXk . From Combined with (44) , (45) and (46), this is a system of M equations in the M unknowns, {ŵ 1 , ...,ŵ M }. This determines wages changes given changes in trade costs,d mk and given data π m , X m , and ψ mk . Given a solution, we can then use (45) applied to m = k to get ψ mm and finally plug above to get GT n .
As mentioned above, the move to autarky entailsd mk = ∞ for n(m) = n(k) and d mk = 1 for n(m) = n(k). Plugging this into the system above implies that (47) Solving this non-linear system we findŵ n for all m ∈ Ω n and all n. We can then computê ψ mm for all m and GT n for all n.
Note that if there were no domestic trade costs, then necessarily ψ km = ψ m ≡ l∈Ωn ψ l X m / X n for all k, m ∈ Ω n , and (47) yieldsŵ m = 1 for all m ∈ Ω n (or any constant across m). This implies thatψ mm = 1/ l∈Ωn ψ l for all m ∈ Ω n , and hence GT n = l∈Ωn ψ l −1/θ . But ψ l = ψ ml ≡ X ml /X m for all m, hence X nn = m∈Ωn k∈Ωn X mk = m∈Ωn k∈Ωn ψ k X m = X n k∈Ωn ψ k , so that λ nn ≡ X nn / X n = k∈Ωn ψ k , and we finally get GT n = λ −1/θ nn . In the case of symmetry (A1), it is obvious thatŵ m = 1 for all m ∈ Ω n (or any constant across m), so that we again have the same result even with trade costs.

F Proof of Proposition 5
Equilibrium wages are determined by the system Given A3, and letting Φ ≡ j M j w −θ j τ −θ , where Γ ≡ n wnMn . Since τ > δ, then δ −θ > τ −θ , so that the left-hand side is decreasing in M and increasing in w. This implies that if M i > M j then necessarily w i > w j : larger countries have higher wages. In contrast, if τ = δ, then the left-hand side is invariant to M and hence w must be common across countries.
To compare import shares across countries in a given equilibrium, note that domestic trade shares are given by Plugging (F) into (48) and rearranging yield w 1+θ Since w i > w j when M i > M j , is decreasing in x, then M i > M j also implies that and hence λ ii > λ jj .
For price indices, note that Hence, (48) implies that w 1+θ n P θ n = Again, since w i > w j when M i > M j , then P i < P j . Combining the results for wages and price indices, real wages are also increasing in size. Moreover, if τ = δ, then the result that wages are the same across countries immediately follows from (50), which also implies that the price index is the same across countries.

G Proof of Proposition 6
The result trivially follows from replacing assumptions A6, A6', and A6", subsequently, into the expressions for real wages in (15), and trade flows and price indices in (8) and (9), respectively. The nominal wage follows from multiplying real wages by the price index.

H Equivalence with Melitz (2003) Model
where C 2 is a constant. Thus, j L j b θ j ( w j τ nj ) −θ = C −1 2 P −θ Thus, if f n does not vary with L n /M n , the growth rate would be g L / (σ − 1). To have the growth rate be g L /θ, we need to assume that f n scales up with L n /M m proportionally, or θ ≈ σ − 1, in which case w n P n ∼ L 1/θ n b n τ −1 nn λ −1/θ nn . refers to the model with only scale effects, column 2 to the model with scale effects and international trade, column 3 to the model with scale effects and domestic trade costs, and column 4 to the model with scale effects, international trade, and domestic trade costs. The real wage in the data (column 5) is the real GDP (PPP-adjusted) per unit of equipped labor. All variables are calculated relative to the United States. The six smallest countries (with respect to R&D-adjusted size) are Iceland, Ireland, New Zealand, Finland, Norway, and Denmark, while the six largest countries are Italy, France, Great Britain, Germany, Japan, and the United States.