io_rm_dynamics: Remove Dynamic Consumption Categories from IO Table

View source: R/io_rm_dynamics.R

io_rm_dynamicsR Documentation

Remove Dynamic Consumption Categories from IO Table

Description

Remove dynamic consumption categories, e.g. inventory or gross-fixed-capital-formation from an input-output (IO) table by recalculating the IO table based on its leontief inverse and implied new demand.

Usage

io_rm_dynamics(iot, dynamic_categories, category_to_scale)

Arguments

iot

An input-output table in long format with the columns, origin, sector, destination, use and flow

dynamic_categories

a vector of dynamic categories in final use to be removed

category_to_scale

the use category (as integer) to which to add the positive components of removed categories.

Details

Static CGE trade models often can/do not capture dynamic components such as changes in inventory or gross-fixed-capital-formation. Therefore this function allows to recalculate the IO table following the suggestions in Costinot and Rodríguez-Clare (2014). Specifically, negative changes in dynamic components of final consumption are assumed to have been produced in the current period, and positive components are added to a different category that can be specified using the category_to_scale argument (usually this will be final consumption by households). To account for the intermediate goods that would have been necessary to produce the negative components in the current period the approach relies on a leontief inverse to calculate intermediate use based upon the implied new demand.

Value

Returns an IO table in long format as a tibble with the columns origin, sector, destination, use and flow

Examples

## Not run: 

library(iotr)

# set cache_dir for WIOD to avoid long download times on every run !!!
cache_dir <- NULL

wiot_raw <- io_load_wiot(cache_dir, years = 2000:2014)

wiot_long <- io_tidy_wiot(wiot_raw)

# get wiot into standard long IO-table format
iot <- dplyr::filter(wiot_long, Country != "TOT", Year == "2014")
iot <-
  dplyr::select(iot,
                origin = Country,
                sector = RNr,
                destination,
                use,
                flow)

iot <- io_rm_negative_vad(iot, category_to_scale = 57)

iot <-
  io_rm_dynamics(iot,
                 dynamic_categories = c(60, 61),
                 category_to_scale = 57)

iot <- io_gen_own_trade(iot, max_replace = 1e-6)


## End(Not run)

okrebs/iotr documentation built on Aug. 22, 2023, 12:06 p.m.