Global Value Chain Decomposition

Three global value chain (GVC) decompositions are implemented. The Leontief decomposition derives the value added origin of exports by country and industry as in Hummels, Ishii and Yi (2001). The Koopman, Wang and Wei (2014) decomposition splits country-level exports into 9 value added components, and the Wang, Wei and Zhu (2013) decomposition splits bilateral exports into 16 value added components. Various GVC indicators based on these decompositions are computed in the complimentary 'gvc' package. --- References: --- Hummels, D., Ishii, J., & Yi, K. M. (2001). The nature and growth of vertical specialization in world trade. Journal of international Economics, 54(1), 75-96. Koopman, R., Wang, Z., & Wei, S. J. (2014). Tracing value-added and double counting in gross exports. American Economic Review, 104(2), 459-94. Wang, Z., Wei, S. J., & Zhu, K. (2013). Quantifying international production sharing at the bilateral and sector levels (No. w19677). National Bureau of Economic Research.

License CRAN Version Total RStudio Cloud Downloads Monthly RStudio Cloud Downloads Travis-CI Build Status Coverage Status

Bastiaan Quast, [email protected]

Two Global Value Chains decompositions are implemented. Firstly, the Wang-Wei-Zhu (Wang, Wei, and Zhu 2013) algorithm splits bilateral gross exports into 16 value added components. Secondly, the Leontief decomposition (default) derives the value added origin of exports by country and industry, which is also based on Wang, Wei, and Zhu (2013).

Additional tools for GVC analysis are available in the gvc package.


You can install the latest stable version from CRAN.


The development version, to be used at your peril, can be installed from GitHub using the devtools package.

if (!require('devtools')) install.packages('devtools')


Following installation, the package can be loaded using:


For general information on using the package, please refer to the help files.


For examples of usage, see the function specific help pages, in particular the decomp() function.


In addition to the help files we provide a long form example in a vignette .


Additional Information

An overview of the changes is available in the NEWS file.


There is a dedicated website with information hosted on my personal website.


Development takes place on the GitHub page.

Bugs can be filed on the issues page on GitHub.


The Wang-Wei-Zhu algorithm (wwz())is based on R code written by Fei Wang (not to be confused with the author of the algorithm, with the same last name), which implemented this algorithm.


Wang, Zhi, Shang-Jin Wei, and Kunfu Zhu. 2013. “Quantifying International Production Sharing at the Bilateral and Sector Levels.”


decompr 4.5.0

  • code refactoring\

  • added v

decompr 4.1.0

  • fix post multiplication "final_demand" of leontief()

decompr 4.0.0

  • add post-multiplication argument to leontief method

  • remove leontief_output(), functionality moved to leontief()

  • use ellipsis for decomp function

decompr 3.0.0

  • remove vertical_specialisation and vertical_specialization, will be included in gvc package

  • add some attributes to output t.b. used by gvc package

  • change the output format of leontief and leontief-output to long form (tidy data)

  • add columns country and sectors names

  • add DViX_Fsr to wwz

  • add Vignette (decompr)

  • add tests

  • add Travis-CI support

  • add support

decompr 2.1.0

  • add a leontief_output decomposition method

  • update the file

  • add warning when no method is specified in decomp (default is Leontief as of v.2)

decompr 2.0.0

  • make load_tables_vectors default

  • change notice to reflect new default

  • update examples and data to reflect lt

  • replace use of 2 dimensional arrays with matrices

  • more efficient construction of rownam and z1

  • replace use of length(k) with G

  • replace use of various inefficient uses of diag() (e.g. with Vhat)

  • improved spacing of code for legibility

  • make leontief default method

decompr 1.3.2

  • add notice

decompr 1.3.1

  • fix citations etc.

decompr 1.3.0

  • add load_tables_vectors to input in simple form

decompr 1.2.1

  • update authors

decompr 1.2.0

  • update citation code

  • use " in stead of ' in examples and function arguments

  • use match.arg for method in decomp function

decompr 1.1.0

  • update references

  • include more descriptive description

decompr 1.0.2

  • update example data to regional tables for faster computations

  • put back examples for non-decomp functions

decompr 1.0.1

  • remove examples other than for decomp function, to pass CRAN test in time

  • add

decompr 1.0.0

  • functions names use underscores in stead of periods

  • method names use underscores in stead of periods

  • examples reflect the above changes

  • WIOD data set is now compressed using bzip2

  • included this news file

decompr 0.7.0

  • citation information is included

decompr 0.6.0

  • example data set in included

decompr 0.5.0

  • examples are included

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


6.2.0 by Bastiaan Quast, 19 days ago,

Report a bug at

Browse source code at

Authors: Bastiaan Quast [aut, cre] , Fei Wang [aut] , Victor Stolzenburg [aut] , Oliver Reiter [ctb] , Sebastian Krantz [ctb]

Documentation:   PDF Manual  

Task views: Econometrics

GPL-3 license

Imports matrixStats

Suggests gvc, testthat, knitr, rmarkdown

Imported by gvc.

See at CRAN