func_spec: Calculate Functional Specialization in Trade

Description Usage Arguments Value Examples

View source: R/func_spec.R

Description

Calculates the functional specialization in trade measure as used by Marcel P Timmer, Sébastien Miroudot and Gaaitzen J de Vries (2018), Functional specialisation in trade.

Labor shares for different functions are needed. As of now, this is only available for WIOD2013 from 1999 to 2011. Add these to iot first via [load_extra_iot()] or [load_extra_iots()]. If not found, the function will not change the IOT.

Full Reference: Marcel Timmer, Sébastien Miroudot and Gaaitzen de Vries (2018), Functional specialisation in trade., Journal of Economic Geography, Volume 19, Issue 1, Pages 1–30

Usage

1
2
3
4
5
6
func_spec(
  iot,
  bilateral = FALSE,
  aggregation = NULL,
  functions = c("mgt", "rd", "mar", "fab")
)

Arguments

iot:

List with elements in a Input-Output Table (load via [load_iot()])

bilateral:

If TRUE a full set of bilateral functional specialization measures are calculated. Otherwise, only global.

aggregation:

A vector with ones in and zeros at place of country, ones will be aggregated.

functions:

Vector with functions that are used. !!TO DO: provide this together with data!!

Value

The input-output table list with either the bilateral FS measures (bfs_<function>) or global FS (fs_<function> measures and a description of the countries and industries (bfs_<function>_descr or fs_<function>) for use in [export_dataframe()].

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
iot <- load_iot("WIOD2013", 2000)
iot <- load_extra_iot(iot, "joeg2019")
iot <- func_spec(iot)
iot <- func_spec(iot, bilateral = TRUE)

iots <- load_iots("WIOD2013", 2000:2001)
iots <- load_extra_iots(iots, "joeg2019")
iots <- on_iots(func_spec, iots)
iots <- on_iots(func_spec, iots, bilateral = TRUE)
df_fs <- export_dataframe(c("fs_mgt", "fs_rd", "fs_mar", "fs_fab"), iots)
df_bfs <- export_dataframe(c("bfs_mgt", "bfs_rd", "bfs_mar", "bfs_fab"), iots)

sybrendeuzeman/WIOD_package documentation built on Jan. 29, 2020, 9:07 p.m.