gvc

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)


Try the gvc package in your browser

Any scripts or data that you put into this service are public.

gvc documentation built on June 20, 2022, 1:05 a.m.