metadata: authors: 0: author: Arvis,Jean Francois
count: World
docna: 0: docna: How many dimensions do we trade in ? product
            space geometry and latent comparative advantage
docty: Policy Research Working Paper
subtopic: Climate Change and Agriculture,Judicial System Reform,Crops and Crop Management Systems,Fertilizers,International Trade and Trade Rules,Trade and Services,Energy Demand,Energy and Environment,Energy and Mining
teratopic: Private Sector Development,Macroeconomics and Economic Growth,International Economics and Trade,Poverty Reduction
abstracts: cdata!: This paper proposes a new quantitative
            implementation of Balassa's idea that export
            composition and revealed comparative advantage inform the
            relationship between endowments in domestic factors of
            production and exports. It proposes that the export
            composition of countries is close to a low-dimensional
            manifold or "Product Space" within the space of
            export composition, which has as many dimensions as product
            lines. The Product Space corresponds to a few latent
            endowments explaining the structure of the trade matrix. The
            model uses non-linear techniques to identify the product
            space from the 2010 export matrix of 128 countries and 61
            products, and to estimate the latent factors of endowments
            by country. It formalizes a concept of latent comparative
            advantage, which has practical country specific
            applications, relevant for "trade competitiveness"
            policies. Compared with classical revealed comparative
            advantage, the model assesses how well countries are
            matching their potential implied by the latent variables,
            and also identifies products for which the latent advantage
            is not yet revealed (extensive margin). The data suggests
            that the degree of overlap between latent and revealed
            advantage is a metric of "trade competitiveness."
repnme: repnme: How many dimensions do we trade in ?
            product space geometry and latent comparative advantage
display_title: How many dimensions do we trade in
            product space geometry and latent comparative advantage
listing_relative_url: /research/2013/06/17840245/many-dimensions-trade-product-space-geometry-latent-comparative-advantage
topicv3: Justice m1326106 840,Energy and Extractives m1326595 507,Trade m1326924 698,Trade in Services m1326928 780,Fertilizers m1327354 175
publishtoextweb_dt: 2013-06-01T00:00:00Z
historic_topic: Private Sector Development,Macroeconomics and Economic Growth,International Economics and Trade,Poverty Reduction
no_of_pages: 42
author_keys: 0: author_key: 452197
model_extractions: WPS6478 Policy Research Working Paper 6478 How Many Dimensions Do We Trade In?

Product Space Geometry and Latent Comparative Advantage _Jean-François Arvis_ The World Bank Poverty Reduction and Economic Management Network International Trade Department June 2013
Policy Research Working Paper 6478

# **Abstract**

This paper proposes a new quantitative implementation of Balassa’s idea that export composition and revealed comparative advantage inform the relationship between endowments in domestic factors of production and exports. It proposes that the export composition of countries is close to a low-dimensional manifold or “Product Space” within the space of export composition, which has as many dimensions as product lines. The Product Space corresponds to a few latent endowments explaining the structure of the trade matrix. The model uses non-linear techniques to identify the product space from the 2010 export matrix of 128 countries and 61 products, and to estimate the latent factors of endowments by country. It formalizes a concept of latent comparative advantage, which has practical country specific applications, relevant for “trade competitiveness” policies. Compared with classical revealed comparative advantage, the model assesses how well countries are matching their potential implied by the latent variables, and also identifies products for which the latent advantage is not yet revealed (extensive margin). The data suggests that the degree of overlap between latent and revealed advantage is a metric of “trade competitiveness.” This paper is a product of the International Trade Department, Poverty Reduction and Economic Management Network. It is part of a larger effort by the World Bank to provide open access to its research and make a contribution to development policy discussions around the world. Policy Research Working Papers are also posted on the Web at http://econ.worldbank. org. The author may be contacted at jarvis1@worldbank.org.

_The Policy Research Working Paper Series disseminates the findings of work in progress to encourage the exchange of ideas about development issues. An objective of the series is to get the findings out quickly, even if the presentations are less than fully polished. The papers carry the names of the authors and should be cited accordingly. The findings, interpretations, and conclusions expressed in this paper are entirely those of the authors. They do not necessarily represent the views of the International Bank for Reconstruction and Development/World Bank and its affiliated organizations, or those of the Executive Directors of the World Bank or the governments they represent._ Produced by the Research Support Team
# **How Many Dimensions Do We Trade In? Product Space Geometry and Latent Comparative Advantage**

Jean-François Arvis<sup>12</sup>

# JEL C14, F11, F15, O24, O25

Keywords : Trade, Export Competitiveness, Comparative Advantage, Product Space, Non-linear Sector Board : Economic Policy

> 1 <u>Jarvis1@worldbank.org, International Trade Department, the World Bank, Washington, D.C.</u>

2 The author would like to thank the following World Bank colleagues for useful inputs, comments and encouragements: Daniel Saslavski, Najy Benhassine, Olivier Cadot, Amir Fouad, Mona Haddad, Bernard Hoekman, Claire Hollweg, Daniel Lederman, Anasuya Raj, Cordula Rastogi, José Guillerme Reis, Benjamin Shepherd, and Daria Taglioni.
_“Si nous comparons les nations entre elles, par quels signes certains constaterons-nous les progrès ou la décadence de leur prospérité ? “ (*)_ Antoine-Augustin Cournot “Recherches sur les principes mathématiques de la théorie des richesses” (1838, chapter 5) (*)When comparing nations among themselves, by which sure signs shall we notice progress or decadence of their wealth?

# **1 Introduction: What You Export Matters**

What countries produce and eventually export depends upon a number of production inputs (labor, physical and human capital) and also domestic factors that impact productivity such as the business environment, institutions or governance (Hausmann, Hwang, & Rodrik, 2006), (Nunn, 2007), (McMillan & Rodrik, 2011). Differences in endowments of factors largely determine the composition of exports. Rich countries tend to export more sophisticated products. However, even at the same level of development, as measured for instance by GDP per capita, countries may be involved in production and exportation of more or less diversified baskets of products.

This phenomenon is generally referred to by policy makers and the institutions advising them as “export competitiveness”. Although the concept of competitiveness is intuitive to policy makers and practitioners (WEF, 2012), there is no consensus among experts on a formal definition of competitiveness embedded in economic theory ((Leamer, 1993)(J. P. Neary, 2003; J. Neary, 2006)); an ordinal concept of absolute competitiveness may not be easily reconciled with classical trade theory (comparative advantage).

Even loosely defined, competitiveness may be related to cross-sector and cross-country productivity changes that depend on factors such as cost of labor, capital, skills, logistics, innovation, quality standards, infrastructure (availability and quality), quality of institutions, corruption, etc. Understanding the relationship between countries’ endowments in those factors and the potential for growth through diversification of production and exports has been a major policy concern in rich and emerging economies, but also increasingly in poor countries willing to reduce their dependence on a relatively small basket of commodities.

Unsurprisingly, it is an area of very active policy work, especially by organizations whose role is to provide support to developing countries and advise on growth strategies (Reis & Farole, 2012). Disentangling competitiveness and understanding the linkages between factors of competiveness on the one hand, and export content and its diversification on the other hand, has been high on the practical policy research agenda in recent years. Several groups have made substantive contributions at both the conceptual and advisory levels, including multinational organizations (for example, the World Bank, International Trade Center, and World Economic Forum) and academia (including the Kennedy School of Economics and MIT). This paper is a contribution to the World Bank effort under the leadership of its International Trade Department.

The main challenge is to adequately relate trade and production outcomes by sector (i.e. export composition) with variables that capture quantitative inputs or performance metrics of these sectors at the country level. Such metrics would best capture the impact on production of a set of 2
domestic endowments or of relevant policies. Fortunately most of the relevant variables are now covered by established datasets of indicators based on statistics or, very often, surveys. To meet the expectations of policy makers to understand the differences of dynamics by industry, the analysis had to be disaggregated at the sector level. This provides a “meso-economic” description of how differences in factor endowment may be more conducive of certain products or exports.

The insight that trade outcomes can reveal information on sources of competitiveness or comparative advantage goes back half a century, when Balassa introduced the concept of revealed comparative advantage. This paper follows this tradition. It proposes that the structure of the global export matrix can be essentially explained by a few latent factors of endowments that determine comparative advantage. Thus the position of the problem is “inverse”: country and product factor variables are deduced from the export outcome data, in contrast to the traditional econometric approach whereby export outcomes are regressed against actual endowment variables.

A nonlinear dimensionality reduction procedure (exponential-PCA or E-PCA) analyzes and produces the few latent factors. Although based on off-the-shelf mathematical tools and intensive computations, the main outputs consist in country specific information of practical value, including the latent composition of trade and latent comparative advantage ratios. Ultimately the paper proposes a scientific solution to the old problem of estimating the potential for diversification of countries based on existing data and trade theory.

The remainder of the paper is organized as follows.

The first part of the paper (section 2) introduces the key concepts and surveys the literature.

The second part of the paper develops an alternative concept of product space (section 3) rooted in neoclassical trade theory (section 4). It introduces the factor supply elasticity, which is a measure of the productivity gains brought about by changes in the supply of factors across countries. The estimation of the model requires non-linear techniques -Poisson Pseudo Maximum Likelihood (PLM)-, in contrast to previous implementations, and corresponds to a non-linear projection of the product space onto a one-dimensional manifold (section 5). Implementation to trade data and various factors of competitiveness is commented on (section 6).

Finally, the third part of the paper proposes to push the model further by applying a consistent procedure of dimensionality reduction to the product space to identify its dimensions. It combines non-linear estimation (Poisson PLM) with principal component analysis (E-PCA) (section 7). Country and product coordinates are estimated through this non-linear “projection”. The significance of the principal axes in this reduction and their relationship with known factors of competitiveness are investigated (section 8), along with comparisons of latent against revealed comparative advantage by country (section 9).

The research dataset is available at www.worldbank.org/trade -> Data 3
# **2 Composition Space and Revealed Comparative Advantage: A Literature Review**

Following the tradition of most empirical work, this paper analyzes export data. Indeed, export data are available across countries at a detailed sector level, more reliably than production data. Furthermore, trade data may be more relevant for assessing cross-country competitiveness since, by definition, this notion reflects competition between exporters from different countries.

However, the focus on export data may omit important features of production and trade. For instance, the ability to participate in global value chains and production sharing drives much of developing countries’ diversification towards more complex production. An analysis based solely on export data, although already quite complex, may not capture fully the consequences of the cross-border nature of value chains or the importance of international backward and forward linkages (Baldwin, 2010).

# **_Composition Space and Revealed Comparative Advantage_**

**_— —_** At an abstract level, changes or rather relative changes in factor endowments will correspond to trajectories of countries in the composition space of exports, where coordinates are the shares of exports by product. Composition space has many dimensions; as many as distinct product **_—_** lines in the data. A change of composition in exports resulting from a change over time (or **_—_** across countries) of factors endowment is naturally represented by a trajectory in a space with as many dimensions as products, where the coordinates are the relative export composition by country. The concept transposes to represent the position of cross-sections of countries with different endowments in factors of production. The composition coordinates are export shares:

Therefore, the composition space is the hyper-plane of co-dimension one (Fig 1) where the “movement” takes place: and A perspective going back at least to Balassa (Balassa, 1979, 1986) is that the position of the problem can be reverted. Trajectories in composition space can "reveal" information about the importance or relative importance of factors of production for (export) competitiveness.

Balassa proposed the revealed comparative advantage (RCA) as a more meaningful representation of the position of countries in Composition Space than the composition vector. The RCA is the ratio of the country’s export share of a particular product against the global

> 3 The paper refers to a dot subscript as sums by countries or products (Einstein’s convention).

4
- f,

I, f, f, <!-- Start of picture text -->
-<br><!-- End of picture text -->

Sf,
xX. _ Lyle fay >» ai 7X,
increases initially and then decreases beyond a point where comparative advantage has grown higher and the export of the product more intensive in the factor (Wells 1961). However, the optimal or typical factor supply for an industry is a dynamical outcome resulting from differentials in productivity across countries, products and global market demand (section 3); it is not a primary mechanism.

The RFI does not provide an explicit predictive model that could relate change in endowments to changes in RCAs or export composition. The "skeleton" approach in the product space decomposition is also based on a series of simplifications and does not provide either countryspecific information on its non-revealed potential or the linkages between composition and endowments.

Both models are univariate. The RFI takes one factor at a time, even though many factors enter into a production function simultaneously. Economic complexity is also one dimensional. Neither the RFI nor the product space decomposition include a metric on how well they explain the structure of the composition matrix—the equivalent of an goodness of fit in a linear regression—making it difficult to assess quantitatively the explanatory value of the theory.

Another problem in interpreting the RFI/PRODY is that, being a weighted average of factor variable by country, it is essentially the first iteration towards a trivial fixed point, which is the simple average of the factor index value across countries. In fact for actual trade data it is easy to check that the rate of convergence is relatively fast.

**<u>3 What Export Composition Tells about Factor Endowments: Product Space and Latent</u> Comparative Advantage**

Although the original composition space has many dimensions—more than sixty if one retains a classification with two digits—it is expected that trade composition is determined by a much smaller number of factors of endowments. Hence the points representing countries in the composition space should be close to a manifold (or sub-space) with relatively few dimensions within the much larger composition space (Fig. 2).

This manifold, dubbed “Product Space”,<sup>4</sup> is identified from the trade data through a geometric concept of dimensionality reduction. Modern econometric techniques yield a minimal set of latent factors for each country that best explain the structure of the trade matrix. The implementation of Product Space and latent factors is formalized in the forthcoming sections.

Countries have coordinates in the product space that represent latent factors and correspond to their projection from the composition space onto the product space. Products have dual coordinates in the same space. Thus the problem exhibits symmetry between countries and products. These product coordinates are export elasticities to each of the country’s factor endowment variables.

> 4 The author chose to use the same vocabulary as HHR to refer to the geometrical object capturing the structure of export composition However, the parameterization of product space is very different in the two models: “skeleton” network in HHR vs. a continuous low dimensional manifold here.

7
<!-- Start of picture text -->
| L. XaX;<br>»<br>‘;|<br>RCA,;=oe<br>yilil | [<br>XN<br>XN<br>AN<br>e@ e OG : |<br>e X ai x ai x x<br>ae<br>@ e@ X a a x , ,<br>Cd<br><!-- End of picture text -->

<!-- Start of picture text --> yilil |<br>XN<br>XN<br>AN<br>Pd e@ e OG : |<br>e®? e<br>e @ e@<br>Cd<br><!-- End of picture text -->

<!-- Start of picture text --> XN<br>XN<br>AN<br>e@ e OG : |<br>e X ai x ai x x<br>ae<br>@ e@ X a a x , ,<br>Cd<br><!-- End of picture text -->
model has predictive value. For example, the expected change in export composition due to a change in endowments in the product space can be computed. Furthermore, the projection of countries in the low-dimensional product space corresponds to a reference latent export composition or latent comparative advantage (LCA), .

The comparison between latent and actual compositions, or between revealed and latent comparative advantages, carries significant country information and may help answer practical questions. For example, how well a country realizes the potential of its position in the product space, or whether there are opportunities of production with significant latent comparative advantages not yet reflected in current comparative advantages.

# **4 Product Space in Trade Theory: Factor Supply Elasticities**

This section formalizes the expected dependence of export composition on factors of endowments and product specific elasticities, which spans the Product Space.

Effects on production or exports from changes in domestic endowments are expected to happen through industry specific changes in productivity and eventually comparative advantage. In other words, the export from country a in product i would depend on the individual (or the set of) factor(s) f in the following way, where is a positive function summarizing the impact of the factor(s) f on the advantage to produce in industry i in country a. Furthermore, the export flow is dependent on the size of the market for product i and on the size of the exporting economy a, yielding a bi-proportional structure of exports , or , where the multiplicative fixed effects and account, respectively, for export country a’s size and product i’s market demand.

Revealed comparative advantages are positive numbers distributed over several orders of magnitude (Fig 3). Effects of different factors on productivity and comparative advantage are intuitively expected to be multiplicative. It is therefore natural to look for log-linear dependence where the expected impact of factor endowments is to enhance (or decrease depending on the direction of the effect) production and trade with a product dependent elasticity, hereon referred as **Factor Supply Elasticity** (FSE) .

9
**Fig 3. the distribution of RCAs (128 countries, 61 products)**

<!-- Start of picture text -->
-6 -4 -2 0 2<br>RCA logarithmic scale (base 10)<br>15<br>10<br>% of sample<br>5<br>0<br><!-- End of picture text -->

Hence the exports by country a of product i take the form

> <sup>for one factor and</sup>

**,** for several independent factors

This intuitive relationship is also embedded in modern quantitative trade theory exposed by many authors (J.E. Anderson, 2010; James E Anderson & van Wincoop, 2003; Armington, 1969). Essentially neoclassical quantitative models of trade flows suppose some degree of country differentiation (Armington’s hypothesis) and make use of CES preferences by importers. They thus produce the generic multiplicative structure.

where represents the price of exports of product i by country a, is the Armington elasticity of substitution for product i, and is an average price over .<sup>Since the price would be</sup> inversely related to factor productivity Π _ai_ of country a’s exports of product i, then the export flow comes as a formula already in the original Armington paper (Armington 1969). If factor productivity comes in the classical Cobb-Douglas functional form of the indexes f of factor endowments, 10
<!-- Start of picture text --> a= (l— ) * B.<br><!-- End of picture text --> ~~a~~ Of, ae <!-- Start of picture text --> ae<br><!-- End of picture text --> a, a <!-- Start of picture text --> f, = (simple) average(f,)+ @,variance( f = (simple) average(f,)+ @,variance( f (simple) average(f,)+ @,variance( f average(f,)+ @,variance( ff,)+ @,variance( f @,variance( f f )<br><!-- End of picture text --> f, = (simple) average(f,)+ @,variance( f = (simple) average(f,)+ @,variance( f (simple) average(f,)+ @,variance( f average(f,)+ @,variance( ff,)+ @,variance( f @,variance( f f )
# **_Invariances_**

The export matrix is invariant to a series of transformations of country and product market coefficients, as well as factors and elasticities. Again, consider the case of one endowment: . The following invariances apply (independently for each endowment):

1. Rescaling of As by the same coefficient and its inverse applied to the Bs.

- and

2. Constant shift of all the factors<sup>_f_</sup> _a_<sup>by f and corresponding change for the Bs</sup> and 3. Constant shift of all the elasticities α _i_ by α and corresponding change for the As α _i_ → α _i_ + α and _Aa_ → _A expa_ ( − _fa_ α ) Given these invariances, what is the meaning of the country and product coefficients A and B? How do A and B differ from total export and import markets? Indeed, in a flat world without specialization, the simple formula would hold, and A (respectively B) would be proportional to total exports Xa (respectively Xi). In general the proportionality does not hold and A and B are adjusted from exports and imports by a form of the “multilateral resistance” coefficient, .

# **_A Toy Model: Dynamic Life Cycle Effects and the Connection between Factor Supply Elasticities andRrevealed Factor Intensity_**

Life cycle effects, where products are apparently associated to a typical level of factor endowments as in HHR, are built in the model when countries have unequal factor supply. This comes as a consequence on the one hand of unequal factor supply between countries and on the other hand of market clearance constraints. Countries with the highest factor will concentrate their exports in the sector with the highest FSE.

Let us consider a minimalist **toy model** example with two sectors, a continuum of countries with factor f varying from 0 to 1, equal total exports per country, and equal demand for each of the two sectors. Let the elasticity be for product 1 and zero for product 2 ( represents the difference in elasticity with respect to f in the two sectors)<sup>.</sup> Then the relative strength of exports of product 1 as a function of f is proportional to , and the share of product 1 in the exports of a country with endowment f has an S shape (Fig 4) 12
<!-- Start of picture text --> .<br><!-- End of picture text -->

# **Fig 4. Share of product 1 as a function of the factor endowment for different values of the elasticity**

<!-- Start of picture text --> 100%<br>90%<br>80%<br>70%<br>0.5<br>60%<br>1<br>50%<br>2<br>40%<br>5<br>30%<br>10<br>20%<br>10%<br>0%<br>0 0.2 0.4 0.6 0.8 1<br><!-- End of picture text --> Under the assumption that countries’ total exports are the same, the RFI of product 1 will be This number ranges from 0.5 to 1. Fig 5 plots this function along with the linear approximation of the previous section. The toy model shows that the linear relationship RFI/ FSI may hold even for not-so-small elasticities (up to two or three).

**Fig 5. Revealed factor intensity for product 1as a function of the elasticity**

<!-- Start of picture text --> 0.75<br>0.7<br>0.65<br>RFI<br>0.6<br>linear approx<br>0.55<br>0.5<br>0 2 4 6 8 10<br>Elasticity<br>Revealed factor Intesity<br><!-- End of picture text --> 13
xX, <!-- Start of picture text --> xX,<br><!-- End of picture text --> <!-- Start of picture text --> VX =D<br><!-- End of picture text --> <!-- Start of picture text --> VX =D<br><!-- End of picture text --> VX =D VX =D <!-- Start of picture text --> LCA“=a.XaX. Xa poy<br>XX, XX, XxX, “<br><!-- End of picture text --> <!-- Start of picture text --> PML xX. -<br> = 2X Log") +X, -X }=-I<br>ai an<br><!-- End of picture text --> X
The information distance (Kullback Leibler distance) between the flat matrix and the actual one measures how non trivial the structure of export is, with strong specializations of countries.

According to McFadden‘s interpretation, the quality of a PML regression leading to the predicted value can be quantitatively measured by the relative improvement in the log-likelihood or, in this paper’s context, the share of the information in the export matrix explained by the regression, namely:

# **_To What Degree do Countries Capture their Comparative Advantage?_**

The information metric I can be broken down according to the (relative) contribution of individual countries and for the “flat” composition The information metric Ia measures how close a country’s export composition is to the latent 0 composition estimated from the model. The smaller Ia is compared to the initial<sup>_I_</sup> _a_<sup>, the better.</sup>

# **_Econometric Implementation_**

The parameters to be estimated are the fixed effect coefficients, and , and the elasticities . The maximization conditions yield three series of equalities. for all a (maximization in ), for all i (maximization in ), and 15
These conditions are equivalent to saying that the estimator conserves i) the total in row and column, or margins, of the trade matrix (Arvis 2011), as well as ii) the weighted average of the country factors.

However, given the invariance properties of the estimators (section 3), there are two degrees of indetermination in the problem:

- First the A and B are determined up to a scale factor irrelevant to elasticities

- In the numerical implementation we relieve the indetermination by imposing that the sums of A and B are equal.

- Then the elasticities are known up to a constant. To relieve this indetermination, in the following we choose the convention that the weighted average of elasticities is zero:

These conventions have no relevance to the predicted values of the model , but are needed for the implementation of the numerical algorithm. This algorithm recursively:

- Estimates the next A and B using the line and row conditions for a given set of elasticities ;

- Recomputes the next approximation for the elasticities using Newton’s approximation to solve the equation of conservation of average factor.

# **6 Application: Estimating the Factor Supply Elasticities for Known Endowments**

This section applies the model to actual trade data when factors of endowments are known, and determines the factor supply elasticities by product.

The Poisson pseudo maximum likelihood is implemented for one year (2010) starting with 61 sectors at the 2-digit SITC rev 3 level. The independent variables used in the model are indicators typically used to explain trade volumes or trade costs.

The following calculations have been implemented:

1. Computation of the factor supply intensity and the revealed factor intensity for each of the variables (Table 1).

2. Computation of multivariate factor supply intensity for a combination of independent variables (Tables 2-3).

The main findings are: 16
1. Individual indicators taken separately do not have a very strong explanatory power (max 15%). That is, no single endowment can explain the export matrix well.

2. The FSE and RFI are as expected (section 4) strongly correlated (Fig 7 and Table 5). 3. Results 1 and 2 imply that RFI/PRODY explains a small share of the information in the export matrix. The explanatory power of such univariate indicators is more limited than previously thought.

4. Including several variables improves the information explained by the model but not too strongly: five variables cannot explain 50% of the information. Furthermore, the multivariate elasticities are expectedly quite dependent on the other variables included in the model.

|**Table 1. Information explained by individual selected “competitiveness” variables**|
|---|

|Variable|Source|Countries|<br>Information<br>in model|
|---|---|---|---|
|GDPper capita(current US$) _log_|WDI|121|<br>0.149|
|GDP,PPP(current international$) _log_|WDI|119|0.0557|
|Liner shippingconnectivityindex 2010|UNCTAD|<br>103|<br>0.145|
|Time required to start a business(days)|WDI|125|<br>0.062|
|Natural Capital, $ per worker_log_|WDI|100|<br>0.136|
|Physical Capital Stockper Worker_log_|UNCTAD|<br>111|<br>0.145|
|Governance: Political Stabilityand Absence of Violence 2011|<br>WDI|128|<br>0.113|
|Governance: Government Effectiveness 2011|WDI|128|<br>0.118|
|Governance: Regulatory quality2011|WDI|128|<br>0.123|
|Governance Rule of Law 2011|WDI|128|<br>0.136|
|Governance: Control of Corruption 2011|WDI|128|<br>0.130|
|Governance: Voice and Accountability2011|WDI|128|<br>0.167|
|lpi score 2010|WDI|119|0.119|
|tons equivalentper unit ofgdp _log_|WDI|110|<br>0.076|

# **Table 2. Multivariate FSE estimates (two variables)**

First variable is log GNI per capita.

|Second Variable|countries|<br>Information<br>content|
|---|---|---|
|Liner shippingconnectivityindex|96|<br>0.274|
|Natural Capital, $ per worker|95|<br>0.289|
|Physical Capital Stockper Worker|106|<br>0.203|
|Governance: Political Stabilityand Absence of Violence 2011|121|<br>0.163|
|Governance: Government Effectiveness 2011|121|<br>0.186|
|Governance: Regulatory quality2011|121|<br>0.175|
|Governance: Control of Corruption 2011|121|<br>0.180|

17
# **Table 3. Multivariate FSE estimates (three variables or more).**

First variable is log GNI per capita.

The second variable is liner shipping connectivity index (maximum value in 2004 =100).

|# Variable(third and more)|count|information|
|---|---|---|
|3. Governance: Political Stability and Absence of Violence<br>2011|96|0.290|
|3. tons equivalentper unit ofgdp|89|0.328|
|3. Physical Capital Stockper Worker|88|0.322|
|3. Physical Capital Stock per Worker<br>4. Governance: Political Stability and Absence of Violence<br>2011<br>5. tons equivalentper unit ofgdp|83|0.382|
|3. Natural Capital, $ per worker|78|0.367|
|3. Natural Capital, $ per worker<br>4. Physical Capital Stock per Worker<br>5. tons equivalentper unit ofgdp|69|0.455|
|3. Natural Capital, $ per worker<br>4. Governance: Political Stability and Absence of Violence<br>2011<br>5. tons equivalentper unit ofgdp|72|0.411|

**Table 4. Correlation of Revealed Factor Intensity vs. Factor elasticity**

|GDPper capita(current US$)|0.536|
|---|---|
|GDP,PPP(current international$)|0.605|
|Liner shippingconnectivityindex|0.657|
|Time required to start a business(days)|0.101|
|Natural Capital, $ per worker|0.283|
|Physical Capital Stockper Worker|0.540|
|Governance: Political Stabilityand Absence of Violence 2011|0.597|
|Governance: Government Effectiveness 2011|0.645|
|Governance: Regulatory quality2011|0.530|
|Governance Rule of Law 2011|0.584|
|Governance: Control of Corruption 2011|0.604|
|Governance: Voice and Accountability2011|0.465|
|LPI score 2010|0.751|
|tons equivalentper unit ofgdp|0.814|

18
t; <!-- Start of picture text --> d<br>X= A A Ber af.)<br><!-- End of picture text --> d a X= A A Ber af.) f <!-- Start of picture text --> f<br><!-- End of picture text --> a weighted mean|a*|=0 Mearlf*|=0f*|=0

<!-- Start of picture text --> Mearlf*|=0f*|=0<br><!-- End of picture text -->
is fixes the scale for both factors and elasticities since the product invariant by and .

# **_Iterations_**

The E-PCA (Annex 3) generates a series of predicted matrices with an increasing number l of dimensions/variables, beginning with the “flat world” no-comparative advantage value: Each stage adds dual sets of factors and elasticities that provide the best fit with the original trade matrix. The estimator with l number of already determined latent variables is and should minimize: The information improvement brought by the variable l is the improvement in log-likelihood from l-1 to l, or

# **_The iteration from step l to l+1 proceeds as follows._**

The impact on trade and comparative advantage of the first l variables comes from the coefficient: , with for l= 0 and . is known from the previous iteration up to stage l, and the predicted value at stage l+1 is The problem is formally quasi-identical to the determination of the FSE in section 5, except that and have to be determined simultaneously. This is achieved at each stage l+1 by:

- Seeding a randomly distributed centered and normalized (zero mean and unit variance).

- Computing the corresponding elasticities as per the algorithm in section 5, and centering them.

- From the elasticities, computing with the same algorithm a new iteration of

- .

20
- Iterating until convergence, which is experimentally rather fast.

This procedure seems to produce stable results independent of the seed. The sign of factors and elasticities may be simultaneously changed from one trial to another, which has no relevance.

The number of dimensions to be retained is determined by procedures similar to the linear principal component analysis such as the scree plot.

# **8 Results: Latent Variables and Interpretation of Latent Factors**

The model of section 7 is implemented for one year (2010) starting with the 2-digit SITCS rev 3 level. Energy trade is excluded. Twelve principal components are computed in order to estimate the number of relevant dimensions.

# **_Number of dimensions in product space_**

As in PCA, the determination of the significant number of dimensions can be done by looking at the contribution to the increase of the log-likelihood _Ln_ or the reduction in unexplained information, at stage n, _I n_ .

By construction the informational content of each successive variable _J n_ = _I n_ − _I n_<sup>+</sup> 1 is decreasing hence the convex shape of the information curve and the decreasing one for the Js (see the scree plot in Fig 9). Table 5 below provides, for the first 12 component factors, the values of the contribution of component i as well as the cumulated contribution and the unexplained information in the matrix.

The number of dimensions relevant to the problem corresponds to the “bottom” of the scree where the relative information or improvement in the log-likelihood _J n_ + 1 brought by the next variable becomes significantly less than with the previous _J n_ , and could be considered as “noise”. Unfortunately, as often is the case, visual inspection (Fig 6) is not enough to identify the “bottom” of the scree. A more rigorous criterion is to compare the contribution with the one corresponding to a pure random “noise” in the data. In such a case, the contributions are in a geometric series with a ratio close to one. The noisy principal components are easily generated with computer algebra software for the same number of countries and products.

**_<u>Table 5. Improvement in information brought by the first 20 factors.</u>_**

|||Inform<br>|ation<br>||
|---|---|---|---|---|
||Unexplained<br>I|Contribution<br>J|Explained<br>100-I|“Noise” level|
|Factor|**100.00**||||
|1|**67.12**|32.88|32.88|4.36|
|2|**51.99**|15.13|48.01|4.01|
|3|**42.04 **|9.95|57.96|3.95|
|4|**35.12**|6.92|64.88|3.75|

21
|5|**29.98**|5.13|70.02|3.65|
|---|---|---|---|---|
|6|**26.39**|3.59|73.61|3.41|
|7|**23.38**|3.01|76.62|3.32|
|8|**20.97 **|2.41|79.03|3.26|
|9|**18.84 **|2.13|81.16|3.23|
|10|**16.93**|1.91|83.07|3.14|
|11|**15.46**|1.47|84.54|2.92|
|12|**14.21**|1.24|85.79|2.81|

**_Fig 6. Scree plot and explained information in the trade matrix._**

<!-- Start of picture text --> 35 100<br>C 90<br>30<br>o C<br>80<br>n 25 70 u<br>t m<br>60<br>r 20 u component<br>i n 50 l<br>noise<br>b 15 40 a<br>cumulated<br>u t<br>10 30<br>t e<br>20<br>i d<br>5<br>10<br>o<br>0 0<br>1 2 3 4 5 6 7 8 9 10 11 12<br><!-- End of picture text --> In this case, the first two dimensions explain about half of the information in the trade matrix. However, there is no sharp drop in the contribution for the following dimensions. The determination of the bottom of the scree is somewhat arbitrary, in between the third and sixth dimensions. We retain five dimensions, as from the sixth dimension onward the contribution of the component is not distinguishable from the “noise” value.

# **_Latent Variables and their Interpretation_**

The latent variables and factors for countries and products are available in the Excel files available in the online Annex. Unsurprisingly, compared with known variables (section 5), the latent variables perform much better at explaining the export matrix. Unfortunately, the interpretation of the variables is not totally obvious. The correlation between the known and latent variables is limited. This should be expected since section 5 showed that none of the typical variables explains much of the information structure of the actual matrix (10-20%).

The level of development, logistics and connectivity variables are better associated with the first two factors, as well as the variables measuring government effectiveness (the latter more for the second factor). However, the Doing Business variables do not appear as important to explaining the structure of the export matrix. This result probably stems from the fact that trade is carried 22
out not by entrant SMEs but by large established firms, while the Doing Business indicator on entry is relevant to the former.

**_Table_** **_<u>6. Pairwise correlation of known variables vs. latent variables</u>_**

||f1|f2|f3|f4|f5|
|---|---|---|---|---|---|
|GDPper capita(current US$)|-0.375|-0.434|-0.072|-0.102|-0.002|
|GDP,PPP(current international$)|-0.378|-0.288|-0.009|-0.125|0.112|
|Liner shipping connectivity index (maximum<br>value in 2004 =100)|-0.325|-0.371|-0.025|-0.135|0.162|
|Time required to start a business(days)|0.020|0.026|-0.023|0.085|0.075|
|Natural Capital, $ per worker|-0.001|-0.217|-0.044|-0.130|0.058|
|Physical Capital Stockper Worker|-0.390|-0.405|-0.001|-0.089|-0.069|
|Average Years of Schooling for 25 years and<br>over|-0.333|-0.256|0.015|-0.039|-0.075|
|Arable Land hectaresperperson|0.191|-0.031|-0.007|-0.123|-0.108|
|Arable Land hectaresper worker|0.212|0.008|-0.002|-0.100|-0.097|
|Governance: Political Stability and Absence of<br>Violence 2011|-0.177|-0.374|-0.097|-0.008|-0.112|
|Governance: Government Effectiveness 2011|-0.309|-0.458|-0.004|-0.074|-0.123|
|Governance: Regulatory quality2011|-0.294|-0.447|0.007|-0.105|-0.196|
|Governance Rule of Law 2011|-0.298|-0.454|-0.006|-0.047|-0.137|
|Governance: Control of Corruption 2011|-0.199|-0.423|-0.019|-0.027|-0.152|
|Governance: Voice and Accountability2011|-0.187|-0.376|0.005|-0.056|-0.249|
|energyexports as % total exports 2009|0.153|0.140|-0.180|0.010|0.392|
|energyexports as % total exports 2011|0.090|0.115|-0.041|-0.147|0.254|
|lpi score 2007|-0.399|-0.505|-0.058|-0.112|-0.132|
|lpi score 2010|-0.377|-0.482|0.010|-0.193|-0.159|
|tons equivalentper unit ofgdp|0.290|0.354|-0.146|0.079|0.191|

A number of patterns emerge from the pairwise correlation and the inspection of the correlation matrix as well as the reading of the distribution of countries and products in the first two dimensions:

- The first axis essentially distinguishes between labor intensive vs. resources intensive productions.

- The second axis distinguishes a greater degree of sophistication of manufacturing and the need for investment.

23
# **Fig 7. Two First Axis Products**

<!-- Start of picture text --> Articles of apparel and clothing ac<br>Fixed vegetable oils and fats<br>Footwear<br>Fish,crustaceans,mollucs,preparatio<br>Crude rubber (including synthetic a<br>Leather,leather manuf.,n.e.s.and dr<br>Textile yarn,fabrics,made-upart.,re Fertilizers,manufacturedCoffee,tea,cocoa,spices,manufacture<br>Animal-vegetable oils-fats,processeCrude fertilizers and crude materia<br>Vegetables and fruit<br>Furniture and parts thereof Cork and wood manufactures (excl.fu<br>Travel goods,handbags and similair Non-metallic mineral manufactures,nCrude animal and vegetable materialCoin(other than gold),not being legCork and wood<br>Non-ferrous metals<br>Sanitary,plumbing,heating and lightIron and steel Tobacco and tobacco manufacturesSugar,sugar preparations and honey<br>Inorganic chemicals<br>Cereals and cereal preparations<br>Rubber manufactures,n.e.s. Textile fibres (except wFeeding stuff f o r animals,not incl.ol tops) a<br>Manufactures of metal,n.e.s.Paper,paperboard,artic.of paper,papPulp and waste paper<br>Telecommunications & sound recordin Oil seeds and oleaginous fruitMetalliferous ores and metal scrap<br>Miscellaneous manufactured articles Live animals chiefly for foodAnimal oils and fats<br>Miscel.edible products and preparatDairy products and birds'eggsMeat and meat preparations<br>Office machines & automatic data pr Other transport equipmentGeneral industrial machinery & equiBeverages Hides,skins and furskins,raw<br>Artif.resins,plastic mat.,cellulose<br>Road vehicles (incl. air cushion ve<br>Power generating machinery and equi<br>Dyeing,tanning and colouring materi<br>Chemical materials and products,n.e<br>Machinery specialized for particulaExplosives and pyrotechnic products<br>Electrical machinery,apparatus & ap<br>Professional,scientific & control nEssent i al oils & perfume mat.;toile<br>Metalworking machinery<br>Gold<br>Organic chemicals<br>Medicinal and pharmaceutical produc<br>Photographic apparatus,optical good<br>-2 -1 0 1 2<br>f1<br>1.5<br>1<br>.5<br>f2<br>0<br>-.5<br>-1<br><!-- End of picture text --> 24
# **Fig 8. Two first axis countries**

<!-- Start of picture text --> BLZ<br>MUS MDG<br>MMR<br>LKA ECUNGACIVUGAYEMISLCMR<br>ALB MOZ RWA<br>PAK<br>NPL<br>KHM SLV MAR GTM KEN PANETH ZMB<br>VNM<br>IDN BWA MWI<br>TUN BIHSYRJOREGYBTN FJI CHL BOL<br>TGOAZE RUSNAM DZA<br>TURPRTDOM LUXINDLTU LVABGRGRCNORUKR COLSENMDA BENKAZNICBHR MRT<br>CHN ROMESTCRIHRV BLR IRNTTO ZAFVENARGGEOZWE ARMPRY<br>MYS SVKTHAPOLITA ESP OMNSUR BRA<br>MEXCZE NLDISRAUTSWEDNKFIN BHSLBNCAN NZL TZA GUYPERJAM<br>HUN SVN<br>PHL KOR COGDEUGBRFRAUSABELBRB CYP AUS NER<br>JPN<br>KGZ<br>SAU<br>HKG<br>MLT ARE GHA<br>SGP<br>CHE<br>BFA<br>IRL<br>MLI<br>-2 -1 0 1 2<br>f1<br>2<br>1<br>0<br>f2<br>-1<br>-2<br>-3<br><!-- End of picture text --> 25
X= A,B.) aS) <!-- Start of picture text --> xX,<br><!-- End of picture text --> xX, <!-- Start of picture text --> RCA = 20%.<br>“ XX,<br><!-- End of picture text --> ~~—_—_— ——~~ RCA = 20%. “ XX, xX, Theil actual =— > —“lopX_ —@XxX, xX Xx. el latent, » x x og x x <!-- Start of picture text --> xX Xx.<br>el latent, » x x og x x<br><!-- End of picture text -->
<!-- Start of picture text --> wtance = —_10p ——<br>KL Dista “ > Ka Xa<br>i x, ° x,<br><!-- End of picture text --> <!-- Start of picture text -->
> Min(X,,.X,,)<br>overlap = a<br><!-- End of picture text -->
# **Table 7.  Product typology and statistics (% of country-product pairs)**

||**RCA > 1**|**RCA < 1**|
|---|---|---|
|**LCA > 1**|Type 119.2%|Type 219.8%|
||Revealed potential|Untapped potential of<br>diversification|
|**LCA < 1**|Type 37.1%|Type 453.9%|
||Declining sectors?|Marginal sectors|

For each country the following derived indicators can be produced:

1. The number of products in each of the four categories: Type 1-4 #

2. The share of latent trade in each of the four categories Type 1-4 %

# **_Competitiveness as the Realization of the Latent Advantage_**

The data file provided in Annex 5 includes:

- Indices by country: Theil actual, Theil latent, KL Distance, Overlap, Type 1-4 #, Type 1- 4 %,

- The “discovery” matrix with the product typology by country.

The main observations are the following.

**LCA metrics.** The country-level indices of KL distance, overlap, and GL are expectedly related as they all measure how close latent and actual export compositions are. As expected, distance or overlap between actual and latent are also related to the relative importance of the untapped potential for diversification (Type 2).

Most significantly, the KL distance and the overlap indices seem to capture much of the export “competitiveness”, with the KL distance being slightly better:

- i. Both indicators are highly correlated with commonly accepted indicators of competitiveness such as the WEF Global Competitiveness index (Fig 9).

- ii. The ranking of countries in the sample is consistent with the general knowledge of countries’ exports (Table 10), despite a few unintuitive cases such as the Nordic countries.

- iii. The KL distance is also associated to a higher degree of diversification of their actual trade for countries close to their latent potential, as measured by the Theil index (Fig 10).

- iv. The metric of distance between latent and actual trade is better associated with generally accepted competitiveness outcomes than the diversification (Theil) index.

28
**<u>Table 8. Pairwise correlations</u>**

||Theil actual|KL distance|overlap|WEF CGI|
|---|---|---|---|---|
|KL distance|-0.6177|1|||
|overlap|0.4045|-0.8787|1||
|WEF CGI|0.4976|-0.6096|0.5723|1|
|GDPper capita 2010|0.4875|-0.5569|0.4937|0.8635|
|Shipping Connectivity|0.308|-0.4389|0.5233|0.5204|
|Capitalper worker|0.5091|-0.592|0.4937|0.7952|
|Government effectiveness|0.3734|-0.4957|0.4981|0.891|
|LPI 2010|0.5577|-0.6233|0.6014|0.8715|

**Table 9. Ranking of countries according to the information metric (KL Distance in increasing** **<u>value)</u>**

|country|rank<br>country|rank<br>country|rank<br>country|rank<br>country|rank<br>country|rank|
|---|---|---|---|---|---|---|
|DEU|1 IRL|23 ZMB|45 CRI|67 MLT|89FJI|111|
|CHN|2 SVN|24 TUN|46 NOR|68 MDG|90 DZA|112|
|USA|3 CHL|25 HRV|47 JAM|69COL|91 AZE|113|
|KOR|4 DNK|26 ARG|48 TZA|70 CYP|92 JOR|114|
|JPN|5 AUS|27 PHL|49NPL|71 MAR|93 NGA|115|
|GBR|6 HUN|28 BOL|50 UGA|72 OMN|94 MMR|116|
|CAN|7 SWE|29FIN|51 MOZ|73 LBN|95 BLZ|117|
|CZE|8 THA|30 BIH|52 BWA|74 BTN|96 ETH|118|
|POL|9TUR|31 ISR|53 PRY|75 MLI|97 CMR|119|
|ITA|10 RUS|32 ECU|54 YEM|76 NAM|98 SUR|120|
|SGP|11 VNM|33 IRN|55 LKA|77 NER|99MUS|121|
|MEX|12 ROM|34 UKR|56 SLV|78 MDA|100 ZWE|122|
|AUT|13 CHE|35 GTM|57 PAK|79GEO|101 GHA|123|
|NLD|14 VEN|36 LVA|58 NIC|80 MRT|102 CIV|124|
|FRA|15 EST|37 PAN|59BRB|81 GUY|103 KGZ|125|
|BEL|16 LTU|38 KEN|60 SYR|82 TGO|104 BEN|126|
|ESP|17 BRA|39EGY|61 ARE|83 HKG|105 BHS|127|
|IND|18 GRC|40 NZL|62 DOM|84 SEN|106 MWI|128|
|MYS|19BGR|41 PER|63 ALB|85 TTO|107||
|SVK|20 KAZ|42 BHR|64 ISL|86 COG|108||
|ZAF|21 LUX|43 SAU|65 RWA|87 BFA|109||
|PRT|22 IDN|44 ARM|66 BLR|88 KHM|110||

29
**Discovery matrix** (Annex 4). Under visual inspection, the matrix is consistent with expert knowledge of countries, including developing countries targeted by World Bank assistance.

The data for European countries also provide some illustration of the differences between countries. Table 10 below illustrates the case of Germany, France, Italy, Netherlands, Spain, and the United Kingdom.

All countries are relatively close to their latent structure as measured by the indicators of distance and overlap. However, Germany clearly stands out by being closer and having a very small extensive margin of products to be revealed. Conversely, France and the Netherlands have a rather large extensive margin. At least in the case of France, this observation and the fact that its indicators are about the same as Spain cannot but be associated to the current debate in France about the competitiveness and the future of its industry (Giraud & Weil, 2013).

**Table 10. Latent comparative data for selected EU countries**

|countries|DEU<br>|ESP<br>|FRA<br>ITA|GBR|NLD|
|---|---|---|---|---|---|
|Theil actual|3.33|<br>3.42|<br>3.47<br>3.51|<br>3.35|<br>3.59|
|KL Distance|0.02|<br>0.12|<br>0.12<br>0.09|<br>0.07|<br>0.11|
|overlap|0.93|<br>0.80|<br>0.83<br>0.85|<br>0.86|<br>0.80|
|Type 1#|16|<br>25|<br>14<br>22|<br>18|<br>19|
|Type 2#|3|<br>15|<br>14<br>9|<br>9|<br>16|
|Type 3#|2|<br>3|<br>7<br>4|<br>0|<br>4|
|Type 4#|40|<br>18|<br>26<br>26|<br>34|<br>22|

**Fig 9. Distance between actual and real vs. WEF Global Competitiveness Indicator.**

<!-- Start of picture text --> 0 .5 1 1.5 2<br>KL Distance<br>6<br>5<br>4<br>WEF CGI<br>3<br>2<br><!-- End of picture text --> 30
## **Fig 10. Degree of diversification (Theil) vs KL distance between latent an actual**

<!-- Start of picture text --> 4 Theil actual<br>trade<br>3.5<br>3<br>2.5<br>2<br>1.5<br>1<br>0.5<br>0<br>0 0.5 1 1.5 2 2.5<br>KL Distance<br><!-- End of picture text -->

# **10 Conclusions**

The model is a thorough implementation of dimensionality reduction of the export matrix. It provides a quantitative description of dual product spaces where countries and products have coordinates numerically estimated. Furthermore, the model provides a latent composition and latent comparative advantage, a new concept representing the reference export composition implied by the position of the country in the product space. This position not only depends upon what a country actually exports (revealed comparative advantage) but also upon the export composition of all other countries. The comparisons provide some practical indication of the potential for diversification.

## **Main findings**

1. The product space has relatively few dimensions (five explain 70% of the trade matrix).

2. Typical competiveness variables are weakly correlated to individual latent factors (coordinates in the product space).

3. Latent comparative advantages are available and comparisons with RCA inform on the extensive margins and the potential for diversification.

4. Typical competiveness variables are related to distance between latent and revealed (actual) positions in the product space.

5. Economies with less distance, or making the most of their latent advantage, are expectedly more “competitive” and more diversified.

6. The currently accepted concepts such as PRODY or RFI have, in fact, limited informational <u>power.</u> The model presents a number of advantages. It is not only a descriptive data analysis tool but it is also embedded in classical trade theory. Therefore it is quantitative and eventually predictive. For instance, it allows estimates of how trade will change a country’s latent variables and endowments based upon known country factors. The associated information metric measures how much of the trade structure is explained by the model (about 70%). Furthermore the model 31
does not rely on arbitrary choices of parameters or of functional structure. The only partly subjective but not ad hoc interpretation is the reading of the scree plot, as in a standard PCA, to determine the number of relevant dimensions of the product space.

# **_Improvements_**

Several improvements are relatively straightforward:

- The model has been implemented at 2-digits. Implementation at 3- or 4-digits should be considered.

- Improvements in the E-PCA implementation and further test of robustness.

- More detailed comparisons between latent variables and known indicators of competitiveness.

- Inclusions of several years in the model.

# **_Extensions_**

The following areas have not been considered so far.

- Inclusion of import composition as well as export composition in order to better incorporate a value chain description of trade.

- Inclusion of geographical information in the model and how to incorporate spatial gravity modeling.

32