Learn R Programming

⚠️There's a newer version (6.4.0) of this package.Take me there.

decompr

Bastiaan Quast, bquast@gmail.com

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.

Installation

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('devtools')) install.packages('devtools')
devtools::install_github("bquast/decompr")

Usage

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")

Additional Information

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.

http://qua.st/decompr

Development

Development takes place on the GitHub page.

http://github.com/bquast/decompr

Bugs can be filed on the issues page on GitHub.

https://github.com/bquast/decompr/issues

Credit

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.

References

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

Copy Link

Version

Install

install.packages('decompr')

Monthly Downloads

293

Version

4.5.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Bastiaan Quast

Last Published

August 17th, 2016

Functions in decompr (4.5.0)

decomp

Interface function for decompositions
decompr

Export Decomposition using the Wang-Wei-Zhu and Leontief decompositions algorithms.
final

Leather Example
wwz

Runs the Wang-Wei-Zhu decomposition
inter

Leather Example
industries

Leather Example
load_tables_vectors

Load the Input-Output and Final demand tables
leontief

Leontief Decomposition
out

Leather Example
countries

Leather Example
load_tables

Load the Input-Output and Final demand tables