distance {economiccomplexity}R Documentation

Distance

Description

distance() computes the distance matrix that accounts for the weighted proportions of the products connected to each good that the countries are not exporting.

Usage

distance(balassa_index, proximity_product)

Arguments

balassa_index

(Type: dgCMatrix) the output from balassa_index()) or an equivalent arrangement.

proximity_product

(Type: dgCMatrix) the output from proximity()) or an equivalent arrangement.

Details

The current implementation follows (Hausmann et al. 2014) to measure the oppotunities implied by a country's position.

Value

A matrix.

References

For more information on this index see:

Hausmann R, Hidalgo C, Bustos S, Coscia M, Simoes A, Yildirim M (2014). The atlas of economic complexity: Mapping paths to prosperity. MIT Press. doi:10.7551/mitpress/9647.001.0001.

and the references therein.

Examples

d <- distance(
  economiccomplexity_output$balassa_index,
  economiccomplexity_output$proximity$proximity_product
)

# partial view of the distance matrix
d[1:5, 1:5]


[Package economiccomplexity version 1.5.0 Index]