Learn R Programming

ioanalysis (version 0.3.4)

leontief.inv: Leontief Inverse

Description

Computes the Leontief (input) inverse. leontief.inv has inputs to invert a subset of all regions if desired. If not using an InputOutput object from as.inputoutput, the functionality is limited. See example for more details.

Note: if you have a non InputOutput object and you wish to use only a subset of all regions, you must supply the intermediate transaction matrix (Z) and total production matrix (X). Otherwise use L <- Z %*% diag(c(1/X))

Caution: Inverting large matrices will take a long time. R does a computation roughly every 8e-10 second. The number of computations per matrix inversion is n^3 where n is the dimension of the square matrix. For n = 5000 it should take 100 seconds.

Usage

leontief.inv(Z = NULL, X, A, RS_label, regions)

Arguments

Z

Either an object class of InputOutput calculated from as.inputoutput or the intermediate transaction matrix. Do NOT use matrix of technical coefficients.

X

vector. Total production vector. Not required if Z is an object with InputOutput class.

A

Matrix. Technical Matrix of Input Coefficients. If provided and the data is large, the computations will be noticeably sped up.

RS_label

Matrix. A nx2 column matrix of labels for regions and sectors. The first column must be regions and the second column must be sectors. This is used to match with the intermediate transaction matrix.

regions

Character or Integer. Specific regions to be used. Can either be a character that exactly matches the name of the region in RS_label or the number of the region in the order it appears in RS_label.

Value

Returns a matrix with the Leontief Inverse.

Details

The Leontief inverse is derived from the input-output table A=[a_ij] where $$a_ij=z_ij/X_j$$

where z_ij is the input from i required in the production of j. X_j is the corresponding input in each column. The Leontief inverse is then computed as $$(I-A)^{-1}$$

Observe we result with the following system $$X = Lf$$ Therefore, element \(l_{ij}\) is interpreted as the ratio of final demand for sector j contributing to the total production in sector i.

References

Leontief, Wassily W. (1951). "Input-Output Economics." Scientific American, Vol. 185, No. 4 (October 1951), pp. 15-21.

Nazara, Suahasil & Guo, Dong & Hewings, Geoffrey J.D., & Dridi, Chokri, 2003. PyIO. Input-Output Analysis with Python. REAL Discussion Paper 03-t-23. University of Illinois at Urbana-Champaign. (http://www.real.illinois.edu/d-paper/03/03-t-23.pdf)

Examples

Run this code
# NOT RUN {
# Using an "InputOutput" object
data(toy.IO)
class(toy.IO)

L1 <- leontief.inv(toy.IO, region = "Narnia")

# Otherwise
Z <- toy.IO$Z
X <- toy.IO$X
L2 <- leontief.inv(Z, X)
# }

Run the code above in your browser using DataLab