load_tables_vectors {decompr}R Documentation

Load the Input-Output and Final Demand Tables

Description

This function loads the demand tables and creates all matrices and variables required for the GVC decompositions.

Usage

load_tables_vectors(
  iot,
  x,
  y,
  k,
  i,
  o = NULL,
  v = NULL,
  null_inventory = FALSE
)

Arguments

iot

a Input Output Table object - a list with elements 'inter' (= x), 'final' (= y), 'output' (= o), 'countries' (= k) and 'industries' (= i) of class 'iot'. Alternatively these objects can be passed directly to the function, at least x, y, k and i need to be supplied.

x

intermediate demand table supplied as a numeric matrix of dimensions GN x GN (G = no. of country, N = no. of industries). Both rows and columns should be arranged first by country, then by industry (e.g. C1I1, C1I2, ..., C2I1, C2I2, ...) and should match (symmetry), such that rows and columns refer to the same country-industries.

y

final demand table supplied as a numeric matrix of dimensions GN x MN (M = no. of final demand categories recorded for each country). The rows of y need to match the rows of x, and the columns should also be arranged first by country, then by final demand category (e.g. C1FD1, C1FD2, ..., C2FD1, C2FD2, ...) with the order of the countries the same as in x.

k

character. A vector of country or region names of length G, arranged in the same order as they occur in the rows and columns of x, y.

i

character. A vector of country or region names of length N, arranged in the same order as they occur in the rows and columns of x and rows of y.

o

numeric. A vector of final outputs for each country-industry matching the rows of x and y. If not provided it will be computed as rowSums(x) + rowSums(y).

v

numeric. A vector of value added for each country-industry matching the columns of x. If not provided it will be computed as o - colSums(x).

null_inventory

logical. TRUE sets the inventory (last final demand category for each country) to zero.

Details

Adapted from code by Fei Wang.

Value

A 'decompr' class object - a list with the following elements:

Am Imported / Exported goods IO shares matrix (x column-normalized by output o, with domestic entries set to 0).
B Leontief Inverse matrix (I - A)^{-1} where A is x column-normalized by output o.
Bd Domestic part of Leontief Inverse matrix (inter-country elements of B set to 0, needed for WWZ decomposition).
Bm Imported / Exported part of Leontief Inverse matrix (domestic elements of B set to 0, needed for WWZ decomposition).
L Domestic economy Leontief Inverse matrix (I - Ad)^{-1} where Ad is A with all inter-country elements set to 0.
E Total Exports (output of each country-industry servicing foreign production or foreign final demand).
ESR Total Exports by destination country.
Eint Exports for intermediate production by destination country.
Efd Exports for final demand by destination country.
Vc Value added content of output (v / o).
G Number of countries.
N Number of industries.
GN Number of country-industries.
k Vector of country names.
i Vector of industry names.
rownam Unique country-industry names identifying the rows / columns of x and rows of y.
X Total Output ( = o).
Y Total Final Demand by destination country.
Yd Domestic Final Demand.
Ym Foreign Final Demand.

Author(s)

Bastiaan Quast

See Also

leontief, kww, wwz, decompr-package

Examples

# Load example data
data(leather)

# Create intermediate object (class 'decompr')
decompr_object <- load_tables_vectors(leather)

# Examine the object                                    
str(decompr_object)

[Package decompr version 6.4.0 Index]