R6 class for multi-regional input-output matrix (MRIO). This class inherits from the
iom class and extends its functionality to handle multi-regional input-output tables
such as the World Input-Output Database (WIOD) and EXIOBASE tables.
A new instance of the miom class.
fio::iom -> miom
countries(character)
Vector of region names.
sectors(character)
Vector of sector names.
n_countries(integer)
Number of regions in the matrix.
n_sectors(integer)
Number of sectors per country.
bilateral_trade(list)
Bilateral trade flows between regions by sector.
domestic_intermediate_transactions(list)
List of domestic intermediate transaction matrices by region.
international_intermediate_transactions(list)
List of international intermediate transaction matrices between regions.
multiregional_multipliers(data.frame)
Multi-regional output multipliers including intra-regional, inter-regional, and spillover effects.
Inherited methods
fio::iom$add()fio::iom$close_model()fio::iom$compute_allocation_coeff()fio::iom$compute_field_influence()fio::iom$compute_ghosh_inverse()fio::iom$compute_hypothetical_extraction()fio::iom$compute_leontief_inverse()fio::iom$compute_multiplier_employment()fio::iom$compute_multiplier_taxes()fio::iom$compute_multiplier_wages()fio::iom$compute_tech_coeff()fio::iom$remove()fio::iom$set_max_threads()fio::iom$update_final_demand_matrix()fio::iom$update_value_added_matrix()
new()Creates a new instance of this R6 class.
miom$new(
id,
intermediate_transactions,
total_production,
countries,
sectors,
household_consumption = NULL,
government_consumption = NULL,
exports = NULL,
final_demand_others = NULL,
imports = NULL,
taxes = NULL,
wages = NULL,
operating_income = NULL,
value_added_others = NULL,
occupation = NULL
)id(character)
Identifier for the multi-regional input-output matrix.
intermediate_transactions(matrix)
Multi-regional intermediate transactions matrix. Rows and columns should follow
the structure: Country1_Sector1, Country1_Sector2, ..., Country2_Sector1 etc.
total_production(matrix)
Total production vector by country and sector.
countries(character)
Vector of region names in the matrix.
sectors(character)
Vector of sector names in the matrix.
household_consumption(matrix)
Household consumption vector by region and sector.
government_consumption(matrix)
Government consumption vector by region and sector.
exports(matrix)
Exports vector by region and sector.
final_demand_others(matrix)
Other vectors of final demand that doesn't have dedicated slots.
imports(matrix)
Imports vector by region and sector.
taxes(matrix)
Taxes vector by region and sector.
wages(matrix)
Wages vector by region and sector.
operating_income(matrix)
Operating income vector by region and sector.
value_added_others(matrix)
Other vectors of value-added that doesn't have dedicated slots.
occupation(matrix)
Occupation matrix by region and sector.
get_bilateral_trade()Get bilateral trade flows between two countries by sector.
compute_multiplier_output()Override the parent compute_multiplier_output to add country/sector information.
compute_key_sectors()Override the parent compute_key_sectors to add country/sector information.
compute_multiregional_multipliers()Compute multi-regional output multipliers following Miller & Blair (2009). This includes intra-regional, inter-regional, and spillover multipliers.
get_spillover_matrix()Compute spillover effects matrix showing how shocks in each region-sector affect output in all other regions. Returns the inter-regional elements from the Leontief inverse matrix (excluding intra-regional effects).
get_net_spillover_matrix()Compute net spillover effects for each country pair. Net spillover represents the difference in total spillover effects between country pairs, showing which country benefits more from economic shocks in the other. Uses the spillover matrix (Leontief inverse with intra-regional effects set to zero).
# Sample multi-regional data (2 countries, 2 sectors each)
countries <- c("BRA", "CHN")
sectors <- c("Agriculture", "Manufacturing")
# Create country-sector labels
labels <- paste(rep(countries, each = 2), rep(sectors, 2), sep = "_")
# Sample intermediate transactions matrix (4x4)
intermediate_transactions <- matrix(
c(
10, 5, 2, 1,
8, 15, 3, 2,
1, 2, 12, 4,
2, 3, 6, 18
),
nrow = 4, ncol = 4,
dimnames = list(labels, labels)
)
# Total production vector
total_production <- matrix(c(100, 120, 80, 110),
nrow = 1, ncol = 4,
dimnames = list(NULL, labels)
)
# Create MIOM instance
my_miom <- miom$new(
id = "sample_miom",
intermediate_transactions = intermediate_transactions,
total_production = total_production,
countries = countries,
sectors = sectors
)