Construct a multi-regional input-output (MRIO) model from supply-use tables, bilateral trade, and commodity balance sheets. Uses the industry technology assumption to derive symmetric product-by-product tables.
The resulting matrices follow the FABIO methodology
(Bruckner et al., 2019). Rows and columns of Z represent
(country, item) pairs. Each entry Z[i,j] gives the
intermediate flow from sector i to sector j.
Usage
build_io_model(
supply_use = NULL,
bilateral_trade = NULL,
cbs = NULL,
years = NULL,
endogenize_losses = FALSE
)Arguments
- supply_use
Tibble from
build_supply_use(). By default, this function callsbuild_supply_use()internally. Must have columns:year,area_code,proc_group,proc_cbs_code,item_cbs_code,type,value.- bilateral_trade
Tibble from
get_bilateral_trade(). By default, this function callsget_bilateral_trade()internally. Must have columns:year,item_cbs_code,bilateral_trade(list-column of matrices).- cbs
Tibble from
get_wide_cbs(). By default, this function callsget_wide_cbs()internally. Must have columns:year,area_code,item_cbs_code,production,import,export,stock_withdrawal,stock_addition, plus final demand columns (food,other_uses).- years
Numeric vector of years to compute, or NULL. If NULL, computes all years in the intersection of available data across inputs. If specified, must be a subset of available years.
- endogenize_losses
Logical. If
TRUEandcbscontains alossescolumn, losses are moved from final demand to the diagonal ofZ(self-use), following the FABIO convention. Thelossescolumn is removed from Y andfd_labels. Defaults toFALSE.
Value
A tibble with one row per year and list-columns:
Z: Inter-industry flow matrix (product-by-product).Y: Final demand matrix.X: Total output vector.labels: Tibble mapping row/column indices toarea_codeanditem_cbs_code.fd_labels: Tibble mapping each Y column to itsarea_code(consuming country) andfd_col(demand category, e.g."food") . Pass tocompute_footprint()asfd_labelsto get atarget_fdcolumn in the footprint output.
Examples
su <- build_supply_use(example = TRUE)
btd <- get_bilateral_trade(example = TRUE)
cbs <- get_wide_cbs(example = TRUE)
build_io_model(su, btd, cbs)
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> ℹ Building IO model for 0 years.
#> Year range: Inf--Inf.
#> Final demand columns: food, other_uses, and stock_addition.
#> ✔ IO model complete.
#> # A tibble: 0 × 6
#> # ℹ 6 variables: year <dbl>, Z <list>, Y <list>, X <list>, labels <list>,
#> # fd_labels <list>
