HIAS-E-117

Heterogeneous Internal Trade Cost and
Its Implications in Trade

Han Zheng (a),(a)

Hitotsubashi Institute for Advanced Study, Hitotsubashi University

January 2022

Hitotsubashi Institute for Advanced Study, Hitotsubashi University
2-1, Naka, Kunitachi, Tokyo 186-8601, Japan
tel:+81 42 580 8668 http://hias.hit-u.ac.jp/
HIAS discussion papers can be downloaded without charge from:https://hdl.handle.net/10086/27202
https://ideas.repec.org/s/hit/hiasdp.html

Heterogeneous Internal Trade Cost and Its
Implications in Trade
Han Zheng*
December 13, 2021

Abstract
Contrary to the convenient assumption, this paper shows that internal trade costis heterogeneous across countries. This heterogeneous internal trade cost contaminates the importer fixed effect in a ratio type gravity estimation making exporter
fixed effect a better measure of country’s competitiveness. Further quantification
analysis shows that R&D data can approximate country level technology parameterquite well after netting out the effect from internal trade cost and the model withinternal trade cost can match real income data very well. The model with internal
trade cost is not only consistent with price data but also outperforms other alternatives in fitting R&D data. This paper offers a novel answer to the question why
small countries export less than large ones. That is small countries trade more withthemselves because of lower internal trade costs they have.
Keywords: Heterogeneous internal trade cost, Domestic trade friction, Ratio typegravity estimation
JEL Codes: F10, F14, F17* Hitotsubashi Institute for Advanced Study, Hitotsubashi University, 2-1 Naka, Kunitachi, Tokyo

186-8601, Japan. Email address: hanzheng211@gmail.com.

1

Introduction

A convenient assumption in international trade literature is that the internal trade costis the same across countries, whereas little evidence is shown to warrant this assumption
and on the contrary, intuitions and both anecdotal and academic evidences hint at the
opposite—advanced countries generally have better quality of infrastructure and goods
have to travel longer distance in large countries. Many studies also analyze the presence
and implication of the internal trade cost, such as Anderson and Van Wincoop (2003),
Donaldson and Hornbeck (2016) and Donaldson (2018).1 A common assumption sharedby these three studies is that the trade flow between sub-national regions also follow gravity equation structure and trade cost between them is shown to be heterogeneous acrossboth country border and time dimension. Provided that, it is natural to deduce thatcountry’s internal trade cost should be heterogeneous across countries which contradicts
to the traditional country level gravity equation estimation practice assuming internal
trade cost is the same across countries and normalized as one.
To resolve this discrepancy, this paper develops a model of aggregation to show thatthe internal trade cost is heterogeneous across countries and it is an increasing function
in country’s size. Guided by the theory, then this paper extends the standard country
level gravity estimation to accommodate internal trade cost and yields an internal trade
cost measure aligns well with theory prediction. Using the estimated internal trade
cost measure and commonly available data, this paper shows not only this model withinternal trade cost can reconcile with price data as emphasized in Waugh (2010), but also
outperform the exporter specific trade cost model advocated by Waugh (2010) in fitting
the R&D data.
The contributions of this study are severalfold. It contributes to the literature of
aggregation in trade. Ramondo et al. (2016) show that an Eaton and Kortum (2002)(thereafter EK) structure on the state level can be successfully aggregated into country
level under some innocuous assumptions. Similarly, Coughlin and Novy (2021) aggregate
an Armington type gravity structure on a finer sub-region level into region level and examine the border effect associated with the cross country border trade flow between two
regions relative to the trade flows between regions within country border. As their theory
predicts, they find larger regions are systematically associated with smaller border effects.
Inspired by both Ramondo et al. (2016) and Coughlin and Novy (2021), this paper defines
a basic level and characterizes the conditions under which EK type gravity structure canbe consistently aggregated to any level higher than the basic level, providing theoreticalfoundations for the validity of gravity researches at various levels. Different from aforementioned studies examining the consistency of gravity model under spatial aggregation,
1

There are many other notable studies analyzing intra-country trade cost with a wide variety ofmethods, e.g., Ramondo et al. (2016), Kerem Coşar and Fajgelbaum (2016), Atkin and Donaldson(2017), Wrona (2018) and Coughlin and Novy (2021).

1

Redding and Weinstein (2019) investigate the consistency under sector aggregation.
In addition, this paper extends the vast strand of literature exploring how international borders adversely affect the international trade flow. Inspired by the seminal
paper McCallum (1995), Anderson and Van Wincoop (2003) devise a theory motivatedgravity estimation method qualifying and in part confirming McCallum (1995)’s results—
international borders do hinder the trade flows. It is from then on that it becomes standard practice to include border dummy in the structural gravity estimation in researches
exploiting the variations between trade flows across and within country borders.2 A
particularly noteworthy piece is Coughlin and Novy (2021) where authors show both theoretically and empirically the estimated international border effect is region specific andheterogeneous across regions. In particular, larger size regions tend to have smaller size
border effect in absolute value, indicating the level of aggregation in the region of interest
could mechanically affect the border effect estimated, even though the underlying economic situation remains unchanged. Unlike the traditional gravity equation estimation
method, Santamaria et al. (2020) use the causal inference framework to find significant
causal effect of country borders on trade flows in Europe where small border effect is
expected because countries in Europe are considered to be highly integrated with eachother. Different from all the previous studies, this paper adapts the methodology used in
Coughlin and Novy (2021) to country level trade flows and emphasizes the heterogeneity
in the internal trade conditions across countries, using a country specific border dummy
to capture the combined effects from the different level of aggregation due to differencein country size and heterogeneous internal trade impediments inside each country. Consistent with prediction of the model developed in this paper, the estimated border effectdecreases in the country size. The intuition beneath this result is the following. As acountry grows larger, trading within a country becomes harder on average and tradingwith partners across borders becomes relatively more appealing. Therefore, the estimatedborder effect specific to that country becomes smaller.
On another front, this paper offers new insights on literature attempting to fit thetrade model to data and papers trying to structurally interpret the fixed effect in theratio type gravity model. Assuming that the technology parameter is proportional to thelabor within a country in an EK framework, Alvarez and Lucas (2007) firstly show thata parsimonious EK framework with intermediate input trading can match data moment
quite well. One step further, Waugh (2010) argues that a traditional EK model with
importer specific trade cost is unable to match the pattern of price data, whereas an EK
model with exporter specific trade cost can resolve this conflict. Meanwhile, he showsthat due to the existence of exporter specific trade cost the importer side fixed effectin a ratio type gravity model is a better measure for country’s competitiveness. Basedon Waugh (2010)’s exporter specific trade cost model, Simonovska and Waugh (2014)2

Some notable studies include Chen (2004), Anderson and Yotov (2010) and Wrona (2018).

2

estimate the trade elasticity using simulated method of moment and they show that theestimated trade elasticity is insensitive to the trade cost interpretation. Though motivated differently, Ramondo et al. (2016) build an EK type model with internal trade costand show theoretically that their model is observationally equivalent to Waugh (2010)’s
model in generating equilibrium wage, trade flows and aggregate price level. Based on
Waugh (2010)’s interpretation of fixed effect in ratio type gravity estimation, Levchenko
and Zhang (2016) back out the technology parameters by industries in EK type modeland find there exists convergence in technology across sectors within countries. Inspiredby Coughlin and Novy (2021), this paper recovers an internal trade cost measure in an
augmented gravity equation estimation which are consistent with the theory developedin this paper. Using this theory consistent internal trade cost, this paper quantitatively
shows that an EK type model with internal trade cost can generate patterns matchedwith aggregate price data, just as Ramondo et al. (2016) predict theoretically. Further
distinction between an EK type model with internal trade cost and a model with exporter specific trade cost endorsed by Waugh (2010) relies on their fit to R&D data. The
correlation between R&D value generated under model with internal trade cost is 0.86
whereas the corresponding correlation under model with exporter specific trade cost isaround 0.5. This comparison is important for the following two reasons. First, so far
there is no satisfying credible data measure to approximate the technology parameter inthe EK model. This comparison can help to testify whether R&D data is suitable tobe one candidate. Second, those two models have distinctive implications on which sideof fixed effects should be used as country’s competitiveness measure to recover technology parameter and those two sides of fixed effects exhibit dissimilar patterns. Methods
similar to the one used in Levchenko and Zhang (2016) are expected to yield different
results using either side of fixed effects estimated in a ratio type gravity equation. Other
than the studies using EK framework, heterogeneous firm models based on Melitz (2003)
are also used to match data moments as well. Some notable examples include Arkolakis(2010) trying to explain excessive entry of small firms into a market; Eaton et al. (2011)
trying to replicate the sorting pattern of firms entry into markets; Antràs et al. (2017)
trying to match the sorting pattern in the firms’ sourcing decisions.
The following section lays out a theoretical framework characterizing the internal
trade cost and provides a new welfare formula different from Arkolakis et al. (2012)highlighting the importance of the internal trade cost. Section 3 provides empirical tests
to two major predictions made in theory section. Section 4 represents the empiricalregularities regarding trade shares in Waugh (2010) and offers new empirical observation
which supports the model with internal trade cost over other alternatives. Section 5
conducts quantification analysis and shows that the model with internal trade cost aligns
very well with data in various dimensions and outperforms its competitor—the modelwith exporter specific trade cost in matching price index data and R&D data.
3

2

Theoretical Framework

This section provides a theoretical framework that identifies the conditions under which
gravity structure holds at the basic geographical units (will be defined in this section)
can be consistently aggregated into any arbitrary levels above, giving credence to studies
conveniently applying gravity structure to any aggregation level of interest. This framework also shows that the internal trade cost at country level should be heterogeneous
across countries because of two reasons: first, it comes from heterogeneous trade cost
between basic geographical units across countries; second, the different size of countries
implies different number of basic geographical units each country contains, which leads
to heterogeneous internal trade cost at country level through aggregation. The theoretical framework with internal trade cost naturally yields a welfare formula different from
Arkolakis et al. (2012) (thereafter ACR)—the conventional gains from trade from changeof absorption rate has to be adjusted by the change of internal trade cost.

2.1

Trade Between Basic Geographical Units

To set a starting point for aggregation, we define the basic geographical units satisfying
the following properties.
Definition. A basic geographical unit is a swath of land segmented in such a way that:
1. any basic geographical units within a country are symmetric in the sense that each
unit has the same amounts of labor li where i is the country index;
2. the technology parameter associated with any basic geographical unit in country
i takes the parametric form ti = ϕi li , where ϕi is the country specific innovation
intensity parameter.
The parametric form of technology parameter associated with basic geographical unit
is inherited from Ramondo et al. (2016) where detailed discussion is provided. Thisparametric form allows aggregation conveniently across basic geographical units becauseof the property of Fréchet distribution—max{x, y} of two Fréchet random variables withshape parameter θ and scale parameter tx and ty is Fréchet with shape parameter θ andscale parameter tx + ty . Later in the quantification section, it will be shown that themodel generated innovation intensity through this parametric form in fact fits the R&D
data quite well.
The trade flow between two basic geographical units m ∈ Ξi in country i and n ∈ Ξjin country j satisfy the regular expression as in Eaton and Kortum (2002):
ti c−θ d−θ
xi,m;j,n = P i −θmn−θ yj,n ,s ts cs dsn
4(1)

where Ξi denotes the set of basic geographical units contained in country i; xi,m;j,n represents the trade flow from unit m in country i to unit n in country j; ti is the technology
parameter for unit m in country i; dmn denotes the trade cost from m to n; yj,n is thetotal expenditure spent by labors in unit n. To avoid confusion at once keep compact notations, a notional convention is kept throughout this paper. The letter after the comma
represents the basic geographical unit in the country whose index is given before thecomma, e.g., yj,n . The letter after the comma will be omitted if that value is the sameacross all the units in a typical country, ti .
P
P
−θ −θ
Defining the price index at unit n in country j, p−θj,n :=j∈Ωs∈Ξj ts cs dsn where Ωis the set of countries in the world and using the fact that unit m’s income comes fromP
its sales n xmn = yi,m , we have the following:
yi,m = ti c−θi

X X d−θj−θ
:=Define πi,m

P P
j

n

mn
yj,n .
p−θ
j,n

(2)

d−θ
−θ
mn
n p−θ yj,n and plug it back to equation (2) to solve for ts cs whichj,nthen is plugged back into equation (1) yield the following:d−θxi,m;j,n = yi,m yj,n −θmn−θ ,pj,n πi,m
X X d−θ
mn
y .
p−θ
=
i,n
−θ i,mπi,mmiFollowing the convention in trade literature, the trade cost between any two units in theworld is the same regardless of its direction, i.e., dmn = dnm . Then it follows that:pi,m = πi,m .

(3)

To allow aggregation into higher level, the following condition is needed.
Assumption. pi,m = pi,n for any m, n ∈ Ξi .
This assumption says that the price index in each basic geographical unit is equalized
within each country, which is not very restrictive given that the basic geographical units
are defined symmetrically. This assumption can be satisfied when the trade cost between
any two basic geographical units within a country is the same as in Ramondo et al.
(2016) or a certain topology is imposed on the basic geographical units. For example, if
the basic geographical units are arranged in tandem, those units can be thought as thesymmetric arc of a circle as in Coughlin and Novy (2021), and the distribution centerof goods moving across international border locates at the center of the circle. Or if thebasic geographical units are placed on a plain and they are uniformly distributed overthe surface of a sphere, meanwhile the distribution center of goods across international
5border locates at the center of the sphere. In the real world, this assumption is more likely
to hold when the segmentation to define basic geographical unit is sufficiently small.

2.2

Aggregation of Basic Units to Country Level

The trade flow within a country border is the summation of trade flows between any twobasic geographical units within this country:
X X

Xii =

xi,m;i,n =m∈Ξi n∈Ξid−θyi yi −θmn−θ ,pi pim∈Ξ n∈Ξ
X X
i

(4)

i

where Xii is the flow of goods country i trades with itself which is defined as:
Xii := Yi YiDii−θ
,Pi−θ Pi−θ(5)where Yi is the national income of country i and due to symmetry of basic geographicalunits Yi = Ni yi where Ni is the number of basic geographical units country i contains.
Dii is the country level equivalent internal trade cost after aggregation. Pi is the country
level price index which is conventionally defined as:
Pi−θ :=X−θ
Tj c−θ
j dji ,

(6)j∈Ω

where Tj is the technology parameter at country level which will be a composite of variables and parameters at basic geographical unit level to ensure aggregation consistency;
dji is the country level trade cost. Then equation (4) can be transformed as:
Yi Yi

X
X X
d−θ
d−θ
Dii−θ
mm
mn
=
y
y
+
y
y
i i −θ −θ
i i −θ −θ .
−θ −θPi P i
pi pi
pi pi
m∈Ξ
n∈Ξ m∈Ξ ,m̸=n
i

i

(7)

i

Using symmetry of basic geographical units and normalization dmm = 1, it can be further
simplified as:
1
Dii−θ
=
−θ −θ
Ni
Pi Pi



1
−θ −θ
p i piWe define:Dii−θ :=




+

1
Ni

2 X

d−θ
mn
.
−θ −θ
p
p
i
i
n∈Ξ m∈Ξ ,m̸=n
X

i

(8)

i

X
1
1
+
d−θ ,
Ni Ni m∈Ξ ,m̸=n mn(9)Pi−θ = p−θ
i ,

(10)

i

then equation (8) becomes :6meaning the country level price index is the same as the basic geographical unit level
price index.
−θ
Under the mild assumption ∀m ∈ Ξi , n ∈ Ξj , Dij= d−θ
mn , namely trade cost between
any two cross border basic geographical units are the same and equals to the country
level trade cost,3 and equation (9), it can be shown that the country level technology
parameter has to satisfy:
Ti = ϕi Li ,(11)
to ensure the aggregated Pi is consistent with its definition, whose proof is delegated into
appendix A.1. Li is the total amount of labor which satisfies Li = Ni li . The expression(11) shows that the gravity structure on the basic geographical unit level is consistently
aggregated into the country level. Given the definition of ti , this result can be intuitively
interpreted as the best technology across all the basic geographical units within a country
border will be used as production technology exclusively throughout this country.
More importantly equation (9) shows that the country level equivalent internal trade
cost is a function of the number of the basic geographical units it contains and the innate
trade cost between the basic geographical units in it, meaning the internal trade cost at
country level is heterogeneous. This heterogeneity does not only come from the innate
difference in the domestic trade conditions but also is affected by the size of the country.
To further illustrate how those two sources of heterogeneity affect country level equivalent internal trade cost, dmn is assumed to be the same across basic geographical units
within country and equals to value δ > 1. Then equation (9) collapses to:Dii−θ :=

Ni − 1 −θ
1
+
δ ,
Ni
Ni

(12)

which is the same as the formula in Ramondo et al. (2016). This means the internal trade
cost is a weighted average of one and δ −θ . Keeping the number of basic geographical units
the same, the higher the value of d meaning the higher the trade cost between two basic
geographical units, the higher the country level internal trade cost will be. Suppose
another topology which satisfies the equivalence of price index across basic geographicalunits is imposed within a country, which is closer to the real world. The symmetric basic
geographical units are arranged in tandem on the circumference of a circle. The trade
cost between any adjacent units is δ > 1 and trade between any two units which are one
unit apart has to travel through the adjacent unit meaning the trade cost will be δ 2 . And
the trade flow has to be clockwise on the circumference of the circle.4 Then the equation
3

This assumption is more likely to hold when the international trade cost is much lager than internationally traded goods’ domestic distribution cost, such as for a small country. Or one could conveniently
define Dij equals to the average of dmn between any basic geographical units pair across these twocountries.
4
The clockwise assumption and the circle positioning of basic geographical units is for simplification
purpose. Alternative travel path like the shortest arc route and the surface positioning of a sphere will7(9) is transformed as:N !
1 − δ −θ i.
1 − δ −θ1
Dii−θ =
Ni

(13)

N
As δ −θ i reduces to 0 relatively fast, Dii generally is an increasing function in Ni ,meaning the country level equivalent internal trade cost increases with the size of thecountry.5 This will be one of the key predictions from the theory that empirical analysis
strives to test in the later part of this paper.

2.3

Prediction on Ratio Type Gravity Estimation

The inclusion of heterogeneous internal trade cost does not modify much of the structure
and interpretation in the trade level type gravity equation estimation. On the contrary, itsignificantly affects the interpretation of the country specific fixed effects in a ratio typegravity equation estimation which, unfortunately, is often used in studies need structuralinterpretation of country specific fixed effects.
Following the logic in the previous subsection, one can easily show the consistencyof aggregation from basic geographical unit level to country level for international tradeflows:−θX X
Dij
xmn = Yi Yj −θ −θ .
(14)
Xij =
P
P
i
j
m∈Ξ n∈Ξij

Together with the formula for internal trade flows, the traditional ratio type gravity
equation becomes:
!


Pj−θ
Yi
Xij
−θ
=
Dij
.
(15)
−θ
−θ
Xjj
Pi
Yj Djj
The first parenthesis is exporter specific and the second parenthesis is importer specific.
The third term will be approximated by traditional bilateral trade proxies. Therefore,
when using fixed effect specification to estimate the above equation, the importer specificfixed effect effectively contains the internal trade cost term. And the exporter specificfixed effect divides the importer specific fixed effect for the same country will yield thecountry level internal trade cost estimate. Whereas, the traditional ratio type gravity
equation specification implies that the cross country variation in the exporter specificfixed effects should be roughly the same as the cross country variation in the importer
specific fixed effects and any difference from these two should be driven by totally random
errors. This will be another key theoretical prediction that empirical analysis will attempt
to test in the rest half of the paper.
not qualitatively change the result.
5
In fact, Ramondo et al. (2016) use distances between provinces to construct a proxy for internal
trade cost at country level and show that this measure do increase with the size of the country. However,later the empirical part of this paper will show that distance alone is not an appropriate measure ofinternal trade cost.

8

2.4

General Equilibrium and Welfare Implication

To close the model in a tractable at the same time realistic way, this paper follows thesetting in Waugh (2010) that the tradable sectors produce the intermediate inputs used in
the homogeneous final goods production which are not traded. The trade share equationfrom country i to country j can be written as:
Πij = Yi−θ
DijPi−θ Pj−θ

=P−θ
Ti c−θ
i Dij−θ −θk∈Ω Tk ck Dkj

.

(16)

The unit input bundle is assumed to be produced using a nested Cobb-Douglas technology
such that its unit cost satisfies:
ci = A wiαi ri1−αiβ

pi1−β ,

(17)

where A is a collection of constant parameters and gamma function. Similarly, the final
goods production technology is assumed to be nested Cobb-Douglas technology and soldcompetitively:γ(18)
pF = B wiαi ri1−αi pi1−γ ,where B is a collection of constant parameters and gamma function. Trade balance
condition implies what one country expends equals to its sales:X

Xji = Yi =

j

X
j

Xij =

X

Πij Yj .

(19)

j

The Cobb-Douglas production technology of input bundle and final goods implies thetotal expenditure spent on intermediates goods equals its demands from intermediate
goods production and final goods production:
Yi = (1 − β) Yi + (1 − γ) Ii ,(20)

where Ii = wi Li + ri Ki . Meanwhile the labor market clears implies that total labor
income equals the expenditure accrued to labor from tradable sectors and final sectors:
Yi βαi + Ii γαi = wi Li .

(21)

By Walras’s Law the capital market clears as well. Equations (19), (20) and (21) together
implies the followings: first, αi share of total income comes from labor,
Ii =

ri Ki
wi Li
=
.
αi
1 − αi9(22)

Second, total income is proportional to intermediate input sales:
Yi =

1−γ
Ii .
β

(23)

Third, labor income in country i is purely a weighted sum of all the other country’s labor
income:X αiwi Li =
Πij wj Lj .
(24)
αj
j
The above equation can be used to pin down the relative wage level given parameters,
trade share and labor size.
Though the inclusion of heterogeneous internal trade cost seems to be a small addition
to the conventional trade models, it unexpectedly introduces additional components into
the real income formula. After several rounds of substitution and rearranging, the real
income formula can be shown as follows, whose proof is delegated into appendix A.2:
Ii /Li
=C
pF



Ti
Πii

 1−γ

βθ

1
Dii

 1−γ

β

Ki
Li

1−αi
,

(25)

where C is a constant composite consisting of A, B, and αi . Clearly this model modifies
ACR formula in two different ways—the inclusion of heterogeneous internal trade cost
brings in the second term and inclusion of capital as another production factor create thethird term. The impact of internal trade cost change on the real income per capita can be
intuitively illustrated by the following example. Suppose an island country’s infrastructure system is disrupted by a natural disaster, forcing them to rely more on the foreignsources of goods. According to the original ACR formula, reduction of absorption rate
will necessarily increase the real income which is at odds with the fact that this country
received a negative shock. Whereas in this heterogeneous internal trade cost model the
traditional gains from trade would have to be adjusted by the internal trade condition andthe real income will decrease in this situation which aligns with the intuition.6 The third
term says that higher capital level leads to higher real income, which is not surprisingbecause the more capital one person owns, the more return he received from capital.
6
One may argue that the traditional ACR formula already takes this example into account because
Ti in the original ACR formula could be viewed a composite and the change in the interal trade cost
could be deemed as a change in Ti , which is sensible enough. However, this kind of argument does nothelp in unraveling what constitutes the technology composite Ti in original ACR formula. In fact, laterin the empirical sections, this paper will show after separating the effect from internal trade cost, thistechnology parameter Ti can be very well approximated by the R&D data.

10

3

Empirical Tests

This section mainly conducts empirical tests against two predictions made in the theory
section:
1. The internal trade cost measure is increasing in country size.
2. The ratio of exporter fixed effect over importer fixed effect is roughly the same sizeof the internal trade cost measure in ratio type gravity model.
Using a panel data of trade flows, this section introduces a country specific border effect tocapture all the unobserved components of internal trade cost other than distance. Using
this country specific border effect plus distance as the internal trade cost measure, thissection confirms the theoretical predictions and shows that comparing to international
trade cost, the dispersion of internal trade cost is not small enough to be homogenized.

3.1

Data Descriptions

Trade flow data — The trade flow data is from the ITPD-E Database.7 Its coveragespans 17 years, from 2000 to 2016, including 243 countries and 170 industries. Relative
to the other trade flow database, one advantage is that it contains internal trade flows
whenever possible and its computation uses gross production rather than GDP as thereference sum which is more consistent with trade theory with roundabout production.
The database’s construction does not rely on an imputation using gravity method, therefore, the database is suitable for the gravity estimation. However, its merit can be its
curse from the flip side—ITPD-E is not suitable for general equilibrium simulation, as
most of the data is not regularized. As an alternative, we use trade flow data from GTAP
database for general equilibrium simulation.
Bilateral Trade Proxies — The proxies come from the CEPII website. One meritof the proxies constructed there is that it contains distance within country. Therefore,
the distance component of the internal trade cost can be accounted for and the internal
distance is also used to approximate the internal trade cost in several studies.8
Regional Trade Agreement — The regional trade agreement dummy comes from
the Mario Larch’s Regional Trade Agreements Database. Dummies separating the typeof trade agreements, such as currency union, free trade agreement, economic integrationagreement, are also included.
Country Characteristics — Country characteristics such as labor forces, capitalstock, popoluation size, real GDP come from Version 8 Penn World Tables. In this new
version, it distinguishes real GDP from expenditure side measuring standard of living and78

Its link is given as https://www.usitc.gov/data/gravity/itpde.htm.
See Ramondo et al. (2016), Yotov (2012), and Heid et al. (2021).

11

production side. Country’s innovation intensity is measured by the number of personnel
engaged in creation of knowledge per million people, which is obtainable from WorldBank’s World Development Indicators.

3.2

Internal Trade Cost Measure and Its Regularities

The structural gravity model predicts internal trade flows follows the same structure
as international trade flows. However, internal trade flows are seldom used in gravity
equation estimation. One reason could be credible data source of internal trade flow is
not available until recently. Now, with the credible internal trade flow data from ITPD-E,
we are able to conduct gravity estimation with internal trade flows. Table 1 shows theresults.
Table 1: The Common Border Effectln distlang ethno
contigcolonyrta(1)Foreign-1.169∗∗∗(0.034)
0.593∗∗∗(0.070)0.462∗∗∗(0.132)0.691∗∗∗(0.124)0.243∗∗∗(0.052)(2)
Domestic without-1.503∗∗∗(0.051)0.427∗∗∗(0.075)0.096(0.137)0.760∗∗∗(0.133)-0.010(0.058)14.299∗∗∗(0.310)1011850.771

17.323∗∗∗(0.455)102450
0.768

border
cons
N
r2

(3)
Domestic with
-1.117∗∗∗(0.043)0.632∗∗∗(0.072)0.507∗∗∗(0.131)0.686∗∗∗(0.121)0.273∗∗∗(0.054)-3.604∗∗∗(0.280)17.444∗∗∗(0.402)1024500.777

Standard errors in parentheses∗
p < 0.10, ∗∗ p < 0.05, ∗∗∗ p < 0.01
Note: This table provides the results of gravity estimates using OLS.
The trade proxies are from the CEPII Database. Column (1) shows
the standard fixed effects gravity results. Column (2) shows pooled
results with both international flow and internal flow. Column (3)provides pooled results with both international flow and internal flow
together with a border dummy added.

The column (1) is the standard gravity model with common bilateral trade proxies,
which confirms the validity of the data set we employed as all the estimates locate in
the ranges specified in Head and Mayer (2014). However, when internal trade flows aremechanically pooled together with international trade flows the estimates start to bend
12

astray—the coefficient on distance increases by 50%, the estimates on border continuity
and RTA become insignificant. Nevertheless, as column (3) shows when a common borderdummy which takes value 1 for international trade flow is added to the regression, all theestimates go back to its normal values as in column (1). This small exercise shows that
there are unobserved components structurally exist in internal trade cost that cannot be
captured by distance only. Just as Egger and Nigai (2015) convincingly show, failingto account for unobserved trade cost components could potentially bias all the estimates
through trade balance conditions and this border effect on trade is almost 10 times higher
than RTA and 6 times larger than common language, which should not be ignored. So it
is reasonable to parameterize the trade cost function for the international trade flow as:−θ
log Dij,t= α log Distij + Border × β + BT Pij,t × η + ϵij,t ,(26)

where the β is common across country pairs. This means following conventional literature,
we presume the border effect on international trade flows per se is homogeneous. On theother hand, the theory section shows that Djj is directly associated with the number ofthe basic geographical units the country j contains, the trade cost function for internal
trade flows are:−θlog Djj,t= α log Distjj + Λj × γ + BT Pjj,t × η + ϵjj,t ,(27)

where Λj is country specific and captures the heterogeneous internal trade cost components. Combining the above two equations together, we have the overall trade costfunction:−θ
log Dij,t= α log Distij + Border × (β − Λj × γ) + Λj × γ + BT Pij,t × η + ϵij,t∀i, j. (28)

Under the ceteris paribus assumption,∆Xij,t= β − Λj × γ,
∆Border(29)

which shows that the true partial effect of borders on trade flows is in fact heterogeneous
across countries. Though we presume a common border effect on international tradeflows, because of the heterogeneous internal trade cost, the border effect of international
trade flows relative to internal trade flows is heterogeneous across countries.
Therefore, to estimate country specific border effect, the following variant of trade
cost function is assumed:−θDij,t= Distαij × exp ((1 − Border) × β + Border × Λj × γ + BT Pij,t × η + ϵij,t ∀i, j) ,
(30)

13

where border takes value 1 when it is international trade flow. Plugging back this trade
cost function specification into gravity equation in levels with internal trade flows, we
conduct a gravity equation estimation with panel data spanning from year 2000 to year
2016. The internal trade cost measure is constructed combining the effect of country
specific border dummies and distances. The following Figure 1 displays the relationshipbetween the internal trade cost measure and country size.
Figure 1: Internal Trade Cost Measure across Country Size

Note: The internal trade cost measure in the USA is normalized at 1. The year for population size is
2014.

The increasing trend of the fitted line between the internal trade cost measure andthe size of the country is evident from above figure confirming the theory predictionin the previous section and this result is robust against various alternative country size
measures which is shown in the appendix B.1. In fact, Ramondo et al. (2016) also show
this relationship using the constructed internal trade cost measure from distance only.
However, as Table 1 implies distance alone is not able to effectively capture all the trade
cost components. The following Figure 2 further illustrates this idea by comparing theborder effect estimate and estimate from distance.
The value of y axis spans from −7.7 to 8.2 whereas the value of x axis spans from 0
to 6.1 resulting a rectangular shape of this figure. Therefore, in terms of size, the impact
from contribution of border effect is at least comparable to the impact from contributionof distance. And the red positive 45 degree line shows x value and y values do not haveapparent correlation meaning there is no obvious pattern in contribution from bordereffect that can be represented by the contribution from distance. To summarize, using
14

Figure 2: The Impact on Internal Trade Flows from Border Effects versus Distance

Note: The values on both x and y axis are normalized relatively to the ones in USA. This is appropriate
because throughout this paper USA will always be the reference country and its internal trade costmeasure always be normalized at 1, which effectively means the contribution from both border effects anddistance for USA will be 0. The contribution of distance means this value is computed directly multiplying
distance measure with its estimated coefficient in a log-linear regression without any transformation. And
this value is a direct measure how much distance impact on internal trade flow. The contribution ofborder effect is similarly constructed.

distance alone to represent internal trade cost is ineffective.
It is possible that internal trade cost measure exhibits large variations across countries
whereas this variation is negligible comparing to international trade cost measure. To
address this question, Figure 3 displays both distribution of two types of measure andtheir relative sizes, denying this possibility.
Figure 3 shows that in general international trade cost measure is higher than internal
trade cost measure confirming the validity of trade cost measures. Also it is evident thatinternal trade cost measure has a bigger dispersion than international trade cost measure
in log scale. In terms of size of trade cost, the top 25% of internal trade cost roughly
overlap with the bottom 25% of international trade cost, dissipating the concern thatinternal trade cost can be safely viewed as homogeneous comparing to the international
trade cost in size.

3.3

Ratio Type Gravity Estimation

As shown in the theory section, another striking difference between the standard gravity
model and the model in this paper with heterogeneous internal trade cost locates in15

Figure 3: Internal Trade Cost Measure versus International Trade Cost Measure

Note: The internal trade cost measure in the USA is normalized at 1 and both types of trade costmeasures are computed assuming θ = 4.

their prediction in ratio type gravity estimation. The standard gravity model predicts
that both exporter side fixed effect and importer side fixed effect for the same country
are measures of average competitiveness in production and should be roughly the same.
However, in the estimation practice, it is rarely the case. The Figure 4 shows whattypically happens in a cross-sectional ratio type gravity equation using trade data in year
2014.
The two types of fixed effects are by no means close to each other, even though
the values for USA are set to be the same. More importantly, those two type fixed
effects tell different stories about country’s competitiveness—exporter fixed effects imply
large countries tend to be more competitive than small countries whereas importer fixed
effects imply similar competitiveness across countries. As competitiveness is a composite
of country level technology parameter and unit cost of inputs, this disparity indicates
R&D data should be used to distinguish these two.
Observing this type of disparity in these two types of fixed effects, Waugh (2010) introduces country specific trade cost and claims the difference between country’s exporter
specific fixed effect and importer specific fixed effect is the country specific trade costwith supporting evidence. His key message is that as the exporter fixed effect contains
the effect of exporter specific trade cost, the importer fixed effect should be the correct
measure of country’s competitiveness and price index calculated using importer fixed effect demonstrates same pattern as the data, whereas price index generated using exporter
16

Figure 4: Exporter Fixed Effect versus Importer Fixed Effect in Ratio Gravity Equation

Note: Both exporter fixed effects and importer fixed effects are normalized with respect to USA. The
red color represents values from exporter fixed effects. The blue color represents values from importer
fixed effects.

fixed effect conflicts with data pattern. However, the quantification section of this paper
shows that the model with internal trade cost also aligns well with price data and thefinal distinction has to be made based on R&D data.
The following Figure 5 shows that the correlation between the internal trade costmeasure obtained through trade level gravity estimation against the difference between
fixed effects using trade ratio gravity estimation.
First thing to be noticed from Figure 5 is that those two sets of values are not statistically bound to be similar—the values on x axis are estimated using a panel ratio typegravity estimation and the values on y axis are estimated using a panel trade level gravity
estimation. The identification of internal trade cost measure uses variations of internal
trade flows across time and the identification of fixed effects use variations both acrosstime and partners. The second salient feature is that those two sets of values are generally
close to the 45 degree red line, though their best fitted line has a bit smaller slope. Thisis remarkable and generally a valid support to the second prediction made in the theory
section, provided that the conventional trade theory states that there should not be clear
pattern between them. The third noteworthy point is that, the top 10 GDP countries
except Canada, actually align very closely to the red line around the left bottom cornerof the figure. In fact, all the above features preserve when internal trade cost measure
is compared with differences between fixed effects estimated in a cross sectional setting,17

Figure 5: Differences in Two Fixed Effects versus Internal Trade Cost

Note: The values on x axis are the absolute value of mean difference between two types of fixed effectsof the same country across years in a panel ratio type gravity estimation. The values on y axis are
the absolute value of contribution from internal trade cost on internal trade flow in a panel trade level
gravity estimation. Both sets of values are computed relative to the USA level.

which is delegated into appendix B.2.

4

Regularities Regarding Trade SharesThis section is a preparation for the quantification analysis. It reiterates several regularities found in Waugh (2010) and presents some new regularities regarding trade shares.
Meanwhile this section constructs illustrative examples to show how the model with internal trade cost can potentially match with price data.
As a starting point for general equilibrium analysis, we represent the empirical regularities found in Waugh (2010). The following Figure 6 beautifully synthesizes theregularities about the trade shares.
The counties are sorted in a descending order in country size from top to bottom
and from left to right. The darker the color of a cell is, the higher the trade share forthat country pair. Three patterns are evident. First, the diagonal line has the darkest
color and roughly the same across countries. Second, for each importer, the upper half
generally has denser color than the bottom half, meaning each country imports more frombigger country. Third, for each exporter, the left half generally has similar color density as
the right half, meaning roughly all countries spend similar share on one country’s goods.

18

Figure 6: Trade Shares across Countries

Note: The trade shares are the expenditure share a typical importer spends on each exporter’s goods
and they are calculated among the countries presented with trade flows in year 2014.

Together with the regularity found in tradable goods price index in Waugh (2010)—theprice indices in tradable goods are roughly the same across countries, we can reformulate
those regularities in terms of this paper’s notation:
1. πii = πjj∀i, j;

2. πij > πkj for any country i’s size is bigger than country k;
3. πij = πik∀j, k;

4. Pi = Pj

∀i, j.

The above four regularities have some implications on bilateral trade cost. To see this,
we assume country i has bigger size than country j. The second and third regularities
implies:
πij = πik > πjk = πji .
(31)
Using the first regularity, the following expression holds:
πij
πji
>
.
πii
πjj

19

(32)

π
Because πijii =

 −θ
Pi
Pj

×





Dij
Dii

−θ

πij πjjπji πii, the above expression can be transformed as:




=

Pi
Pj

−2θ 

Dij Djj
Dji Dii

−θ
> 1.

(33)

Because of the forth regularity, the trade share variations between country i and j shouldbe traced back to the variations in either international trade cost or internal trade cost.
In conventional trade models where internal trade cost is homogeneous, the variationsin international trade cost becomes the only source of variations in trade share ratio.
Therefore, Waugh (2010) points out that this finding hints that the variation in tradeshare ratio implies that international trade cost could possibly be asymmetric. However,within this paper’s framework using the results established in previous sections—larger
country has higher internal trade cost, namely Dii > Djj , even under the conventional
assumption Dij = Dji , the variation in internal trade cost will imply variation in tradeshare ratio consistent with all the aforementioned empirical regularities. Therefore, only
based on the aforementioned empirical regularities, the variation in internal trade costhas equal explanatory power as asymmetric international trade cost in explaining thevariation in trade share ratio.
Additional regularities can be discovered, when zooming in and focusing on one particular country. The following Figure 7 shows the trade share dispersion across exporters
for the US. It is apparent that USA imports more from countries with bigger size eventhose countries share similar trade cost when trading with the US. The similar patternprevails for the most of the rest countries. The same graphs are shown in the appendix
B.3 for China and Ethiopia.
This new regularity means:
πik > πjk

when, Dik = Djk .

(34)

If internal trade cost is homogeneous across countries, the equalized international tradeπcost would imply the trade share ratio πijji in equation (33) equals to 1 contradicting to
the new empirical regularity found. However, a model with heterogeneous trade cost
can naturally reconcile this contradiction, because larger country is shown to have higher
internal trade cost.
Any discussions in this section before now relies on a crucial assumption that themodel with internal trade cost advocated in this paper can replicate the forth empiricalregularity—price index equivalence across countries, which will be shown in the quantification section. Here we provide an illustrate example to show why introduction ofinternal trade cost can achieve price index equivalence.
Suppose there are three countries indexed by 1 to 3. The country’s size is decreasing in

20

Figure 7: Trade Shares across Countries for USA as Importer

Note: The trade shares are the expenditure share USA spends on each exporter’s goods and they arecalculated among the countries displayed with trade flows in year 2014.

its index. We assume country 2 and country 3 are not trading with each other. Therefore
the trade share matrix is given as follows:
π11 π12 π13 π21 π22 0  ,π31 0 π33
where πij is defined the same as in the theoretical section:
πij =

−θ
Ti c−θ
i Dij

Pj−θ

.

Then the above trade share matrix can be transformed as:−θ
T1 c−θ


1 D12
π12
π13
1
−θ
−θ
1 π22 π33
T2 c2 D22

−θ −θ
 π21
  T c2 D21
1
0  =  T12 c−θ π11 1
−θ
1 D11

−θ
−θ
π31
T3 c3 D31010
π11
T c−θ D−θ
1 1

11

The regularities of trade share implies the following:
π21
π31 π12
π13
>
,
=
.
π11
π11 π22π33
21−θT1 c−θ
1 D13−θ −θ
T3 c3 D33

0
1




.


In situation one, suppose there exists exporter side specific trade cost D12 = D13 = dand internal trade costs are normalized to be 1 across countries, namely D22 = D33 = 1.
This situation corresponds to the exporter specific trade cost model proposed in Waugh= ππ13, we have the following:(2010). Because of ππ122233−θT2 c−θ
2 = T3 c3 .

(35)

As for the price index in country 2,


−θ
−θ
.
+ T3 c−θ
= P3−θ = T1 c−θ+ T2 c−θP2−θ = T1 c−θ
3
1 d
2
1 d
This situation naturally yields the pattern that price index is invariant across countriesof different size.
In situation two, suppose there exists importer side specific trade cost D21 = D31 = d
but with internal trade costs. First, consider the case where internal trade costs arenormalized to be 1 across countries. Because of ππ21
> ππ31, we have the following:1111−θ
T2 c−θ
2 > T3 c3 ,(36)meaning larger country is more competitive in production. Notice that equation (36)holds regardless of the assumption on internal trade cost. In the absence of heterogeneousinternal trade cost, equation (36) necessarily implies
−θ
−θ
D12
> D13
,

(37)



−θ
−θ
−θ
−θ
P2−θ = T1 c−θ
> P3−θ = T1 c−θ,
1 D12 + T2 c2
1 D13 + T3 c3(38)which in turn indicates:

meaning the importer side specific trade cost in conventional trade model is inconsistent
with price index data. However, this inconsistency can be easily resolved in a modelwith internal trade cost, because higher internal trade cost in larger country sabotages
its higher competitiveness, which will not necessarily induce D12 < D13 . Then it becomes
possible that price indices in country 2 and 3 are equalized. The different results shown inequation (35) and equation (36) suggests the further distinction between export specifictrade cost model and internal trade cost model can reply on their fit to the R&D data.

22

5

Quantification Analysis

This section examines the fit of the model with internal trade cost in various dimensions
and compares its performance with the model with exporter specific trade cost. Particularly, the model with internal trade cost achieves similar, if not better, fit to price index
data as the model with exporter specific trade cost. And the internal trade cost model
outperforms the model with exporter specific trade cost by a huge margin in fitting R&D
data. However, they achieve similar fit to final goods price level and real income level.
To facilitate understanding, we dub the model with internal trade cost model A and themodel with exporter specific trade cost model B.

5.1

Calibration Procedure

The GTAP trade data is used for this quantification exercise. The parameters needed torecover include {θ, αi , β, γ}. θ is the productivity dispersion parameter. Eaton and Kortum (2002) estimate it to be from 4 to 12 using wage data and price data. Additionally,
Simonovska and Waugh (2014) show it to be around 4 to 8 using simulated method of
moment and Ramondo et al. (2016) calibrate it to be 4 from growth literature. So here
we prefer θ = 4. As for αi and β, in order to yield direct contrast to the results in Waugh(2010), we keep the labor share to be constant across countries and equal to α = 0.7. The
value added share in intermediate inputs β equals to 0.33. The value picked for value
added share in final goods production γ is 0.4, as the value added share in final goods
should be somewhat similar to the one in intermediate goods.
We follow the methodology of calibration used in Waugh (2010) in order to yield
direct contrast to his model. The description of steps given here will be brief and the
cookbook way of conducting it is delegated into appendix B.4. Matching the exact valueof employment and trade share, we can recover wage rate up to a normalization. Using
the capital labor ratio, rental rate can be backed out and throughout the quantification
analysis, the estimated trade costs from gravity estimation are used. The most crucial
difference from other calibration methods is that we use the value from the model implied
fixed effects in a ratio type gravity equation as country’s competitiveness measure to
recover country specific technology parameter, which is in direct contrast with Ramondo
et al. (2016). They match the technology parameter to the exact value of R&D data,
which ex ante is a very risky move because, as mentioned before, the so called technology
parameter is a composite containing not only the impact from technology level but also
other factors which are not able to be explicitly explained by the structure of the model,
although ex post this paper shows after netting out the internal trade cost, the technology
parameter can be approximated fairly well using R&D data. Another key difference of thispaper from Ramondo et al. (2016) is the formulation of trade costs. They approximate
the trade costs only by distance which, as shown in previous section, will fail to capture
23

the impact from aggregation. In fact, in an exercise in their paper, when they adjust
internal trade cost measure to match trade share moment, their model fit to price index
improves, meaning a precise trade cost measure is at the very core of the calibration andtrade share is a critical moment a model should match to keep good fit to the data.
To summarize, our model matches the exact moments of trade share and factor of
productions and uses backed out values of trade costs and country’s competitiveness fromgravity estimation to match target moments of price index, technology parameter andreal income.

5.2

Tradable Price Indices

Waugh (2010) argues that the use of exporter side fixed effect estimated in a ratio typegravity equation as country’s competitiveness is prone to be inconsistent with the priceindex data. However, the following Figure 8 shows that after introducing internal tradecost, this inconsistency disappears in model A and it achieves slightly better fit to theprice index data than model B.
Figure 8: Price Index Recovered from Model with Internal Trade Cost across Countries

Note: The price indices are normalized to the reference country USA and the trade cost measure andcountry’s competitiveness measure are recovered from the gravity estimation.

Although in the illustrative example in the previous section, we discuss the possibilityof price index being the same across countries, because of its parsimonious setting, thisequivalence is not guaranteed. However, the Figure 8 shows the clear pattern that priceindices from model A are roughly same across countries which is consistent with the24Figure 9: Price Index from Model with Exporter Specific Trade Cost across Countries

Note: The price indices are normalized to the reference country USA and the trade cost measure andcountry’s competitiveness measure are recovered from the gravity estimation.

regularity discovered about price index data in Figure 1 of Waugh (2010). This better
fit to data from model A is more pronounced when comparing to Figure 9 which shows
the cross country differences of price index recovered from model B advocated by Waugh(2010). These price indices recovered from model B are roughly similar across countries
but they have an apparent downward sloping trend. This mild downward sloping trendof the fitted line also appears in Figure 4 in Waugh (2010) using 1996 year’s data crossvalidating the validity of quantification method. Meanwhile the Figure 4 in Waugh (2010)shows the true data exhibits a slightly upward sloping trend which coincides with theslightly upward sloping trend of price indices in model A in Figure 8.
To summarize, in terms of fitting price index data, both model A and model B roughly
replicates the equivalence of price indices across countries. However, only model A cangenerate a slightly upward sloping fitting trend which true data also display.

5.3

Innovation Intensity

According to the theory section Ti = ϕi Li , the technology parameter is assumed to be a
linear function of total amount of labor and its coefficient ϕi is named innovation intensity.
A natural question is how good it is to parameterize the technology parameter is such aparsimonious form? The answer to this question is demonstrated in Figure 10—the target
moment the cross country variations of R&D counts of personnel per million people is25well approximated by the innovation intensity parameter recovered from model A.
Figure 10: Innovation Intensity from Model A versus Data

Note: The black font is for data values and the red font is for model counterparts. This figure only
contains countries with records of innovation intensity longer than 15 years and each data point represents
its average across years. Innovation intensity for both data and model prediction is normalized withrespect to USA.

The correlation between data points and model A’s predictions is as high as 0.857,
meaning model A achieves generally good fit to data especially for top 20 GDP countries
and most of Europe countries. Model A slightly over predicts the innovation intensity
for extremely small country in size, e.g., Luxembourg, Ireland, Belgium and Singapore.
On the other hand the performance of model B in matching innovation intensity data isdisplayed in Figure 11. It is obvious that model B over predict for almost all countries
except USA which serves as the reference country. The correlation between data points
and its prediction is 0.59 much smaller than model A’s score 0.857. However, it successfully replicates the upward trend exhibits in data but magnifies it by a huge margin. The
significant difference in matching R&D data between two models has been anticipatedin previous sections, because those two models are using different sets of estimates ofcountry’s competitiveness as shown in Figure 4. From the lens of model A, the importer
fixed effect in a ratio type gravity estimation is contaminated with internal trade costestimates. Completely negligence of internal trade cost in model B will erroneously attribute the effects from internal trade cost into innovation intensity and therefore distortthe size of the innovation intensity prediction uniformly in model B. In a word, model A
outperforms model B in matching R&D data.

26

Figure 11: Innovation Intensity from Model B versus Data

Note: The black font is for data values and the red font is for model counterparts. This figure only
contains countries with records of innovation intensity longer than 15 years and each data point represents
its average across years. Innovation intensity for both data and model prediction is normalized withrespect to USA.

5.4

Real Income and Final Price

It is instructive to keep in mind that both model A and B are matching exact value offactors of production and trade shares only. Therefore, their fit to real income data could
be an unbiased criterion to access their performance. The following Figure 12 shows thefit of model A in matching real income data. It turns out almost all the countries areclosely positioned around the 45 degree red line and the correlation between data andmodel prediction is 0.967. This high level fit of model A to data is surprising, given theparsimonious structure of the model with internal trade cost.
We also examine the fit of model A in aligning consumer price data which is given in
Figure 13. Although not so close as the real income comparison, the points still locate
around this 45 degree red line evenly and its best linear fit the blue line almost perfectly
overlaps with the red line. The predictions from model A achieve 0.792 correlation with
consumer price data. On the other hand, model B can achieve similar fit as model A inmatching both real income and final price, whose graphs are delegated into appendix B.5.
This is not surprising given the small difference between model A and B in generating
price index as in Figure 8 and 9. Because both model A and B are matching exact valuesof factors of production and trade shares which will produce exactly same numbers forwage and rental rate in model A and B, the difference between price indices across models

27are washed out when compounded together with same wage and rental rate.
Figure 12: Real Income Prediction from Model A versus Data

Note: The real GDP per capita is computed as real GDP divided by total employment in that country
in year 2014. Both data and model predictions are normalized with respect to the USA.

To summarize, the model with internal trade cost outperforms the model with exporter
specific trade cost in matching price index data and R&D data and they are on parwith each other when fitting real income and consumer price data. This distinction isimportant for two reasons. First, it establishes that after netting out the effect fromthe internal trade cost, the technology composite can be very well approximated by aparsimonious function Ti = ϕi Li and the value of ϕi is given by the R&D data. Second,as mentioned in previous section, the two models prefer different sets of fixed effectas country’s competitiveness measure. Because those two fixed effects are completely
different in their patterns across countries as shown in Figure 4, very different results could
possibly emerge using different sets of fixed effect, such as using fixed effect estimates toback out country level productivity.

6

Conclusion

This paper casts doubt on the convenient but unwarranted assumption—internal trade
costs across countries are homogeneous. It lays out a compelling theoretical frameworkof aggregation, identifying the condition which allows aggregation to any arbitrary level
above basic geographical units and providing a theoretical foundation to researches applying gravity structure to any level of interests.
28

Figure 13: Consumer Price Prediction from Model A versus Data

Note: Both data and model predictions are normalized with respect to the USA. The data in year 2014is used.

In addition, This theoretical framework makes two major predictions. First, country
level equivalent internal trade cost should be heterogeneous and increasing in country size.
Second, the difference between the two sets of fixed effect in ratio type gravity equation
should equal to the internal trade cost. Both of predictions are tested to be true in theempirical analysis. Meanwhile, in the empirical section, it highlights the insufficiency ofusing distance only to capture internal trade cost and the unnegligible size of internal
trade cost comparing to internal trade cost.
Then this paper provides new regularity regarding trade shares on top of the ones
mentioned in Waugh (2010) and this new regularity can only be explained by a modelwith heterogeneous internal trade cost. To further distinguish the model with internal
trade cost from alternatives, this paper conducts quantification analysis and shows themodel with internal trade cost aligns well with data in various dimensions and outperforms
its competitor—the model with exporter specific trade cost in matching price index data
and R&D data. At the same time, this paper suggests exporter side fixed effect is moreaccurate a measure of country’s competitiveness because importer side fixed effect is
contaminated with internal trade cost effect in a ratio type gravity estimation.
On the other hand, this paper provides a novel explanation to the question that why
small countries export less than big countries. In small country, they trade more withthemselves because of lower internal trade cost and big countries have to trade more withothers because trade with themselves is costly.
29

A promising venue to extend this paper is to disentangle the components of theinternal trade cost measure recovered in this paper and conduct counterfactual exercisesby twitching its components.

30

References
Alvarez, F. and Lucas, R. E. (2007). General equilibrium analysis of the Eaton-Kortum
model of international trade. Journal of Monetary Economics, 54(6):1726–1768.
Anderson, J. E. and Van Wincoop, E. (2003). Gravity with gravitas: A solution to theborder puzzle. American Economic Review, 93(1):170–192.
Anderson, J. E. and Yotov, Y. V. (2010). The changing incidence of geography. American
Economic Review, 100(5):2157–2186.
Antràs, P., Fort, T. C., and Tintelnot, F. (2017). The margins of global sourcing: Theory
and evidence from US firms. American Economic Review, 107(9):2514–2564.
Arkolakis, C. (2010). Market penetration costs and the new consumers margin in international trade. Journal of Political Economy, 118(6):1151–1199.
Arkolakis, C., Costinot, A., and Rodrı́guez-Clare, A. (2012). New trade models, sameold gains? American Economic Review, 102(1):94–130.
Atkin, D. and Donaldson, D. (2017). Who’s Getting Globalized? The Size and Implications of Intra-National Trade Costs. SSRN Electronic Journal.
Chen, N. (2004). Intra-national versus international trade in the European Union: Why
do national borders matter? Journal of International Economics, 63(1):93–118.
Coughlin, C. C. and Novy, D. (2021). ESTIMATING BORDER EFFECTS: THE IMPACT OF SPATIAL AGGREGATION. International Economic Review.
Donaldson, D. (2018). Railroads of the Raj: Estimating the impact of transportation
infrastructure. American Economic Review, 108(4-5):899–934.
Donaldson, D. and Hornbeck, R. (2016). Railroads and American economic growth: A”market access” approach. Quarterly Journal of Economics, 131(2):799–858.
Eaton, J. and Kortum, S. (2002). Technology, geography, and trade. Econometrica,
70(5):1741–1779.
Eaton, J., Kortum, S., and Kramarz, F. (2011). An anatomy of international trade:
Evidence from French firms. Econometrica, 79(5):1453–1498.
Egger, P. H. and Nigai, S. (2015). Structural gravity with dummies only: Constrained
ANOVA-type estimation of gravity models. Journal of International Economics,
97(1):86–99.

31

Head, K. and Mayer, T. (2014). Gravity Equations: Workhorse,Toolkit, and Cookbook.
In Handbook of International Economics, volume 4, pages 131–195. Elsevier B.V.
Heid, B., Larch, M., and Yotov, Y. V. (2021). Estimating the effects of non-discriminatory
trade policies within structural gravity models. Canadian Journal of Economics,
54(1):376–409.
Kerem Coşar, A. and Fajgelbaum, P. D. (2016). Internal geography, international trade,and regional specialization. American Economic Journal: Microeconomics, 8(1):24–56.
Levchenko, A. A. and Zhang, J. (2016). The evolution of comparative advantage: Measurement and welfare implications. Journal of Monetary Economics, 78:96–111.
McCallum, J. (1995). National Borders Matter: Canada-U.S. Regional Trade Patterns.
American Economic Review, 85(3):615–623.
Melitz, M. J. (2003). The impact of trade on intra-industry reallocations and aggregate
industry productivity. Econometrica, 71(6):1695–1725.
Ramondo, N., Rodrı́guez-Clare, A., and Saborı́o-Rodrı́guez, M. (2016). Trade, domestic
frictions, and scale effects. American Economic Review, 106(10):3159–3184.
Redding, S. J. and Weinstein, D. E. (2019). Aggregation and the Gravity Equation. AEA
Papers and Proceedings, 109:450–455.
Santamaria, M. A., Ventura, J., and Yesilbayraktar, U. (2020). Borders Within Europe.
Simonovska, I. and Waugh, M. E. (2014). The elasticity of trade: Estimates and evidence.
Journal of International Economics, 92(1):34–50.
Waugh, M. E. (2010). International trade and income differences. American Economic
Review, 100(5):2093–2124.
Wrona, J. (2018). BORDER EFFECTS WITHOUT BORDERS: WHAT DIVIDESJAPAN’S INTERNAL TRADE? International Economic Review, 59(3):1209–1262.
Yotov, Y. V. (2012). A simple solution to the distance puzzle in international trade.
Economics Letters, 117(3):794–798.

32

Appendices
A

Theory Appendix

A.1

Aggregation of Country Level Price Index

From the main text, the country level internal trade cost is defined as:Dii−θ :=

X
1
1
+
d−θ ,
Ni Ni m∈Ξ ,m̸=n mniand the country level international trade cost satisfy:
−θ
Dij
= d−θ
mn ,

∀m ∈ Ξi , n ∈ Ξj .

Under the above two conditions, the basic geographical unit level trade cost can betransformed as:
p−θ
i =

XX

−θ
tm c−θ
m dmni∈Ω m∈Ξi=X−θtm c−θ
m dmn +==

−θtm c−θ
m dmn

j̸=i,j∈Ω m∈Ξj

m∈Ξi

X

X X

−θ
tm c−θ
m dmn +

X

tm c−θ
mm∈Ξi

j̸=i,j∈ΩXX−θ
ti c−θ
i dmn +

m∈Ξi

X

−θ
Dji

m∈Ξj

−θ
Nj tj c−θj Djij̸=i,j∈Ω!
= ti c−θ
i

1+

X

d−θ
mn

−θ
= Ni ti c−θ
i Dii +X−θ
Nj tj c−θj Djij̸=i,j∈Ωm∈Ξi ,m̸=n

X

+

−θ
Nj tj c−θj Djij̸=i,j∈ΩX−θ= Ni li ϕi c−θ
i Dii +

−θ
Nj lj ϕj c−θj Dji

j̸=i,j∈Ω−θ= Li ϕi c−θ
i Dii +X−θ
Lj ϕj c−θj Djij̸=i,j∈Ω=X−θ
Lj ϕj c−θ
j Dji .

j∈Ω

The last step of the equation uses the fact that one country’s total labor is the sum ofP−θ
the labor of each basic units Lj = Nj lj . Recalling that Pi−θ := j∈Ω Tj c−θ
j dji , to ensurePi−θ = p−θ
i , Tj has to be defined as
Tj = ϕj Lj .
33

A.2

Real Income Formula

To facilitate derivation, we define V A := wiαi ri1−αi , then from final goods price equation
we have:
pF = B wiαi ri1−αi

γ

p1−γ
i

pF = B (V A)γ pi1−γ

1−γ
VA
1
VA
=
.
pF
pi
B

(39)

From the intermediate input unit cost formula, we know thatci = A (V A)β p1−βi
 1/β
VA
ci
1
=
.
pi
pi
A1/β

(40)

From the trade share equation, we know that−θ−θ
Ti c−θ
Ti c−θ
i Dii
i Dii
=
−θ −θ
p−θ
i
k∈Ω Tk ck Dkj 1/θ
Ti
1
ci
=
.
pi
Πii
Dii

Πii = P

(41)

ri Ki
, the value added expression can be transformed into:
Because of wαi Li i = 1−αiV A = wiαi ri1−αi

1−αi  1−αi
1 − αi
Li
VA=
wi
αi
Ki

1−αi  1−αi
1 − αi
Ii
Li
VA=
αi .
αi
Ki
Li

(42)

After substituting equation (41) into equation (40) and equation (40) into equation (39),replace the VA in equation (39) with the formula in equation (42), we can arrive at thefollowing real income per capita formula:
Ii /Li
=C
pF



Ti
Πii

 1−γ

βθ

34

1
Dii

 1−γ

β

Ki
Li

1−αi
.

B

Empirics Appendix

B.1

Robustness of Internal Trade Cost Measure against Country Size

The Figure 14 shows the internal trade cost measure against real GDP. The Figure 15
shows the internal trade cost measure against real GDP per capita.
Figure 14: Internal Trade Cost Measure across Country Real GDP

Note: The internal trade cost measure in the USA is normalized at 1. The year for population size is2014.

From Figures 1, 14, 15, although there might be difference in how tight the increasing
relationship between internal trade cost measure and various country size measures, it isgenerally true internal trade cost measure increase in country size.

B.2

Comparison of Internal Trade Cost and Difference between
Fixed Effects

The Figure 16 displays the relationship between contribution of internal trade cost measure on trade flows vis-à-vis difference between fixed effects estimated in a cross-sectionalsetting. The identification of fixed effect uses variations across partners and not acrosstime. And this tight relationship especially for the top 10 GDP countries between thetwo sets of values validates the prediction in the theory section on the ratio type gravity
equation. The main features observed in Figure 5 are preserved in Figure 16 except it’smore noisy here because of the year specific shocks.
35

Figure 15: Internal Trade Cost Measure across Country Real GDP per Capita

Note: The internal trade cost measure in the USA is normalized at 1. The year for population size is
2014. The real GDP per capita is computed as real GDP divided by the total number of employment.

B.3

Robustness Check for Trade Share Regularities

Here we present the same graph as Figure 7 for country China and Ethiopia. The similar
pattern emphasized in he main text persists for country China and Ethiopia.

B.4

Cookbook Steps of Calibration

1. From ratio gravity estimation,
Xij
Ti c−θ
i
=
D−θ ,
−θ ij
Xjj
Tj c−θ
Djjj
obtain the exporter fixed effect Ŝi as estimates of log(Ti c−θi ) and τ̂ij and τ̂jj as esti−θ−θmates of log(Dij) and log(Djj).
2. Given Ŝi and τ̂ij as estimates of country competitiveness and trade cost, the priceindex estimate can be computed as:
!−1/θ
pi =

X

exp(Sˆj τˆji ).

j

3. Given the value of Li , αi and Πij , the following equation can be used to obtain wi
36

Figure 16: Differences in Fixed Effects versus Internal Trade Cost

Note: The values on x axis are the absolute value of mean difference between two types of fixed effectsof the same country in a ratio type gravity estimation for year 2014. The values on y axis are theabsolute value of contribution from internal trade cost on internal trade flow in a panel trade level
gravity estimation. Both sets of values are computed relative to the USA level.

up to a normalization:
wi

Li X
Lj
=
Πij wj .
αiαjj4. Using the Capital Labor ratio to obtain ri :
ri Ki
wi Li
=
.
αi
1 − αi5. Given estimates of wi , ri , pi , Ŝi , the technology paramater can be recovered:exp(Ŝi ) = Ti c−θ
i ,ci = A wiα ri1−α

β

p1−β
.
i

6. Given the value of Li , the technology intensity parameter can be recovered:ϕi = Ti /Li .

37

Figure 17: Trade Shares across Countries for CHN as Importer

Note: The trade shares are the expenditure share CHN spends on each exporter’s goods and they arecalculated among the countries displayed with trade flows in year 2014.

7. The final goods price and real income can be backed up as:
pF = B wiαi ri1−αi
Wi =

B.5

γ

p1−γ
,
i

wi + ri Ki /Li.
pF

Model B’s Fit in Real Income and Final Price

The model B’s fit in matching real income data is 0.967 which is the same as model A
and its fit in matching final price is 0.785 which is slightly lower than model A.

38

Figure 18: Trade Shares across Countries for ETH as Importer

Note: The trade shares are the expenditure share ETH spends on each exporter’s goods and they arecalculated among the countries displayed with trade flows in year 2014.

Figure 19: Real Income Prediction from Model B versus Data

Note: The real GDP per capita is computed as real GDP divided by total employment in that country
in year 2014. Both data and model predictions are normalized with respect to the USA.

39

Figure 20: Consumer Price Prediction from Model B versus Data

Note: Both data and model predictions are normalized with respect to the USA. The data in year 2014is used.

40