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)
attach(leather)

and apply the leontief decomposition and post multiply with exports

l <- decomp(x = inter,
            y = final,
            k = countries,
            i = industries,
            o = 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)

or using Importing to Export (i2e()),

i2e(l)


bquast/gvc documentation built on June 26, 2022, 2:08 a.m.