Learn R Programming

decompr

Demonstration

Description

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.

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('remotes')) install.packages('remotes')
remotes::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.

https://qua.st/decompr/

Development

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

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.

Copy Link

Version

Install

install.packages('decompr')

Monthly Downloads

375

Version

6.4.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

June 19th, 2022

Functions in decompr (6.4.0)

kww

Koopman-Wang-Wei Decomposition of Gross Exports
leather

Leather Example ICIO Data
wwz2kww

Koopman-Wang-Wei from Wang-Wei-Zhu Decomposition
load_tables_vectors

Load the Input-Output and Final Demand Tables
wwz

Wang-Wei-Zhu Decomposition of Gross Exports
decomp

Interface Function for Decompositions
decompr-package

Global Value Chain Decomposition
load_tables

Load the Input-Output and Final Demand Tables: Depreciated Interface
leontief

Leontief Decomposition