A typical workflow begins with using the Leontief decomposition in the decompr
package.
# load the decompr package
library(decompr)
We will use the example data set.
# load the example data set
data(leather)
and apply the leontief decomposition and post multiply with exports
l <- decomp(inter,
final,
countries,
industries,
out,
method = "leontief",
post = "exports" )
We can now analyse the l
object with the gvc package.
library(gvc)
For instance, using the New Revealed Comparative Advantage (nrca()
),
nrca(l)
## [1] 1.2676927 1.0581114 0.1533582 1.0087530 1.3176076 0.3068102 0.8635848
## [8] 0.7080925 1.9843574
or using Importing to Export (i2e()
),
i2e(l)
## country sector i2e
## 1 Argentina Agriculture 0.05295042
## 2 Argentina Textile_and_Leather 0.10020580
## 3 Argentina Transport_Equipment 0.01185222
## 4 Turkey Agriculture 0.06573884
## 5 Turkey Textile_and_Leather 0.09793876
## 6 Turkey Transport_Equipment 0.02239852
## 7 Germany Agriculture 0.03815808
## 8 Germany Textile_and_Leather 0.03577311
## 9 Germany Transport_Equipment 0.17206757