leontief {decompr} | R Documentation |
Leontief Decomposition
Description
The Leontief decomposition of gross flows (exports, final demand, output) into their value added origins.
Usage
leontief(x, post = c("exports", "output", "final_demand", "none"), long = TRUE)
Arguments
x |
an object of class decompr. |
post |
post-multiply the value added multiplier matrix [ |
long |
logical. Transform the output data into a long (tidy) data set or not, default is |
Details
The Leontief decomposition is obtained by pre-multiplying the flow measure (e.g. exports) with
the value added multiplier matrix [VB = V(I-A)^{-1}
], obtained by pre-multiplying the Leontief Inverse matrix [B = (I-A)^{-1}
] with a diagonal matrix [V
] containing the direct value added share in each industries output.
V
is obtained as diag(v / o)
where o
is total industry output. v
is either supplied to load_tables_vectors
or computed as o - colSums(x)
with x
the raw IO matrix.
If o
is not supplied to load_tables_vectors
, it is computed as rowSums(x) + rowSums(y)
where y
is the matrix of final demands. If both o
and v
are not supplied to load_tables_vectors
, this is equivalent to computing V
as diag(1 - colSums(A))
, with A
is the row-normalized IO matrix also used to compute the Leontief Inverse [B
].
Value
If long = TRUE
a molten data frame containing the elements of the decomposed flows matrix in the final column, preceded by several identifier columns.
If long = FALSE
the decomposed flows matrix is simply returned.
Author(s)
Bastiaan Quast
References
Leontief, W. (Ed.). (1986). Input-output economics. Oxford University Press.
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.
Wang, Zhi, Shang-Jin Wei, and Kunfu Zhu (2013). Quantifying international production sharing at the bilateral and sector levels (No. w19677). National Bureau of Economic Research.
See Also
Examples
# Load example data
data(leather)
# Create intermediate object (class 'decompr')
decompr_object <- load_tables_vectors(leather)
# Perform the Leontief decomposition of each country-industries
# exports into their value added origins by country-industry
leontief(decompr_object)