productivity_levels()
computes EXPY and PRODY measures.
productivity_levels(
data_exp,
data_gdp,
country = "country",
product = "product",
value = "value"
)
(Type: data.frame, matrix or dgCMatrix) a dataset containing countries, products and exported values.
(Type: data.frame, matrix or dgCMatrix) a dataset containing countries and per-capita GDP values.
(Type: character) the column with the countries.
By default this is set to "country"
. Used only if the input is a data.frame.
(Type: character) the column with the products.
By default this is set to "product"
. Used only if the input is a data.frame.
(Type: character) the column with the metric for
country-product pairs.
By default this is set to "value"
. Used only if the input is a data.frame.
A list of two named numeric vectors.
The current implementation follows (Hausmann et al. 2005) to obtain the productivity and income levels associated to exports.
For more information on prody and its applications see:
Hausmann R, Hwang J, Rodrik D (2005). “What You Export Matters.” Working Paper 11905, National Bureau of Economic Research. doi:10.3386/w11905 .
pl <- productivity_levels(
world_trade_avg_1998_to_2000,
world_gdp_avg_1998_to_2000
)
#> Warning: 'data_exp' and 'data_gdp' don't have the same countries, some elements will be dropped
# partial view of productivity levels
pl$productivity_level_country[1:5]
#> ago alb and are arg
#> 8223.607 6343.341 13783.485 10207.679 9269.670
pl$productivity_level_product[1:5]
#> 0011 0012 0013 0014 0015
#> 7915.893 3986.371 11375.710 6273.428 17628.950