Leontief's original input-output analysis involved swimming "upstream" to estimate the economy that would be needed if different final demand were observed. But what if different resources were available? The analysis is the same if resources become final demand (and vice versa) and make becomes use (and vice versa). That is, the analysis is the same if you're dealing with a reversed energy conversion chain (ECC). This function performs that reversal.
Arguments
- .sutmats
the input ECC
- R
The R matrix in the ECC to be reversed. (Default is "R".)
- U
The U matrix in the ECC to be reversed. (Default is "U".)
- V
The V matrix in the ECC to be reversed. (Default is "V".)
- Y
The Y matrix in the ECC to be reversed. (Default is "Y".)
- R_rev
The name of the R matrix in the reversed ECC. (Default is "R_rev".)
- U_rev
The name of the U matrix in the reversed ECC. (Default is "U_rev".)
- V_rev
The name of the V matrix in the reversed ECC. (Default is "V_rev".)
- Y_rev
The name of the Y matrix in the reversed ECC. (Default is "Y_rev".)
Details
To reverse an ECC, the R, U, V, and Y matrices need to be transposed and swapped: R with Y and U with V. This function performs those operations.
Examples
library(dplyr)
library(Recca)
library(tidyr)
mats <- UKEnergy2000mats %>%
spread(key = "matrix.name", value = "matrix") %>%
reverse()
mats$R_rev[[1]]
#> Diesel - Dist. Elect - Grid NG - Dist. Petrol - Dist.
#> Residential 0 6000 25000 0
#> Transport 14750 0 0 26000
#> attr(,"rowtype")
#> [1] "Industry"
#> attr(,"coltype")
#> [1] "Product"
mats$U_rev[[1]]
#> Crude dist. Diesel dist. Elect. grid Gas wells & proc. NG dist.
#> Crude - Dist. 47500 0 0 0 0
#> Crude - Fields 0 0 0 0 0
#> Diesel 0 0 0 0 0
#> Diesel - Dist. 0 15500 0 0 0
#> Elect 0 0 0 0 0
#> Elect - Grid 0 0 6275 0 0
#> NG - Dist. 0 0 0 0 41000
#> NG - Wells 0 0 0 43000 0
#> Petrol 0 0 0 0 0
#> Petrol - Dist. 0 0 0 0 0
#> Oil fields Oil refineries Petrol dist. Power plants
#> Crude - Dist. 0 0 0 0
#> Crude - Fields 50000 0 0 0
#> Diesel 0 20500 0 0
#> Diesel - Dist. 0 0 0 0
#> Elect 0 0 0 6400
#> Elect - Grid 0 0 0 0
#> NG - Dist. 0 0 0 0
#> NG - Wells 0 0 0 0
#> Petrol 0 26500 0 0
#> Petrol - Dist. 0 0 26500 0
#> attr(,"rowtype")
#> [1] "Product"
#> attr(,"coltype")
#> [1] "Industry"
mats$V_rev[[1]]
#> Crude Crude - Dist. Crude - Fields Diesel Diesel - Dist.
#> Crude dist. 0 500 47500 0 25
#> Diesel dist. 0 0 0 15500 350
#> Elect. grid 0 0 0 0 0
#> Gas wells & proc. 0 0 0 0 50
#> NG dist. 0 0 0 0 25
#> Oil fields 50000 0 2500 0 50
#> Oil refineries 0 47000 0 5000 0
#> Petrol dist. 0 0 0 0 250
#> Power plants 0 0 0 0 0
#> Elect Elect - Grid NG NG - Dist. NG - Wells Petrol
#> Crude dist. 0 25 0 0 0 0
#> Diesel dist. 0 0 0 0 0 0
#> Elect. grid 6400 0 0 0 0 0
#> Gas wells & proc. 0 25 43000 0 2000 0
#> NG dist. 0 25 0 0 41000 0
#> Oil fields 0 25 0 0 0 0
#> Oil refineries 0 75 0 0 0 0
#> Petrol dist. 0 0 0 0 0 26500
#> Power plants 0 100 0 16000 0 0
#> Petrol - Dist.
#> Crude dist. 0
#> Diesel dist. 0
#> Elect. grid 0
#> Gas wells & proc. 0
#> NG dist. 0
#> Oil fields 0
#> Oil refineries 0
#> Petrol dist. 500
#> Power plants 0
#> attr(,"rowtype")
#> [1] "Industry"
#> attr(,"coltype")
#> [1] "Product"
mats$Y_rev[[1]]
#> Resources - Crude Resources - NG
#> Crude 50000 0
#> NG 0 43000
#> attr(,"rowtype")
#> [1] "Product"
#> attr(,"coltype")
#> [1] "Industry"