Two global-value-chain 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 (Wang, Z., S.-J. Wei, and K. Zhu. 2013. "Quantifying International Production Sharing at the Bilateral and Sector Levels.").
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
if (!require('devtools')) install.packages('devtools')devtools::install_github("bquast/decompr")
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
In addition to the help files we provide a long form example in a vignette .
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.”
add post-multiplication argument to leontief method
remove leontief_output(), functionality moved to leontief()
use ellipsis for decomp function
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 Travis-CI support
add coveralls.io support
add a leontief_output decomposition method
update the README.md file
add warning when no method is specified in decomp (default is Leontief as of v.2)
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
update citation code
use " in stead of ' in examples and function arguments
use match.arg for method in decomp function
include more descriptive description
update example data to regional tables for faster computations
put back examples for non-decomp functions
remove examples other than for decomp function, to pass CRAN test in time
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