Four 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. The Borin and Mancini (2019) decomposition splits country-, sector- or bilateral-level exports into up to 13 value added and GVC 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. Borin, A., & Mancini, M. (2019). Measuring What Matters in Global Value Chains and Value-Added Trade. World Bank Policy Research Working Paper 8804.

Two Global Value Chains decompositions are implemented. Firstly, the 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, see Leontief (1937).
Additional tools for GVC analysis are available in the gvc package.
You can install the latest stable version from CRAN.
install.packages('decompr')
The development version, to be used at your peril, can be installed from GitHub using the devtools package.
if (!require('remotes')) install.packages('remotes')
remotes::install_github('bquast/decompr')
Following installation, the package can be loaded using:
library(decompr)
For general information on using the package, please refer to the help files.
help('decompr')
help(package='decompr')
For examples of usage, see the function specific help pages, in particular the decomp() function.
help('decomp')
help('leontief')
help('wwz')
help('load_tables_vectors')
In addition to the help files we provide a long form example in a vignette:
vignette('decompr')
An overview of the changes is available in the NEWS file.
news(package='decompr')
There is a dedicated website with information hosted on my personal website.
Development takes place on the GitHub page.
https://github.com/bquast/decompr
Bugs can be filed on the issues page on GitHub.
https://github.com/bquast/decompr/issues
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.