convert_io: Convert standardized IO Table to simulation inputs

Description Usage Arguments Details Value

View source: R/convert_io.R

Description

convert_io takes an input output table in standardized long format and converts it to the necessary model inputs for simulations.

Usage

1
2
3
4
5
6
7
8
convert_io(
  iot,
  orig_col = "origin",
  sec_col = "sector",
  dest_col = "destination",
  use_col = "use",
  flow_col = "flow"
)

Arguments

iot

An input output table in standardized long format (see the package 'iotr') with the columns, origin, sector, destination, use and flow. Alternative column names can be specified with the following parameters

orig_col

alternative name for 'origin' column

sec_col

alternative name for 'sector' column

dest_col

alternative name for 'destination' column

use_col

alternative name for 'use' column

flow_col

alternative name for 'flow' column

Details

Our simulation requires data on country-sector revenues, trade deficits, sectoral import shares by use category (final or sectoral intermediate), country-sector consumption shares, labor cost shares and cost shares of material inputs, all of which can be derived from an input output table.

Value

Returns a list of

location_id

vector of location ids

sector_id

vector of sector ids

R

matrix of location-sector revenues with N = length(location_id) rows and J = length(sector_id) columns

D

vector of locations' deficit transfers, i.e. positive for a trade deficit and negative for a trade surplus

pi

vector of import shares across locations for each sector-destination-use combination, where the import share of origin o in sector s products used in destination d and use category u is at position o + (d-1)*N + (s-1)*N*N + (u-1)*N*N*J

alpha

matrix of sectoral consumption shares in each location with N rows and J columns

gamma_jrs

vector of intermediate cost shares across sectrs for each destination-use combination, where the cost share of sector s intermediates used in destination d and use category u is at position d + (s-1)*N + (u-1)*N*J

gamma_js

matrix of location-sector labor cost shares with N rows and J columns


okrebs/DeGVC documentation built on March 15, 2021, 1:17 a.m.