The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

icio

License CRAN Version R build status

icio decomposes gross exports from inter-country input-output (ICIO) tables into value-added and double-counting components, implementing four decompositions from the global value chain (GVC) literature:

Function Method Level Terms
bm() Borin & Mancini (2019) country / sector / bilateral up to 13
leontief() Hummels, Ishii & Yi (2001) country × industry continuous VA origin
kww() Koopman, Wang & Wei (2014) country 9
wwz() Wang, Wei & Zhu (2013) bilateral country × sector 16

bm() is the recommended state-of-the-art decomposition and reproduces the Stata icio command (Belotti, Borin & Mancini 2021). It also provides a corrected version of the KWW decomposition (perspective = "world", approach = "sink"), which fixes a known systematic bias in kww().

Installation

# install.packages("remotes")
remotes::install_github("SebKrantz/icio")

Usage

library(icio)

# The built-in 3x3 leather-sector ICIO table
data(leather)

# Build an 'icio' object: the expensive step (inverting I - A) is done once here
m <- load_icio(leather)

# ... or from the raw matrices, or from the Stata 'icio' CSV format
m <- load_icio(leather$inter, leather$final, leather$countries, leather$industries)
m <- load_icio_csv("EM_2015.csv", "EM_countrylist.csv")

# Borin-Mancini (2019): up to 13 terms, exporter perspective
bm(m)
bm(m, aggregation = "sector")
bm(m, aggregation = "bilateral", approach = "sink")

# Corrected KWW (world / sink perspective)
bm(m, perspective = "world", approach = "sink")

# Importer-perspective decomposition of gross imports
bm(m, flow = "imports")

# The other decompositions
leontief(m)
kww(m)
wwz(m)

# Unified interface, also for several tables at once (e.g. one per year)
decomp(m, aggregation = "bilateral")
decomp(list(`2015` = m, `2016` = m), method = "kww", idcol = "Year")

All decompositions return a data.table. See vignette("icio") for a detailed walk-through.

References

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.